You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "tbw777 (via GitHub)" <gi...@apache.org> on 2023/02/17 17:53:49 UTC

[GitHub] [netbeans] tbw777 opened a new pull request, #5524: Installed some internal generics to be removed some compiler warnings

tbw777 opened a new pull request, #5524:
URL: https://github.com/apache/netbeans/pull/5524

   Only private simple non generic collections was refactored to generics if no out of class usage detected.
   


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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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 pull request #5524: Installed some internal generics to fix some compiler warnings

Posted by "BradWalker (via GitHub)" <gi...@apache.org>.
BradWalker commented on PR #5524:
URL: https://github.com/apache/netbeans/pull/5524#issuecomment-1435478272

   @tbw777 , you need to take a look at the test results. there was failure.
   
   I would by looking at: TestCaseDataFactory.java


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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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 diff in pull request #5524: Installed some internal generics to be removed some compiler warnings

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on code in PR #5524:
URL: https://github.com/apache/netbeans/pull/5524#discussion_r1110227425


##########
ide/editor/demosrc/base/org/netbeans/editor/example/Editor.java:
##########
@@ -544,7 +544,7 @@ private String[] getOpenedFiles() {
             }
         }
 	
-        return (String []) opened.toArray(new String[opened.size()]);
+        return opened.toArray(new String[0]);

Review Comment:
   @BradWalker this might be interesting: https://www.baeldung.com/java-collection-toarray-methods (the variant, that allocates a zero sized array wins)



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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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 pull request #5524: Installed some internal generics to fix some compiler warnings

Posted by "BradWalker (via GitHub)" <gi...@apache.org>.
BradWalker commented on PR #5524:
URL: https://github.com/apache/netbeans/pull/5524#issuecomment-1435778821

   Hey @mbien , could you check the tests for me.. I'm unclear why Just the Profiler checks ran and not everything else. I would like to better understand this.


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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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 diff in pull request #5524: Installed some internal generics to be removed some compiler warnings

Posted by "BradWalker (via GitHub)" <gi...@apache.org>.
BradWalker commented on code in PR #5524:
URL: https://github.com/apache/netbeans/pull/5524#discussion_r1110222572


##########
ide/editor/demosrc/base/org/netbeans/editor/example/Editor.java:
##########
@@ -544,7 +544,7 @@ private String[] getOpenedFiles() {
             }
         }
 	
-        return (String []) opened.toArray(new String[opened.size()]);
+        return opened.toArray(new String[0]);

Review Comment:
   > toArray() method have autosize operation on jvm side. You can check inside.
   
   Sure it does.. But, the writer of the software expressly requested a pre-allocated String as an argument. This changes the intent of that work. Also, I don't really like to think about the internals. I like to think about what the author wanted done, which in this case is to expressly pre-allocate a String.
   
   I would get rid of the cast and nothing more.



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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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 pull request #5524: Installed some internal generics to fix some compiler warnings

Posted by "BradWalker (via GitHub)" <gi...@apache.org>.
BradWalker commented on PR #5524:
URL: https://github.com/apache/netbeans/pull/5524#issuecomment-1435809448

   Mistake on my part..


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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #5524: Installed some internal generics to be removed some compiler warnings

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #5524:
URL: https://github.com/apache/netbeans/pull/5524#discussion_r1110239288


##########
ide/editor/demosrc/base/org/netbeans/editor/example/Editor.java:
##########
@@ -544,7 +544,7 @@ private String[] getOpenedFiles() {
             }
         }
 	
-        return (String []) opened.toArray(new String[opened.size()]);
+        return opened.toArray(new String[0]);

Review Comment:
   @BradWalker this old PR has also some info about that "false friend": 3166



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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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 closed pull request #5524: Installed some internal generics to fix some compiler warnings

Posted by "BradWalker (via GitHub)" <gi...@apache.org>.
BradWalker closed pull request #5524: Installed some internal generics to fix some compiler warnings
URL: https://github.com/apache/netbeans/pull/5524


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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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] mbien commented on a diff in pull request #5524: Installed some internal generics to be removed some compiler warnings

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #5524:
URL: https://github.com/apache/netbeans/pull/5524#discussion_r1110239288


