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.
Build: NetBeans IDE 6.8 (Build 200912041610) VM: Java HotSpot(TM) Client VM, 16.0-b13, Java(TM) SE Runtime Environment, 1.6.0_18-b07 OS: Windows XP User Comments: peterhull90: Doing a refactor Introduce Variable... Stacktrace: java.lang.AssertionError: ERRONEOUS com.sun.tools.javac.tree.JCTree$JCErroneous at org.netbeans.modules.java.source.save.CasualDiff.treesMatch(CasualDiff.java:1911) at org.netbeans.modules.java.source.save.CasualDiff.treesMatch(CasualDiff.java:1759) at org.netbeans.modules.java.source.save.CasualDiff.listsMatch(CasualDiff.java:3150) at org.netbeans.modules.java.source.save.CasualDiff.diffApply(CasualDiff.java:1204) at org.netbeans.modules.java.source.save.CasualDiff.diffTreeImpl(CasualDiff.java:2966) at org.netbeans.modules.java.source.save.CasualDiff.diffTree(CasualDiff.java:2847)
Created attachment 99288 [details] stacktrace
This is a simplified version of the code I was editing and also gives the same exception (I think): public class NewClass { void f() { int s = g(new String, 1); } int g(String s, int i) { return -1; } } 1. Highlight 'new String' 2. Select Refactor|Introduce variable... 3. See the exception report Obviously the code is wrong, as the () are missing after String (and the IDE highlights this) but it probably should not give an exception like this.
reproducible in NB 7.2.1
Created attachment 126191 [details] stacktrace
Created attachment 133008 [details] stacktrace Tried to refactor-move a field and two methods to another class. Note that these methods did not contain a lambda expression (but the rest of the class does contain several in statements in other methods).
Created attachment 135353 [details] stacktrace Refactoring
Fixed as part of issue #242298