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 21763 - Package declarations is not updated after folder rename
Summary: Package declarations is not updated after folder rename
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC All
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-21 08:41 UTC by _ rkubacki
Modified: 2007-09-26 09:14 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 _ rkubacki 2002-03-21 08:41:39 UTC
Following steps works in NB3.3 (or Orion) but don't work in trunk builds.
Create Folder or Java package in some filesystem and a Java class in this
folder. Then rename the folder/package. Very likely you will not get
notification that the package declaration in Java source(s) ought to be updated.
The probability of bad behaviour is higher if you do it in web module (under
WEB-INF/classes folder) or use VCS controlled FS.
Comment 1 Jan Becicka 2002-03-22 12:42:59 UTC
I can reproduce it ONLY in WEB-INF/classes folder.
Radim, are you able to reproduce this bug in regular package?
Comment 2 _ rkubacki 2002-03-22 13:17:22 UTC
Yes, I am. Not always but often. Also Jirka has the same experience
Comment 3 Svata Dedic 2002-03-22 13:30:21 UTC
Please verify that all the parent folders' names are valid Java
identifiers and also that the new name is a valid identifier. If not,
then no dialog or renaming occurs.
There was a change made because of a issue that package statement is
changed to something weird if the user renames some parent directory
to e.g. "foo bar".
If the parent names are invalid before the change, no dialog will be
shown. If the new name is invalid, a warning is issued.
Comment 4 Svata Dedic 2002-03-22 13:34:59 UTC
And because of my laziness, the valid-name-check seems to fail on all
first-level packages. so there IS a bug indeed :-)
Comment 5 Svata Dedic 2002-03-22 13:54:17 UTC
/cvs/java/src/org/netbeans/modules/java/PackageHandler.java,v  <-- 
PackageHandler.java
new revision: 1.3; previous revision: 1.2
Comment 6 Jan Becicka 2002-06-12 09:20:52 UTC
VERIFIED
Comment 7 Quality Engineering 2003-07-01 13:14:35 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.