Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 131835 - Wrong setter implementation
Wrong setter implementation
Product: java
Classification: Unclassified
Component: Beans
All All
: P3 (vote)
: 6.x
Assigned To: Jan Pokorsky
: 132284 134042 134446 135226 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2008-04-02 15:16 UTC by crosati
Modified: 2008-06-04 08:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description crosati 2008-04-02 15:16:40 UTC

I've just downloaded NB 6.1 Dev 200804020004 in order to use the new property editor and I've found a wrong implementation of the setter method. This is a 
property just created:

	private Integer i2 = null;
	public static final String PROP_I2 = "i2";

	public Integer getI2 ()
		return i2;

	public void setI2 ( Integer i2 )
		Integer oldI2 = i2;
		this.i2 = i2;
		propertyChangeSupport.firePropertyChange(PROP_I2, oldI2, i2);

The implementation of the setter is wrong because the first statement should be:

		Integer oldI2 = this.i2;

or, even better:

		Integer oldI2 = getI2();

but certainly not what currently created.

Comment 1 Jiri Prox 2008-04-08 08:30:40 UTC
*** Issue 132284 has been marked as a duplicate of this issue. ***
Comment 2 Jan Pokorsky 2008-04-08 19:00:49 UTC
fixed as
Comment 3 Jiri Prox 2008-04-15 09:34:41 UTC
verified in trunk.

It's good candidate for patch
Comment 4 pgebauer 2008-04-27 00:03:44 UTC
The fix has been ported into the release61_fixes branch:
Comment 5 Jiri Prox 2008-04-29 11:01:08 UTC
*** Issue 134042 has been marked as a duplicate of this issue. ***
Comment 6 Jiri Prox 2008-05-03 14:16:05 UTC
*** Issue 134446 has been marked as a duplicate of this issue. ***
Comment 7 Jiri Prox 2008-05-19 09:08:26 UTC
*** Issue 135226 has been marked as a duplicate of this issue. ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo