This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version = NetBeans IDE 8.0.2 (Build 201411181905) Operating System = Windows XP version 5.1 running on x86 Java; VM; Vendor = 1.7.0_79 Runtime = Java HotSpot(TM) Client VM 24.79-b02
I'm using NetBeans 8.0.2 with latest updates for developing projects on Java. I would like to report some kind of workaround. When I'm doing any changes with any component of the form @ design editor, for any JSpinner component on the form the following code will be automatically generated: "<JSpinner's identifier>.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(0), Integer.valueOf(0), null, Integer.valueOf(1)));" Code editor then will show warning hint "Unnecessary boxing to Integer" for this string of the code. If I will replace "Integer.ValueOf(0)" with just 0 and save changes, code will remain unchanged until next changes on the form @ design editor, when code with "Integer.valueOf(0)" will be automatically generated and replaced back once again.
spinner model in "model" property editor was set as property using: Spinner Model Editor Model Type = Number Number Type = Integer Initial Value = 0 Minimum = 0 //checked Maximum = 0 //uncheked Step Size = 1
Fixed. http://hg.netbeans.org/jet-main/rev/3c519a7f3583
Integrated into 'main-silver', will be available in build *201509100002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/3c519a7f3583 User: Tomas Pavek <tpavek@netbeans.org> Log: #254218: if either minumum or maximum spinner value is null, we can rely on autoboxing in generated code
*** Bug 243423 has been marked as a duplicate of this bug. ***