You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by bw...@apache.org on 2022/10/03 11:20:43 UTC

[netbeans] branch master updated: Cleanup warnings related to raw type List (#4265)

This is an automated email from the ASF dual-hosted git repository.

bwalker pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new efa3694ead Cleanup warnings related to raw type List (#4265)
efa3694ead is described below

commit efa3694eaddeb7ef355ce2c88028330d48f105ed
Author: Brad Walker <bw...@musings.com>
AuthorDate: Mon Oct 3 07:20:35 2022 -0400

    Cleanup warnings related to raw type List (#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.
---
 .../src/org/netbeans/modules/web/struts/StrutsConfigUtilities.java  | 2 +-
 .../org/netbeans/modules/websvc/api/jaxws/wsdlmodel/WsdlPort.java   | 6 ++++--
 .../netbeans/modules/websvc/api/jaxws/wsdlmodel/WsdlService.java    | 4 +++-
 ide/editor/src/org/netbeans/modules/editor/NbEditorKit.java         | 2 +-
 .../src/org/netbeans/modules/turbo/TurboProvider.java               | 2 +-
 .../org/netbeans/modules/debugger/jpda/ui/FixedWatchesManager.java  | 2 +-
 .../src/org/openide/execution/NbClassPathCompat.java                | 4 ++--
 7 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/enterprise/web.struts/src/org/netbeans/modules/web/struts/StrutsConfigUtilities.java b/enterprise/web.struts/src/org/netbeans/modules/web/struts/StrutsConfigUtilities.java
index ac0f8f0a98..e5ed52d916 100644
--- a/enterprise/web.struts/src/org/netbeans/modules/web/struts/StrutsConfigUtilities.java
+++ b/enterprise/web.struts/src/org/netbeans/modules/web/struts/StrutsConfigUtilities.java
@@ -138,7 +138,7 @@ public class StrutsConfigUtilities {
             mappings = sConfig.getActionMappings();
         }
         if (mappings==null) return;
-        Action [] actions = mappings.getAction();
+        Action[] actions = mappings.getAction();
         for (int j = 0; j < actions.length; j++)
             list.add(actions[j]);
     }
diff --git a/enterprise/websvc.jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/wsdlmodel/WsdlPort.java b/enterprise/websvc.jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/wsdlmodel/WsdlPort.java
index 7822f49190..ca3b2afec3 100644
--- a/enterprise/websvc.jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/wsdlmodel/WsdlPort.java
+++ b/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;
+
 import org.netbeans.modules.websvc.jaxwsmodelapi.WSPort;
 
 /**
diff --git a/enterprise/websvc.jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/wsdlmodel/WsdlService.java b/enterprise/websvc.jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/wsdlmodel/WsdlService.java
index a4e0b3a556..5f1854f404 100644
--- a/enterprise/websvc.jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/wsdlmodel/WsdlService.java
+++ b/enterprise/websvc.jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/wsdlmodel/WsdlService.java
@@ -19,9 +19,11 @@
 
 package org.netbeans.modules.websvc.api.jaxws.wsdlmodel;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import com.sun.tools.ws.processor.model.Port;
 import com.sun.tools.ws.processor.model.Service;
-import java.util.*;
 import org.netbeans.modules.websvc.jaxwsmodelapi.WSService;
 
 /**
diff --git a/ide/editor/src/org/netbeans/modules/editor/NbEditorKit.java b/ide/editor/src/org/netbeans/modules/editor/NbEditorKit.java
index db9fa54431..b5234cfceb 100644
--- a/ide/editor/src/org/netbeans/modules/editor/NbEditorKit.java
+++ b/ide/editor/src/org/netbeans/modules/editor/NbEditorKit.java
@@ -400,7 +400,7 @@ public class NbEditorKit extends ExtKit implements Callable {
                 String actionNames = prefs.get(settingName, null);
 
                 if (actionNames != null) {
-                    l = new ArrayList();
+                    l = new ArrayList<>();
                     for(StringTokenizer t = new StringTokenizer(actionNames, ","); t.hasMoreTokens(); ) { //NOI18N
                         String action = t.nextToken().trim();
                         l.add(action);
diff --git a/ide/versioning.util/src/org/netbeans/modules/turbo/TurboProvider.java b/ide/versioning.util/src/org/netbeans/modules/turbo/TurboProvider.java
index 5eb2c7a107..008328c454 100644
--- a/ide/versioning.util/src/org/netbeans/modules/turbo/TurboProvider.java
+++ b/ide/versioning.util/src/org/netbeans/modules/turbo/TurboProvider.java
@@ -83,7 +83,7 @@ public interface TurboProvider {
 
         private final boolean enabled;
 
-        private final List<Object> speculative;
+        private final List<Object[]> speculative;
 
         private final Memory memory;
 
diff --git a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/FixedWatchesManager.java b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/FixedWatchesManager.java
index c730420025..60cf961e46 100644
--- a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/FixedWatchesManager.java
+++ b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/FixedWatchesManager.java
@@ -265,7 +265,7 @@ NodeActionsProviderFilter, ExtendedNodeModelFilter, TableModelFilter {
     @Override
     public Action[] getActions (NodeActionsProvider original, Object node) 
     throws UnknownTypeException {
-        Action [] actions = original.getActions (node);
+        Action[] actions = original.getActions (node);
         List<Action> myActions = new ArrayList<>();
 
         if (fixedWatches.containsKey (new KeyWrapper(node))) {
diff --git a/platform/openide.execution.compat8/src/org/openide/execution/NbClassPathCompat.java b/platform/openide.execution.compat8/src/org/openide/execution/NbClassPathCompat.java
index b228f36431..1cfe3ede70 100644
--- a/platform/openide.execution.compat8/src/org/openide/execution/NbClassPathCompat.java
+++ b/platform/openide.execution.compat8/src/org/openide/execution/NbClassPathCompat.java
@@ -66,13 +66,13 @@ public class NbClassPathCompat {
     @Deprecated
     public static NbClassPath createRepositoryPath (FileSystemCapability cap) {
         Thread.dumpStack();
-        final List res = new LinkedList<>();
+        final List<Object> res = new LinkedList<>();
 
 
         final class Env extends FileSystem$Environment {
             /* method of interface Environment */
             public void addClassPath(String element) {
-                res.add (element);
+                res.add(element);
             }
         }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists