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.
When the "Source -> Insert Code -> Add Propery" dialog is used to add a new property and both the "Bounded" and "Property Change Support" checkboxes are selected, the generated code for the "set" method is wrong: [Generating a "demo: String" property]: public void setDemo(String demo) { String oldDemo = demo; this.demo = demo; propertyChangeSupport.firePropertyChange(PROP_DEMO, oldDemo, demo); } The problem is on the first line of the setter method: it should read: String oldDemo = this.demo; , instead of the current: String oldDemo = demo; , which does actually set the "old" value to the new one from the method parameter and not really from the class' ("this." prefix is missing!) value. Thanks. Whole generated code, just for the record: private String demo = "bug report"; public static final String PROP_DEMO = "demo"; public String getDemo() { return demo; } public void setDemo(String demo) { String oldDemo = demo; this.demo = demo; propertyChangeSupport.firePropertyChange(PROP_DEMO, oldDemo, demo); } private java.beans.PropertyChangeSupport propertyChangeSupport = new java.beans.PropertyChangeSupport(this); public void addPropertyChangeListener(java.beans.PropertyChangeListener listener ) { propertyChangeSupport.addPropertyChangeListener( listener ); } public void removePropertyChangeListener(java.beans.PropertyChangeListener listener ) { propertyChangeSupport.removePropertyChangeListener( listener ); }
reassign to java editor for evaluation
this is already fixed, the fix will be included in patch 1, thanks for your report. *** This issue has been marked as a duplicate of 131835 ***