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 you create a new java class in Java project, it has package from previously created class. It started to happen in build #2872 and it breaks UI commit validation tests. To reproduce: - create a Java project - open new file wizard - choose Java|Java Class - click Next - type a different package name (e.g. mypackage) in the Package text field - finish the wizard - open new file wizard again - choose Java|Java Class - click Next - select 'javaapplication1' package from combo box (the default package for project) - finish the wizard NewClass is created in javaapplication1 folder byt it has 'package mypackage;' statement in source code. All other new classes have wrong 'package mypackage;' statement in source code.
The most suspicious commit (that I see) is: jtulach: Speeding up processing of FreeMarker thru ScriptEngine and FileObjects by caching Templates for FileObjects [The file was modified] 1.7 libs/freemarker/test/unit/src/org/netbeans/api/templates/ProcessorTest.java [The file was added] 1.1 libs/freemarker/test/unit/src/org/netbeans/api/templates/SpeedTest.java [The file was modified] 1.7 libs/freemarker/src/org/netbeans/libs/freemarker/FreemarkerEngine.java
OK. Thanks for letting me know.
In my case the class does not have package statement at all. Moreover see issue 114189. Might be related.
Checking in src/org/netbeans/libs/freemarker/FreemarkerEngine.java; /shared/data/ccvs/repository/libs/freemarker/src/org/netbeans/libs/freemarker/FreemarkerEngine.java,v <-- FreemarkerEngine.java new revision: 1.8; previous revision: 1.7 done Checking in test/unit/src/org/netbeans/api/templates/ProcessorTest.java; /shared/data/ccvs/repository/libs/freemarker/test/unit/src/org/netbeans/api/templates/ProcessorTest.java,v <-- ProcessorTest.java new revision: 1.8; previous revision: 1.7 d
*** Issue 114331 has been marked as a duplicate of this issue. ***
Verified.