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 2022/06/29 12:07:13 UTC

[GitHub] [netbeans] BradWalker opened a new pull request, #4297: Cleanup references to the generic emptySet()..

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

   Cleanup references to the generic emptySet()..
   
      [repeat] /home/bwalker/src/netbeans/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFConfigUtilities.java:250: warning: [rawtypes] found raw type: Set
      [repeat]         Set result = Collections.emptySet();
      [repeat]         ^
      [repeat]   missing type arguments for generic class Set<E>
      [repeat]   where E is a type-variable:
      [repeat]     E extends Object declared in interface Set
   
   
   
   
   
   ---
   **^Add meaningful description above**
   
   By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -
   
    - are all your own work, and you have the right to contribute them.
    - are contributed solely under the terms and conditions of the Apache License 2.0 (see section 5 of the license for more information).
   
   Please make sure (eg. `git log`) that all commits have a valid name and email address for you in the Author field.
   
   If you're a first time contributor, see the Contributing guidelines for more information.
   
   


-- 
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 #4297: Cleanup references to the generic emptySet()..

Posted by GitBox <gi...@apache.org>.
BradWalker commented on code in PR #4297:
URL: https://github.com/apache/netbeans/pull/4297#discussion_r910562886


##########
apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/ExamineManifest.java:
##########
@@ -51,7 +51,7 @@ public class ExamineManifest  {
     private String locBundle;
     private boolean publicPackages;
     private boolean populateDependencies = false;
-    private List dependencyTokens = Collections.emptyList();
+    private List<String> dependencyTokens = Collections.<String>emptyList();

Review Comment:
   Ugg! Right you are..
   
   I'll work on it..



-- 
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 #4297: Cleanup references to the generic emptySet()..

Posted by GitBox <gi...@apache.org>.
BradWalker commented on code in PR #4297:
URL: https://github.com/apache/netbeans/pull/4297#discussion_r910562886


##########
apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/ExamineManifest.java:
##########
@@ -51,7 +51,7 @@ public class ExamineManifest  {
     private String locBundle;
     private boolean publicPackages;
     private boolean populateDependencies = false;
-    private List dependencyTokens = Collections.emptyList();
+    private List<String> dependencyTokens = Collections.<String>emptyList();

Review Comment:
   Hey @mbien , ugg! Right you are..
   
   I'll work on it..



-- 
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 merged pull request #4297: Cleanup references to the generic emptySet()..

Posted by GitBox <gi...@apache.org>.
BradWalker merged PR #4297:
URL: https://github.com/apache/netbeans/pull/4297


-- 
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 #4297: Cleanup references to the generic emptySet()..

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4297:
URL: https://github.com/apache/netbeans/pull/4297#discussion_r910543314


##########
apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/ExamineManifest.java:
##########
@@ -51,7 +51,7 @@ public class ExamineManifest  {
     private String locBundle;
     private boolean publicPackages;
     private boolean populateDependencies = false;
-    private List dependencyTokens = Collections.emptyList();
+    private List<String> dependencyTokens = Collections.<String>emptyList();

Review Comment:
   no you don't understand. you don't have to specify the generic type at all.
   
   `private List<String> dependencyTokens = Collections.emptyList();`
   
   since you already merged, please clean it up in follow up PRs because specifying generic types for methods is only needed for edge cases, like in lambdas, but not for simple declarations like 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] mbien commented on a diff in pull request #4297: Cleanup references to the generic emptySet()..

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4297:
URL: https://github.com/apache/netbeans/pull/4297#discussion_r910426498


##########
apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/ExamineManifest.java:
##########
@@ -51,7 +51,7 @@ public class ExamineManifest  {
     private String locBundle;
     private boolean publicPackages;
     private boolean populateDependencies = false;
-    private List dependencyTokens = Collections.emptyList();
+    private List<String> dependencyTokens = Collections.<String>emptyList();

Review Comment:
   I don't think the generic type passed to the method on the right side is needed. It would be only needed if the compiler can't infer the type in some edge cases. Try without first unless there is a warning (same for the other occurences).



-- 
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 #4297: Cleanup references to the generic emptySet()..

Posted by GitBox <gi...@apache.org>.
BradWalker commented on code in PR #4297:
URL: https://github.com/apache/netbeans/pull/4297#discussion_r910539108


##########
apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/ExamineManifest.java:
##########
@@ -51,7 +51,7 @@ public class ExamineManifest  {
     private String locBundle;
     private boolean publicPackages;
     private boolean populateDependencies = false;
-    private List dependencyTokens = Collections.emptyList();
+    private List<String> dependencyTokens = Collections.<String>emptyList();

Review Comment:
   Hey @mbien , I thought I had tried doing just that.. But, couldn't remember.. When I do this work, I try to go as fast as possible, so sometimes I do forget.
   
   But, here is the error that I get.. So I guess it's not possible.
   
   ```
      [depend] Deleted 2 out of date files in 0 seconds
    [nb-javac] Compiling 2 source files to /home/bwalker/src/netbeans/apisupport/maven.apisupport/build/classes
      [repeat] /home/bwalker/src/netbeans/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/ExamineManifest.java:54: error: illegal start of type
      [repeat]     private List<String> dependencyTokens = Collections.<>emptyList();
      [repeat]                                                          ^
      [repeat] 1 error
     [nbmerge] Failed to build target: all-maven.apisupport
   ```
   



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