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 44015 - Exception while changing package declaration
Summary: Exception while changing package declaration
Status: RESOLVED DUPLICATE of bug 43658
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-30 14:12 UTC by _ tboudreau
Modified: 2007-09-26 09:14 UTC (History)
0 users

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 _ tboudreau 2004-05-30 14:12:35 UTC
I created a class dshadow.RoundGradientPaint.  Then I select-
all/copied the content of the java file from another file, where it 
was declared in the default package.  So I pasted in code with 
the right class name, but no package declaration.

When I added "package dshadow" at the top of the file, the 
following exception popped up (and continued popping up):

Annotation: Parser error
org.openide.src.SourceException: Invalid full name 
dshadow.RoundGradientPaint/RoundGradientPaint my name = 
RoundGradientPaint/RoundGradientPaint
	at 
org.netbeans.modules.java.model.ClassElementImpl.doSetName(
ClassElementImpl.java:719)
	at 
org.netbeans.modules.java.model.MemberElementImpl.setName(
MemberElementImpl.java:267)
	at 
org.netbeans.modules.java.parser.BaseElementInfo.updateBase(B
aseElementInfo.java:162)
	at 
org.netbeans.modules.java.parser.ClassInfo.updateElement(Clas
sInfo.java:120)
	at 
org.netbeans.modules.java.parser.ChildCollection.updateChildre
n(ChildCollection.java:107)
	at 
org.netbeans.modules.java.parser.SourceInfo.updateModel(Sourc
eInfo.java:114)
	at 
org.netbeans.modules.java.parser.ParsingSupport.updateSource
Model(ParsingSupport.java:500)
	at 
org.netbeans.modules.java.parser.ParsingSupport.access$300(Pa
rsingSupport.java:70)
	at 
org.netbeans.modules.java.parser.ParsingSupport$Processor.up
dateModel(ParsingSupport.java:641)
	at 
org.netbeans.modules.java.parser.ParsingSupport$Processor.run
(ParsingSupport.java:597)
	at 
org.netbeans.modules.java.model.DefaultLangModel.runUpdate(
DefaultLangModel.java:500)
	at 
org.netbeans.modules.java.parser.ParsingSupport$Processor.par
seLockModel(ParsingSupport.java:668)
	at 
org.netbeans.modules.java.parser.ParsingSupport$Processor.run
(ParsingSupport.java:594)
	at org.openide.util.Task.run(Task.java:136)
	at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.ja
va:330)
[catch] at 
org.openide.util.RequestProcessor$Processor.run(RequestProces
sor.java:686)
==>
Comment 1 _ tboudreau 2004-05-30 14:15:52 UTC
Correction - I also pasted the wrong sources into the file.  So I had sources for 
"RoundGradientPaint" in a file called "RoundGradientContext" which I was changing the 
package statement for.
Comment 2 psuk 2004-07-19 17:20:00 UTC
Copying description to Issue 43658 and closing this one as duplicate

*** This issue has been marked as a duplicate of 43658 ***
Comment 3 Quality Engineering 2007-09-20 10:49:26 UTC
Reorganization of java component