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.
Because the other day I couldn't access to the whole netbeans.org site, I have posted this problem to use.mail.list. Maybe someone have filed it into the Issuezilla for me. If so, just duplicated it please! A embarrassed example: "Puzzle 67: All Strung Out" from [Java™ Puzzlers: Traps, Pitfalls, and Corner Cases]By Joshua Bloch, Neal Gafter. ---------------------------------------------------- public class StrungOut { public static void main(String[] args) { String s = new String("Hello world"); System.out.println(s); } } class String { private final java.lang.String s; public String(java.lang.String s) { this.s = s; } public java.lang.String toString() { return s; } } ------------------------------------------------------------ In Nebeans, trying to Refactor | Rename the 'class String' to 'MyString' , you can see the result. Refactor ought to refactor all occurrences of String but those java.lang.String to MyString, including the 'String[] args' one. BTW. other IDEs could do it correctly. -pprun
The problem is that the classes are in default package. If you put them to any non-default package everything works fine.
Fixed in trunk. Checking in PackageImpScope.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/parser/PackageImpScope.java,v <-- PackageImpScope.java new revision: 1.6; previous revision: 1.5 done
Yep!
Reorganization of java component