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.
NetBeans IDE Dev (Build 200702182300) 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105 Linux version 2.6.5-1.358 running on i386 en_US (nb); UTF-8 The usage is not renamed when renaming class and there is static import of element of this class. Steps to reproduce: 1) have two classes (in separate files, same package) package pack; public class MyTest { public static void method() {} } package pack; import static pack.MyTest.*; public class User { public void test(MyTest tt) { method(); } } 2) rename class MyTest -> the MyTest in argument of method test is not updated, IOE in console java.io.IOException: invalid offset: 183 at org.netbeans.modules.java.source.engine.SourceReader.getCharsTo(SourceReader.java:58) at org.netbeans.api.java.source.WorkingCopy$WorkingCopyContext$Rewriter.copyTo(WorkingCopy.java:278) at org.netbeans.modules.java.source.save.Commit.commit(Commit.java:334)
Created attachment 38684 [details] full stacktrace
Happens with regular import as well. -> P2
The exception reported shouldn't be reproducible anymore, that was fixed recently. Unfortunately usage was not found and that is the reason why it does not work I think.
Generator test added to check that generator supports rename in import: See ImportsTest: testRenameIdentifier and testRenameIdentifier2 Checking in unit/src/org/netbeans/api/java/source/gen/ImportsTest.java; /cvs/java/source/test/unit/src/org/netbeans/api/java/source/gen/ImportsTest.java,v <-- ImportsTest.java new revision: 1.15; previous revision: 1.14 done
*** This issue has been marked as a duplicate of 90769 ***
v.