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 2020/10/21 03:18:56 UTC

[GitHub] [netbeans] BradWalker opened a new pull request #2475: [NETBEANS-4925] - cleanup Map raw type warnings..

BradWalker opened a new pull request #2475:
URL: https://github.com/apache/netbeans/pull/2475


   Hey, it's me again.. The Netbeans Rust Remover..
   
   There are a bunch of warnings related to raw type usage of the Map interface..
   
      [repeat] /home/bwalker/src/netbeans/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/support/SourceGroupSupport.java:170: warning: [rawtypes] found raw type: Map
      [repeat]         Map result;
      [repeat]         ^
      [repeat]   missing type arguments for generic class Map<K,V>
      [repeat]   where K,V are type-variables:
      [repeat]     K extends Object declared in interface Map
      [repeat]     V extends Object declared in interface Map
   
   This change cleans some of this up..


----------------------------------------------------------------
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



---------------------------------------------------------------------
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


[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #2475: [NETBEANS-4925] - cleanup Map raw type warnings..

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #2475:
URL: https://github.com/apache/netbeans/pull/2475#discussion_r511583957



##########
File path: java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/SchemaElementImpl.java
##########
@@ -592,18 +592,18 @@ private void initViews(ConnectionProvider cp, LinkedList views, DDLBridge bridge
                                     rset = bridge.getDriverSpecification().getRow();
                                     
                                     //test references between two schemas
-                                    c1 = (String) rset.get(new Integer(1));
-                                    s1 = (String) rset.get(new Integer(2));
-                                    c2 = (String) rset.get(new Integer(5));
-                                    s2 = (String) rset.get(new Integer(6));
+                                    c1 = rset.get(new Integer(1));

Review comment:
       If we do we'll have a bigger problem. The primitive wrapper constructors will go away (they are deprecated for removal), so we need to get rid of them.
   
   To my knowledge there is only one valid reason to use the constructors: You want an object, that you can synchronize on, that is not shared with others. But that is also flawed and will break in the future, when the primitive wrappers will be turned into value base objects, that don't have identity and don't hold a monitor.
   
   TL;DR: `c1 = rset.get(new Integer(1));` should be `c1 = rset.get(1);`
   
   But that might be worth fixing in another iteration.




----------------------------------------------------------------
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



---------------------------------------------------------------------
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


[GitHub] [netbeans] lkishalmi commented on a change in pull request #2475: [NETBEANS-4925] - cleanup Map raw type warnings..

Posted by GitBox <gi...@apache.org>.
lkishalmi commented on a change in pull request #2475:
URL: https://github.com/apache/netbeans/pull/2475#discussion_r510469694



##########
File path: java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/SchemaElementImpl.java
##########
@@ -592,18 +592,18 @@ private void initViews(ConnectionProvider cp, LinkedList views, DDLBridge bridge
                                     rset = bridge.getDriverSpecification().getRow();
                                     
                                     //test references between two schemas
-                                    c1 = (String) rset.get(new Integer(1));
-                                    s1 = (String) rset.get(new Integer(2));
-                                    c2 = (String) rset.get(new Integer(5));
-                                    s2 = (String) rset.get(new Integer(6));
+                                    c1 = rset.get(new Integer(1));

Review comment:
       Do we really need the new Integer() here?




----------------------------------------------------------------
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



---------------------------------------------------------------------
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


[GitHub] [netbeans] lkishalmi merged pull request #2475: [NETBEANS-4925] - cleanup Map raw type warnings..

Posted by GitBox <gi...@apache.org>.
lkishalmi merged pull request #2475:
URL: https://github.com/apache/netbeans/pull/2475


   


----------------------------------------------------------------
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



---------------------------------------------------------------------
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


[GitHub] [netbeans] BradWalker commented on a change in pull request #2475: [NETBEANS-4925] - cleanup Map raw type warnings..

Posted by GitBox <gi...@apache.org>.
BradWalker commented on a change in pull request #2475:
URL: https://github.com/apache/netbeans/pull/2475#discussion_r524461992



##########
File path: java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/SchemaElementImpl.java
##########
@@ -592,18 +592,18 @@ private void initViews(ConnectionProvider cp, LinkedList views, DDLBridge bridge
                                     rset = bridge.getDriverSpecification().getRow();
                                     
                                     //test references between two schemas
-                                    c1 = (String) rset.get(new Integer(1));
-                                    s1 = (String) rset.get(new Integer(2));
-                                    c2 = (String) rset.get(new Integer(5));
-                                    s2 = (String) rset.get(new Integer(6));
+                                    c1 = rset.get(new Integer(1));

Review comment:
       Just wanted to respond for completeness sake, but it would be reasonable to change like @matthiasblaesing  says. But, I didn't want to "confuse" or "cloud" the issue as I'm really trying to just reduce the warning messages here..
   
   I'll pick that up for another change request..
   
   BTW, thanks to @lkishalmi  for committing the change!




----------------------------------------------------------------
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



---------------------------------------------------------------------
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


[GitHub] [netbeans] lkishalmi commented on a change in pull request #2475: [NETBEANS-4925] - cleanup Map raw type warnings..

Posted by GitBox <gi...@apache.org>.
lkishalmi commented on a change in pull request #2475:
URL: https://github.com/apache/netbeans/pull/2475#discussion_r512229222



##########
File path: java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/SchemaElementImpl.java
##########
@@ -592,18 +592,18 @@ private void initViews(ConnectionProvider cp, LinkedList views, DDLBridge bridge
                                     rset = bridge.getDriverSpecification().getRow();
                                     
                                     //test references between two schemas
-                                    c1 = (String) rset.get(new Integer(1));
-                                    s1 = (String) rset.get(new Integer(2));
-                                    c2 = (String) rset.get(new Integer(5));
-                                    s2 = (String) rset.get(new Integer(6));
+                                    c1 = rset.get(new Integer(1));

Review comment:
       Ok, then let's have this in.
   I've checked the code there are more than 5000 instances of new Integer, there also there are a few Long-s, Byte, Short-s and Chars as well. So that would be probably a few additional PR-s




----------------------------------------------------------------
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



---------------------------------------------------------------------
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