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.
I am fixing bug #86198 ("Mnemonics handling issue") by replace calls button.setText(... bundle.getString(...)) button.setMnemonic(... bundle.getString(...).charAt(0)) with org.openide.awt.Mnemonics.setText(button, bundle.getString(...)) I do these changes mostly in the form editor by changing the appropriate values in property sheets. Everything worked fine until I started fixing the above issues in class BundleNodeCustomer (in module "Resource Bundles" aka "Properties"). In the middle of the work, I reviewed changes made in the .form file - they seemed OK - and also in the .java file - they seemed almost OK with one surprising exception. The exception is that part of code in the guarded block changed in a way that seems to have no reason. There is no corresponding change in the .form file and I have not modified anything related to that part of the code in the form editor. I am attaching diffs of the two files (.form, .java).
Created attachment 38570 [details] diff of the .form file
Created attachment 38571 [details] diff of the .java file
Look at lines 61-62 of the diff of the .java files: - label.setText(NbBundle.getBundle(...).getString("LAB_defaultLanguage")) + label.setText(NbBundle.getBundle(...).getString("LAB_DefaultBundle_Label")) The modified line is inside the guarded block and there is no apparent reason for such change. The original key ("LAB_defaultLanguage") is a valid key in the used resource bundle. The modified key ("LAB_DefaultBundle_Label") is not present in the used resource bundle so this unrequested change effectively breaks functionality of the class.
The mystery is explained. The wrong resource bundle key has been in the .form file, just the .java file was not in sync with the .form file (the critical part had been modified from outside of the form-editor). When I made some changes to the form in the form-dialog, guarded blocks of the .java file were regenerated, thus propagating the wrong resource bundle key to the .java file. Marking as INVALID.