##########
ide/editor/demosrc/base/org/netbeans/editor/example/Editor.java:
##########
@@ -544,7 +544,7 @@ private String[] getOpenedFiles() {
             }
         }
 	
-        return (String []) opened.toArray(new String[opened.size()]);
+        return opened.toArray(new String[0]);

Review Comment:
   @BradWalker this old PR has also some info about that "false friend": 3166
   esp shipilev's blog entry is worth checking out for all the details



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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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] tbw777 commented on pull request #5524: Installed some internal generics to fix some compiler warnings

Posted by "tbw777 (via GitHub)" <gi...@apache.org>.
tbw777 commented on PR #5524:
URL: https://github.com/apache/netbeans/pull/5524#issuecomment-1447938553

   @BradWalker only for you


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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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 pull request #5524: Installed some internal generics to fix some compiler warnings

Posted by "BradWalker (via GitHub)" <gi...@apache.org>.
BradWalker commented on PR #5524:
URL: https://github.com/apache/netbeans/pull/5524#issuecomment-1435776319

   I reopened this because I did some work on it and I would like to see it get integrated. I understand people might get frustrated with the fact that we can't "keep up" with the volume of PRs being received. But, that's just how the world is sometimes.


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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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] tbw777 commented on a diff in pull request #5524: Installed some internal generics to be removed some compiler warnings

Posted by "tbw777 (via GitHub)" <gi...@apache.org>.
tbw777 commented on code in PR #5524:
URL: https://github.com/apache/netbeans/pull/5524#discussion_r1110216961


##########
ide/editor/demosrc/base/org/netbeans/editor/example/Editor.java:
##########
@@ -544,7 +544,7 @@ private String[] getOpenedFiles() {
             }
         }
 	
-        return (String []) opened.toArray(new String[opened.size()]);
+        return opened.toArray(new String[0]);

Review Comment:
   toArray() method have autosize operation on jvm side. You can check inside.



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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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 diff in pull request #5524: Installed some internal generics to be removed some compiler warnings

Posted by "BradWalker (via GitHub)" <gi...@apache.org>.
BradWalker commented on code in PR #5524:
URL: https://github.com/apache/netbeans/pull/5524#discussion_r1110205467


##########
ide/editor/demosrc/base/org/netbeans/editor/example/Editor.java:
##########
@@ -544,7 +544,7 @@ private String[] getOpenedFiles() {
             }
         }
 	
-        return (String []) opened.toArray(new String[opened.size()]);
+        return opened.toArray(new String[0]);

Review Comment:
   Shouldn't this be String[opened.size()] that way things are pre-allocated?



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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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 diff in pull request #5524: Installed some internal generics to be removed some compiler warnings

Posted by "BradWalker (via GitHub)" <gi...@apache.org>.
BradWalker commented on code in PR #5524:
URL: https://github.com/apache/netbeans/pull/5524#discussion_r1110243145


##########
ide/editor/demosrc/base/org/netbeans/editor/example/Editor.java:
##########
@@ -544,7 +544,7 @@ private String[] getOpenedFiles() {
             }
         }
 	
-        return (String []) opened.toArray(new String[opened.size()]);
+        return opened.toArray(new String[0]);

Review Comment:
   > @BradWalker this might be interesting: https://www.baeldung.com/java-collection-toarray-methods (the variant, that allocates a zero sized array wins)
   
   I agree.. Generally, I don't like changing code an author expressly implemented. But, it's really a minor nit in this case. So I'll just defer on this one..



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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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] tbw777 closed pull request #5524: Installed some internal generics to fix some compiler warnings

Posted by "tbw777 (via GitHub)" <gi...@apache.org>.
tbw777 closed pull request #5524: Installed some internal generics to fix some compiler warnings
URL: https://github.com/apache/netbeans/pull/5524


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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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