Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 131835 - Wrong setter implementation
Wrong setter implementation
Status: VERIFIED FIXED
Product: java
Classification: Unclassified
Component: Beans
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Jan Pokorsky
issues@java
61fixes1-fixed
:
: 132284 134042 134446 135226 (view as bug list)
Depends on:
Blocks:
  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
:


Attachments

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
Hi,

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.

Claudio
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 http://hg.netbeans.org/main/rev/099396106e55
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:

http://hg.netbeans.org/release61_fixes/rev/6df438e82567
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