[ 
https://issues.apache.org/jira/browse/NETBEANS-1781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeffrey Morlan closed NETBEANS-1781.
------------------------------------
    Resolution: Duplicate

> can't open classes in binary .jar (java.lang.ClassCastException: 
> com.sun.tools.javac.code.Type$ClassType cannot be cast to 
> com.sun.tools.javac.code.Type$ErrorType)
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: NETBEANS-1781
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-1781
>             Project: NetBeans
>          Issue Type: Bug
>          Components: java - Source
>    Affects Versions: 10.0
>            Reporter: Jeffrey Morlan
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> After updating to nb-javac 1.51, when I try to open a class in a binary .jar 
> file, it often fails with an exception like this
> java.lang.ClassCastException: com.sun.tools.javac.code.Type$ClassType cannot 
> be cast to com.sun.tools.javac.code.Type$ErrorType
>      at 
> org.netbeans.modules.java.source.builder.TreeFactory.Type(TreeFactory.java:797)
>      at org.netbeans.api.java.source.TreeMaker.Type(TreeMaker.java:1083)
>      at 
> org.netbeans.modules.java.classfile.CodeGenerator$TreeBuilder.visitExecutable(CodeGenerator.java:549)
>      ...
> This happens whenever the class references a class in a different .jar. For 
> example, create a maven project, add org.apache.httpcomponents:httpclient 
> (but don't download source!) and open the HttpClient class - it fails because 
> of the various classes referenced from the httpcore dependency.
> It looks like this started once 
> [http://hg.openjdk.java.net/jdk/jdk/rev/cc2673fa8c20|http://hg.openjdk.java.net/jdk/jdk/rev/cc2673fa8c20#l9.1]
>  was merged into nb-javac - TreeFactory's assumption that getKind()==ERROR 
> implies ErrorType is no longer true.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to