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.
Java Code editor protected sections save incorrectly for some files. The defect can be seen by opening the attached java file, adding three lines after the java class declaration, and then saving the file. The file in the IDE must be closed and reopened to see the results.
Created attachment 13104 [details] The Java class file that is used to demonstrate the problem.
Created attachment 13105 [details] The java class after editing, with the protected sections saved incorrectly
Milo, can you have a look at it?
I was able to reproduce the behavior in NB3.5 on Linux RH9. I've tried recent dev build and it behaves in the same way. I'm transferring this to java module for further evaluation because the guarded sections maintenance is done there.
The issue is caused by invalid guarded block names. They have to be unique but in your source file there are some ambiguity eg //GEN-BEGIN:0#property#getString#parameterTypeId#formattedStringValueReturn I am not aware of any module of the standard netbeans distribution generating that code. You should contact the provider of the product (Sun One Studio?) you use or the module owner.