You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/01/12 03:52:12 UTC

[GitHub] jeffreymorlan opened a new pull request #1084: [NETBEANS-1781] Fix ClassCastException viewing .class files w/ newer javac

jeffreymorlan opened a new pull request #1084: [NETBEANS-1781] Fix ClassCastException viewing .class files w/ newer javac
URL: https://github.com/apache/incubator-netbeans/pull/1084
 
 
   In JDK 11's javac and nb-javac 1.51, an unresolvable ClassType now has a getKind() of TypeKind.ERROR: http://hg.openjdk.java.net/jdk/jdk/rev/cc2673fa8c20#l9.1
   
   This causes NetBeans's TreeFactory to throw a ClassCastException because it tries to cast to ErrorType.
   
   The type should be formatted the same as a declared class (qualified name with type arguments).
   
   The TypeKind.ERROR case was originally added for generating getters and setters of members whose class name isn't imported yet. https://netbeans.org/bugzilla/show_bug.cgi?id=112164 However, the TypeKind.DECLARED code works just as well for that purpose.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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