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 186473 - AssertionError: ERRONEOUS com.sun.tools.javac.tree.JCTree$JCErroneous
Summary: AssertionError: ERRONEOUS com.sun.tools.javac.tree.JCTree$JCErroneous
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on: 242298
Blocks:
  Show dependency tree
 
Reported: 2010-05-21 07:37 UTC by peterhull90
Modified: 2014-08-18 07:55 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 148750


Attachments
stacktrace (5.07 KB, text/plain)
2010-05-21 07:37 UTC, peterhull90
Details
stacktrace (6.59 KB, text/plain)
2012-10-19 13:02 UTC, Marian Mirilovic
Details
stacktrace (5.24 KB, text/plain)
2013-03-24 19:33 UTC, dlhartveld
Details
stacktrace (5.36 KB, text/plain)
2013-06-05 01:58 UTC, janario
Details

Note You need to log in before you can comment on or make changes to this bug.
Description peterhull90 2010-05-21 07:37:28 UTC
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)
Comment 1 peterhull90 2010-05-21 07:37:32 UTC
Created attachment 99288 [details]
stacktrace
Comment 2 peterhull90 2010-05-21 08:24:29 UTC
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.
Comment 3 Marian Mirilovic 2012-10-19 13:01:57 UTC
reproducible in NB 7.2.1
Comment 4 Marian Mirilovic 2012-10-19 13:02:17 UTC
Created attachment 126191 [details]
stacktrace
Comment 5 dlhartveld 2013-03-24 19:33:42 UTC
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).
Comment 6 janario 2013-06-05 01:58:27 UTC
Created attachment 135353 [details]
stacktrace

Refactoring
Comment 7 Svata Dedic 2014-08-18 07:55:42 UTC
Fixed as part of issue #242298