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 269666 - IllegalArgumentException: org.netbeans.modules.java.source.save.ElementOverlay$TypeElementWrapper@40364fe0
Summary: IllegalArgumentException: org.netbeans.modules.java.source.save.ElementOverla...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: Dev
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-27 10:23 UTC by akobberup
Modified: 2017-02-04 03:00 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 227845


Attachments
stacktrace (8.50 KB, text/plain)
2017-01-27 10:24 UTC, akobberup
Details
stacktrace (4.66 KB, text/plain)
2017-01-27 20:50 UTC, Jesse Glick
Details
stacktrace (4.66 KB, text/plain)
2017-01-27 20:56 UTC, Jesse Glick
Details
stacktrace (7.75 KB, text/plain)
2017-02-01 11:24 UTC, brettryan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description akobberup 2017-01-27 10:23:59 UTC
Build: NetBeans IDE Dev (Build nbms-and-javadoc-737-on-20170126)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.121-b13, Java(TM) SE Runtime Environment, 1.8.0_121-b13
OS: Windows 10

User Comments:
akobberup: Used the hint "implement interface"




Stacktrace: 
java.lang.IllegalArgumentException: org.netbeans.modules.java.source.save.ElementOverlay$TypeElementWrapper@40364fe0
   at com.sun.tools.javac.model.JavacElements.cast(JavacElements.java:834)
   at com.sun.tools.javac.model.JavacElements.getModuleOf(JavacElements.java:478)
   at org.netbeans.modules.java.source.save.ElementOverlay.wrap(ElementOverlay.java:373)
   at org.netbeans.modules.java.source.pretty.ImportAnalysis2.resolveImport(ImportAnalysis2.java:378)
   at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.visitMemberSelect(ImmutableTreeTranslator.java:499)
   at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.visitMemberSelect(ImmutableTreeTranslator.java:98)
Comment 1 akobberup 2017-01-27 10:24:01 UTC
Created attachment 163485 [details]
stacktrace
Comment 2 Jesse Glick 2017-01-27 20:50:44 UTC
Created attachment 163490 [details]
stacktrace

Trying to assign the return value of a method to a variable using the hint.
Comment 3 Jesse Glick 2017-01-27 20:56:43 UTC
Created attachment 163491 [details]
stacktrace

Assign expr to var hint.
Comment 4 brettryan 2017-02-01 11:24:22 UTC
Created attachment 163532 [details]
stacktrace

Attempting to create method using hints.
Comment 5 Dusan Balek 2017-02-02 12:01:11 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/e077859dc34a
Comment 6 Quality Engineering 2017-02-04 03:00:44 UTC
Integrated into 'main-silver', will be available in build *201702040002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e077859dc34a
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #269666 - IllegalArgumentException: org.netbeans.modules.java.source.save.ElementOverlay$TypeElementWrapper - fixed.