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.

Bug 114193 - Newly created class has wrong package statement
Summary: Newly created class has wrong package statement
Status: VERIFIED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: libs (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jaroslav Tulach
URL: http://deadlock.netbeans.org/hudson/j...
Keywords:
: 114331 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-08-30 08:42 UTC by Jiri Skrivanek
Modified: 2009-09-02 22:16 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2007-08-30 08:42:18 UTC
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.
Comment 1 Jan Lahoda 2007-08-30 08:46:57 UTC
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
Comment 2 Jaroslav Tulach 2007-08-30 09:30:00 UTC
OK. Thanks for letting me know.
Comment 3 Jan Becicka 2007-08-30 10:10:03 UTC
In my case the class does not have package statement at all. Moreover see issue 114189.
Might be related.
Comment 4 Jaroslav Tulach 2007-08-30 16:27:55 UTC
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
Comment 5 Jiri Prox 2007-08-31 10:26:53 UTC
*** Issue 114331 has been marked as a duplicate of this issue. ***
Comment 6 Jiri Skrivanek 2007-09-03 14:28:16 UTC
Verified.