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 49220 - Exceptions thrown while trying to rename a class
Summary: Exceptions thrown while trying to rename a class
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-17 20:18 UTC by Jesse Glick
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack traces (23.65 KB, text/plain)
2004-09-17 20:19 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-09-17 20:18:56 UTC
040915 custom. Selected a new class I had just
started to write (put caret on class decl) and
selected Refact -> Rename and chose a new name.
Got a bunch of exceptions. "Refactoring" window
appeared after the dialog was closed nonetheless.

The class was called ArtifactQuery (in
ant/freeform) and I was renaming it to
ArtifactProvider. Of interest: FreeformProject
(same module) had a reference to it:

   ...new ArtifactQuery(this)...

which should be valid (there is such a
constructor) but which is nonetheless marked with
an error in the editor (this is true before I
tried the refactoring):

"Cannot find symbol
Symbol:
ArtifactQuery(org.netbeans.modules.ant.freeform.FreeformProject)
Location:
org.netbeans.modules.ant.freeform.ArtifactQuery"

Not sure why. I had recently compiled the module
(to run a unit test) but before writing
ArtifactQuery or modifying FreeformProject to
refer to it.

The refactoring window did not offer to change
this reference.

After accepting the refactoring, making
ArtifactProvider compilable (but not compiling
it), and updating FreeformProject, the error
annotation disappears.
Comment 1 Jesse Glick 2004-09-17 20:19:55 UTC
Created attachment 17719 [details]
Stack traces
Comment 2 Jan Becicka 2004-09-21 14:50:21 UTC
Several exceptions from javacore thrown
----
java.lang.Exception: Inconsistent storage - persistent children
collection not empty although parent says it has not been persisted
yet. Removing old children...
----
java.lang.Exception: Class not found in index:
org.openide.filesystems.FileUtil.NonCanonicalizingFile. Recovering...
----
java.util.EmptyStackException
	at java.util.Stack.peek(Stack.java:79)
	at java.util.Stack.pop(Stack.java:61)
	at
org.netbeans.modules.javacore.parser.MDRParser.enterBody(MDRParser.java:185)
Comment 3 Jan Becicka 2004-10-20 09:38:59 UTC
This issue was probably already fixed. Martin did many improvements in
up-to-date checking and mdr consistency. I cannot reproduce it any
more. Jesse can you reproduce it?
Comment 4 Jesse Glick 2004-10-20 19:47:57 UTC
I don't think I could reproduce it to begin with... if you don't see
anything else to fix, presumably could be marked fixed. Of course if I
see such problems again I will file new bug reports.
Comment 5 Jan Becicka 2004-10-22 16:35:09 UTC
"Inconsitent storage" was fixed.
Class not found was also fixed.
Empty stack is probably consequence of previos Exceptions.

Closing as fixed.
Comment 6 Quality Engineering 2007-09-20 09:44:39 UTC
Reorganization of java component