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/08/19 20:02:40 UTC

[GitHub] [netbeans] BradWalker commented on issue #1385: Cleanup raw class type

BradWalker commented on issue #1385: Cleanup raw class type
URL: https://github.com/apache/netbeans/pull/1385#issuecomment-522731901
 
 
   I understand and mostly agree with your assessment about this change. Let's take this piece of code for discussion before my change:
   
   `Class clazz = cl.loadClass("org.jboss.as.controller.client.helpers.Operations");`
   
   So what Netbeans is doing is loading a Class and removing the type information by setting it to a raw type. 
   
   My change simply maintains that type information. I know it's a pretty generic statement. But, the Java Language Standard, sec. 4.8 says the following:
   
   > The use of raw types is allowed only as a concession to compatibility of legacy code. The use of raw types in code written after the introduction of generics into the Java programming language is strongly discouraged. It is possible that future versions of the Java programming language will disallow the use of raw types. 
   
   Why does this code exist? My rookie opinion is this code is "old" and therefore was never designed to work with generics in the first place. 
   
   Also, given the limited resources I'm not sure things like this will ever be fixed properly. There are simply more pressing needs.
   
   As we fix more of these raw type errors, it should make us more diligent in terms of creating better code.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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