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/22 02:46:32 UTC
[GitHub] [netbeans] BradWalker opened a new pull request, #4265: Cleanup warnings related to raw type List
BradWalker opened a new pull request, #4265:
URL: https://github.com/apache/netbeans/pull/4265
Cleanup warnings related to unchecked call to add as a member of raw type List..
Here is an example.
[repeat] /home/bwalker/src/netbeans/ide/editor/src/org/netbeans/modules/editor/NbEditorKit.java:628: warning: [unchecked] unchecked call to add(E) as a member of the raw type List
[repeat] objects.add(null);
[repeat] ^
[repeat] where E is a type-variable:
[repeat] E extends Object declared in interface List
There are some remaining warnings. They are in generated code and therefore difficult to fix.
---
**^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] lbownik commented on a diff in pull request #4265: Cleanup warnings related to raw type List
Posted by GitBox <gi...@apache.org>.
lbownik commented on code in PR #4265:
URL: https://github.com/apache/netbeans/pull/4265#discussion_r922622371
##########
enterprise/websvc.jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/wsdlmodel/WsdlPort.java:
##########
@@ -45,7 +47,7 @@ public class WsdlPort implements WSPort {
}
public List<WsdlOperation> getOperations() {
- List wsdlOperations = new ArrayList();
+ List<WsdlOperation> wsdlOperations = new ArrayList<>();
Review Comment:
How about rewriting this funtion to
public List<WsdlOperation> getOperations() {
if(port == null) {
return emptyList();
} else {
return port.getOperations().stream().map(WdslOperation::new).collect(toList());
}
--
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 #4265: Cleanup warnings related to raw type List
Posted by GitBox <gi...@apache.org>.
BradWalker commented on code in PR #4265:
URL: https://github.com/apache/netbeans/pull/4265#discussion_r972462825
##########
enterprise/websvc.jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/wsdlmodel/WsdlPort.java:
##########
@@ -19,11 +19,13 @@
package org.netbeans.modules.websvc.api.jaxws.wsdlmodel;
+import java.util.ArrayList;
+import java.util.List;
+
import com.sun.tools.ws.processor.model.Operation;
import com.sun.tools.ws.processor.model.Port;
import com.sun.tools.ws.wsdl.document.soap.SOAPStyle;
-import java.util.ArrayList;
-import java.util.List;
+
Review Comment:
yes..
--
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 #4265: Cleanup warnings related to raw type List
Posted by GitBox <gi...@apache.org>.
BradWalker commented on PR #4265:
URL: https://github.com/apache/netbeans/pull/4265#issuecomment-1264747117
Hey @mbien & @matthiasblaesing , could you take a quick look at this. I think I have everything up to do. But, it still fails a couple of the tests. It does not look like the test failures are related to me work though.
I need your eyes on it, if you don't mind.
--
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] lbownik commented on a diff in pull request #4265: Cleanup warnings related to raw type List
Posted by GitBox <gi...@apache.org>.
lbownik commented on code in PR #4265:
URL: https://github.com/apache/netbeans/pull/4265#discussion_r922624377
##########
enterprise/web.struts/src/org/netbeans/modules/web/struts/StrutsConfigUtilities.java:
##########
@@ -304,7 +304,7 @@ public static String[] getConfigFiles(FileObject dd){
Servlet servlet = getActionServlet(dd);
if (servlet!=null) {
InitParam[] params = servlet.getInitParam();
Review Comment:
How about rewriting it into
return Stream.of(servlet.getInitParam()).
filter(p -> p.getParamName() != null).
filter(p -> p.getParamName().startsWith(DEFAULT_MODULE_NAME)).
flatMap(p -> Stream.of(p.getParamValue().split(",")).
collect(toList())).
toArray(new String[]{});
--
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] lbownik commented on a diff in pull request #4265: Cleanup warnings related to raw type List
Posted by GitBox <gi...@apache.org>.
lbownik commented on code in PR #4265:
URL: https://github.com/apache/netbeans/pull/4265#discussion_r922622719
##########
enterprise/websvc.jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/wsdlmodel/WsdlService.java:
##########
@@ -49,7 +51,7 @@ public WsdlService() {
}
public List<WsdlPort> getPorts() {
- List wsdlPorts = new ArrayList();
+ List<WsdlPort> wsdlPorts = new ArrayList<>();
Review Comment:
ho about rewriting this funtion into
public List<WsdlPort> getPorts() {
if (service==null) {
return emptyList();
} else {
return service.getPorts().stream().map(WsdlPort::new).collect(toList());
}
}
--
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 pull request #4265: Cleanup warnings related to raw type List
Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4265:
URL: https://github.com/apache/netbeans/pull/4265#issuecomment-1234241761
please make sure the commit has a useful message prior to merge.
--
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 #4265: Cleanup warnings related to raw type List
Posted by GitBox <gi...@apache.org>.
BradWalker commented on code in PR #4265:
URL: https://github.com/apache/netbeans/pull/4265#discussion_r972463125
##########
java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/FixedWatchesManager.java:
##########
@@ -265,7 +265,7 @@ public void performDefaultAction (
@Override
public Action[] getActions (NodeActionsProvider original, Object node)
throws UnknownTypeException {
- Action [] actions = original.getActions (node);
+ Action[] actions = original.getActions (node);
Review Comment:
yes..
--
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 #4265: Cleanup warnings related to raw type List
Posted by GitBox <gi...@apache.org>.
BradWalker merged PR #4265:
URL: https://github.com/apache/netbeans/pull/4265
--
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 #4265: Cleanup warnings related to raw type List
Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on code in PR #4265:
URL: https://github.com/apache/netbeans/pull/4265#discussion_r957750934
##########
enterprise/web.struts/src/org/netbeans/modules/web/struts/StrutsConfigUtilities.java:
##########
@@ -138,7 +138,7 @@ private static void addActions(List<Action> list, StrutsConfig sConfig) {
mappings = sConfig.getActionMappings();
}
if (mappings==null) return;
- Action [] actions = mappings.getAction();
+ Action[] actions = mappings.getAction();
Review Comment:
Whitespace only change
##########
java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/FixedWatchesManager.java:
##########
@@ -265,7 +265,7 @@ public void performDefaultAction (
@Override
public Action[] getActions (NodeActionsProvider original, Object node)
throws UnknownTypeException {
- Action [] actions = original.getActions (node);
+ Action[] actions = original.getActions (node);
Review Comment:
Whitespace only change
##########
enterprise/websvc.jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/wsdlmodel/WsdlPort.java:
##########
@@ -19,11 +19,13 @@
package org.netbeans.modules.websvc.api.jaxws.wsdlmodel;
+import java.util.ArrayList;
+import java.util.List;
+
import com.sun.tools.ws.processor.model.Operation;
import com.sun.tools.ws.processor.model.Port;
import com.sun.tools.ws.wsdl.document.soap.SOAPStyle;
-import java.util.ArrayList;
-import java.util.List;
+
Review Comment:
Order only 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.
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 #4265: Cleanup warnings related to raw type List
Posted by GitBox <gi...@apache.org>.
BradWalker commented on code in PR #4265:
URL: https://github.com/apache/netbeans/pull/4265#discussion_r972462690
##########
enterprise/web.struts/src/org/netbeans/modules/web/struts/StrutsConfigUtilities.java:
##########
@@ -138,7 +138,7 @@ private static void addActions(List<Action> list, StrutsConfig sConfig) {
mappings = sConfig.getActionMappings();
}
if (mappings==null) return;
- Action [] actions = mappings.getAction();
+ Action[] actions = mappings.getAction();
Review Comment:
yes..
--
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] lbownik commented on a diff in pull request #4265: Cleanup warnings related to raw type List
Posted by GitBox <gi...@apache.org>.
lbownik commented on code in PR #4265:
URL: https://github.com/apache/netbeans/pull/4265#discussion_r922622371
##########
enterprise/websvc.jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/wsdlmodel/WsdlPort.java:
##########
@@ -45,7 +47,7 @@ public class WsdlPort implements WSPort {
}
public List<WsdlOperation> getOperations() {
- List wsdlOperations = new ArrayList();
+ List<WsdlOperation> wsdlOperations = new ArrayList<>();
Review Comment:
How about rewriting this funtion to
public List<WsdlOperation> getOperations() {
if(port == null) {
return emptyList();
} else {
return port.getOperations().stream().map(WdslOperation::new).collect(toList());
}
--
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 pull request #4265: Cleanup warnings related to raw type List
Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4265:
URL: https://github.com/apache/netbeans/pull/4265#issuecomment-1163413790
hmm. sig tests are failing but you didn't really change anything in LSP code.
```
Class org.netbeans.modules.java.lsp.server.ui.UIContext
"E1.2 - API type removed" : method protected java.util.concurrent.CompletableFuture org.netbeans.modules.java.lsp.server.ui.UIContext.showQuickPick(org.netbeans.modules.java.lsp.server.protocol.ShowQuickPickParams)
"E1.2 - API type removed" : method protected java.util.concurrent.CompletableFuture org.netbeans.modules.java.lsp.server.ui.UIContext.showInputBox(org.netbeans.modules.java.lsp.server.protocol.ShowInputBoxParams)
```
--
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 pull request #4265: Cleanup warnings related to raw type List
Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on PR #4265:
URL: https://github.com/apache/netbeans/pull/4265#issuecomment-1170441507
@BradWalker could you please rebase this onto current master and see if that fixes the issue, so that we can get this in? These things don't get better with time.
--
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] lbownik commented on a diff in pull request #4265: Cleanup warnings related to raw type List
Posted by GitBox <gi...@apache.org>.
lbownik commented on code in PR #4265:
URL: https://github.com/apache/netbeans/pull/4265#discussion_r922622719
##########
enterprise/websvc.jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/wsdlmodel/WsdlService.java:
##########
@@ -49,7 +51,7 @@ public WsdlService() {
}
public List<WsdlPort> getPorts() {
- List wsdlPorts = new ArrayList();
+ List<WsdlPort> wsdlPorts = new ArrayList<>();
Review Comment:
ho about rewriting this funtion into
public List<WsdlPort> getPorts() {
if (service==null) {
return emptyList();
} else {
return service.getPorts().stream().map(WsdlPort::new).collect(toList());
}
}
--
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 #4265: Cleanup warnings related to raw type List
Posted by GitBox <gi...@apache.org>.
BradWalker commented on PR #4265:
URL: https://github.com/apache/netbeans/pull/4265#issuecomment-1229657086
In process as we speak..
--
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