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 44718 - Index Out Of Bounds Exception when I Move a Class
Summary: Index Out Of Bounds Exception when I Move a Class
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 4.x
Hardware: PC Other
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks: 44713
  Show dependency tree
 
Reported: 2004-06-10 21:15 UTC by vbrabant
Modified: 2007-04-03 18:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exception (3.03 KB, text/plain)
2004-06-11 10:09 UTC, Marek Grummich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vbrabant 2004-06-10 21:15:58 UTC
I have a Main Class.
I decided to move the class to the default package:
But I do it by using drag and drop via the mouse.
I am positively surpised that Refactoring dialog
box appeared.
Everythings happened correctly.

I run the project, selected the class Main.
Nb recompiled the source and execute it.

Remark the java source file continue to be marked
as uncompiled. Even after a Build Main Project and
Clean and Build Main Project. Strange behaviour.

Remark: the package tiger continue to be present,
but is now empty.

Now, I decided to do inverse operation, but via
the refactoring menu, and not via drag and drop.
And I received the following message:
java.lang.StringIndexOutOfBoundsException: String
index out of range: -1
	at java.lang.String.substring(String.java:1687)
	at
org.netbeans.modules.refactoring.ui.MoveClassUI.getResPackageName(MoveClassUI.java:102)
	at
org.netbeans.modules.refactoring.ui.MoveClassUI.getPanel(MoveClassUI.java:87)
	at
org.netbeans.modules.refactoring.api.ui.ParametersPanel.<init>(ParametersPanel.java:96)
Comment 1 Marek Grummich 2004-06-11 10:08:55 UTC
I am able to reproduce it too - attached exception
Comment 2 Marek Grummich 2004-06-11 10:09:27 UTC
Created attachment 15650 [details]
Exception
Comment 3 Jan Becicka 2004-06-14 14:42:36 UTC
Fixed.

/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java,v
 <--  ResourceImpl.java
new revision: 1.7; previous revision: 1.6
done
Processing log script arguments...
More commits to come...
Checking in
refactoring/src/org/netbeans/modules/refactoring/ui/MoveClassUI.java;
/cvs/refactoring/src/org/netbeans/modules/refactoring/ui/MoveClassUI.java,v
 <--  MoveClassUI.java
new revision: 1.4; previous revision: 1.3
done
Comment 4 Jiri Prox 2005-07-19 12:10:39 UTC
verified