NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #692 (closed defect: fixed)

Opened 2011-07-26T16:31:31-05:00

Last modified 2012-05-23T12:29:41-05:00

Exception thrown for BigInteger parameters

Reported by: curtis Owned by: curtis
Priority: major Milestone: imagej2-b2-bugfixes
Component: Plugin Framework Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking:

Description

Uncomment the BigInteger field's @Parameter annotation in ParameterTester and run:

[ERROR] Exception
java.lang.IllegalArgumentException: Can not set java.math.BigInteger field imagej.core.plugins.debug.ParameterTester.bigInteger to java.lang.Double
	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
	at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
	at java.lang.reflect.Field.set(Field.java:657)
	at imagej.util.ClassUtils.setValue(ClassUtils.java:194)
	at imagej.ext.plugin.PluginModule.setInput(PluginModule.java:136)
	at imagej.ext.module.ui.WidgetModel.setValue(WidgetModel.java:84)
	at imagej.ext.module.ui.AbstractInputHarvester.addNumber(AbstractInputHarvester.java:202)
	at imagej.ext.module.ui.AbstractInputHarvester.buildPanel(AbstractInputHarvester.java:110)
	at imagej.ext.module.ui.AbstractInputHarvester.harvest(AbstractInputHarvester.java:67)
	at imagej.ext.plugin.AbstractInputHarvesterPlugin.process(AbstractInputHarvesterPlugin.java:63)
	at imagej.ext.module.ModuleRunner.preProcess(ModuleRunner.java:103)
	at imagej.ext.module.ModuleRunner.run(ModuleRunner.java:83)
	at imagej.ext.module.ModuleService$1.run(ModuleService.java:185)
	at java.lang.Thread.run(Thread.java:680)

Change History

comment:1 Changed 2011-09-07T14:16:52-05:00 by curtis

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in 76e206b51e4ae451eef74dd1ca44fb33ddd9d55c. The problem was that SpinnerNumberModel does not support non-primitive Numbers (it says so in the documentation, actually). So we wrote our own SpinnerNumberModel subclasses (see ee60eba7aac9414352c351fbc7b067c68b1e939c).

comment:2 Changed 2012-05-23T12:29:21-05:00 by bdezonia

  • Milestone changed from imagej-2.0.0-beta4 to imagej-2.0.0-beta3

comment:3 Changed 2012-05-23T12:29:41-05:00 by bdezonia

  • Milestone changed from imagej-2.0.0-beta3 to imagej-2.0.0-beta2