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 3e8a0a59da Cleanup references to the generic emptySet().. (#4297)
3e8a0a59da is described below

commit 3e8a0a59da9db4c1ca204d1e1416e74e8b39dfcf
Author: Brad Walker <bwal...@musings.com>
AuthorDate: Wed Jun 29 22:00:59 2022 -0400

    Cleanup references to the generic emptySet().. (#4297)
    
    [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
---
 .../org/netbeans/modules/maven/apisupport/ExamineManifest.java    | 4 ++--
 ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java | 2 +-
 .../modules/debugger/jpda/projects/SourcePathProviderImpl.java    | 6 +++---
 .../java/lsp/server/debugging/launch/NbLaunchRequestHandler.java  | 4 ++--
 .../modules/javafx2/editor/completion/beans/BeanModelBuilder.java | 8 ++++----
 .../src/org/openide/explorer/DefaultEMLookup.java                 | 2 +-
 .../modules/javascript2/source/query/SourceElementsQueryImpl.java | 2 +-
 7 files changed, 14 insertions(+), 14 deletions(-)

diff --git 
a/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/ExamineManifest.java
 
b/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/ExamineManifest.java
index b794656414..d0f469856c 100644
--- 
a/apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/ExamineManifest.java
+++ 
b/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();
    
     
     public void checkFile() throws MojoExecutionException {
@@ -278,7 +278,7 @@ public class ExamineManifest  {
         return dependencyTokens;
     }
 
-    public void setDependencyTokens(List dependencyTokens) {
+    public void setDependencyTokens(List<String> dependencyTokens) {
         this.dependencyTokens = dependencyTokens;
     }
     
diff --git a/ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java 
b/ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java
index 80ce7eb08d..b9f446d39d 100644
--- a/ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java
+++ b/ide/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java
@@ -134,7 +134,7 @@ public final class XSLGrammarQuery implements GrammarQuery{
             attrDecls = new HashMap<>();
 
             // Commonly used variables
-            Set emptySet = new TreeSet();
+            Set<String> emptySet = new TreeSet<>();
             String spaceAtt = "xml:space";  // NOI18N
             Set<String> tmpSet;
 
diff --git 
a/java/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcePathProviderImpl.java
 
b/java/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcePathProviderImpl.java
index fcba0defeb..40ba9fad0b 100644
--- 
a/java/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcePathProviderImpl.java
+++ 
b/java/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcePathProviderImpl.java
@@ -409,7 +409,7 @@ public class SourcePathProviderImpl extends 
SourcePathProvider {
         Properties sourcesProperties = Properties.getDefault ().getProperties 
("debugger").getProperties ("sources");
         List<String> additionalSourceRoots = (List<String>) sourcesProperties.
                 getProperties("additional_source_roots").
-                getCollection("src_roots", Collections.emptyList());
+                getCollection("src_roots", Collections.<String>emptyList());
         if (additionalSourceRoots == null || additionalSourceRoots.isEmpty()) {
             return null;
         }
@@ -472,7 +472,7 @@ public class SourcePathProviderImpl extends 
SourcePathProvider {
     private Set<String> getRemoteDisabledSourceRoots() {
         Properties sourcesProperties = Properties.getDefault ().getProperties 
("debugger").getProperties ("sources");
         return (Set<String>) sourcesProperties.getProperties("source_roots").
-            getCollection("remote_disabled", Collections.emptySet());
+            getCollection("remote_disabled", Collections.<String>emptySet());
     }
 
     private void storeDisabledSourceRoots(Set<String> disabledSourceRoots) {
@@ -516,7 +516,7 @@ public class SourcePathProviderImpl extends 
SourcePathProvider {
     public static Map<String, Integer> getRemoteSourceRootsOrder() {
         Properties sourcesProperties = Properties.getDefault ().getProperties 
("debugger").getProperties ("sources");
         return (Map<String, Integer>) 
sourcesProperties.getProperties("source_roots").
-            getMap("remote_order", Collections.emptyMap());
+            getMap("remote_order", Collections.<String, Integer>emptyMap());
     }
 
     private static void storeSourceRootsOrder(File baseDir, String[] roots, 
int[] permutation) {
diff --git 
a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchRequestHandler.java
 
b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchRequestHandler.java
index 5ec31be351..65bb084c0f 100644
--- 
a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchRequestHandler.java
+++ 
b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchRequestHandler.java
@@ -60,8 +60,8 @@ public final class NbLaunchRequestHandler {
         activeLaunchHandler = noDebug ? new 
NbLaunchWithoutDebuggingDelegate(terminateHandle)
                 : new NbLaunchWithDebuggingDelegate(terminateHandle);
         // validation
-        List<String> modulePaths = (List<String>) 
launchArguments.getOrDefault("modulePaths", Collections.emptyList());
-        List<String> classPaths = (List<String>) 
launchArguments.getOrDefault("classPaths", Collections.emptyList());
+        List<String> modulePaths = (List<String>) 
launchArguments.getOrDefault("modulePaths", Collections.<String>emptyList());
+        List<String> classPaths = (List<String>) 
launchArguments.getOrDefault("classPaths", Collections.<String>emptyList());
 
         // "file" key is provided by DAP client infrastructure, sometimes in 
an unsuitable manner, e.g. some cryptic ID for Output window etc. 
         // the "projectFile" allows to override the infrastructure from client 
logic.
diff --git 
a/javafx/javafx2.editor/src/org/netbeans/modules/javafx2/editor/completion/beans/BeanModelBuilder.java
 
b/javafx/javafx2.editor/src/org/netbeans/modules/javafx2/editor/completion/beans/BeanModelBuilder.java
index 0ca3c7fee4..e595ab671d 100644
--- 
a/javafx/javafx2.editor/src/org/netbeans/modules/javafx2/editor/completion/beans/BeanModelBuilder.java
+++ 
b/javafx/javafx2.editor/src/org/netbeans/modules/javafx2/editor/completion/beans/BeanModelBuilder.java
@@ -92,11 +92,11 @@ public final class BeanModelBuilder {
     /**
      * Names of factory methods usable to create the bean instance
      */
-    private Map<String, TypeMirrorHandle> factoryMethods = 
Collections.emptyMap();
+    private Map<String, TypeMirrorHandle> factoryMethods = 
Collections.<String, TypeMirrorHandle>emptyMap();
     
     private FxBean  resultInfo;
     
-    private Set<String> constants = Collections.emptySet();
+    private Set<String> constants = Collections.<String>emptySet();
     
     /**
      * Type element for the class.
@@ -619,7 +619,7 @@ public final class BeanModelBuilder {
         TypeMirrorHandle returnType = 
TypeMirrorHandle.create(m.getReturnType());
         
         if (factoryMethods.isEmpty()) {
-            factoryMethods = new HashMap<String, TypeMirrorHandle>();
+            factoryMethods = new HashMap<>();
         }
         factoryMethods.put(m.getSimpleName().toString(), returnType);
         consumed = true;
@@ -741,7 +741,7 @@ public final class BeanModelBuilder {
         events.put(ei.getName(), ei);
     }
     
-    private Map<String, FxEvent>    events = Collections.emptyMap();
+    private Map<String, FxEvent>    events = Collections.<String, 
FxEvent>emptyMap();
     
     private FxBeanCache beanCache;
     
diff --git 
a/platform/openide.explorer/src/org/openide/explorer/DefaultEMLookup.java 
b/platform/openide.explorer/src/org/openide/explorer/DefaultEMLookup.java
index b569b43234..a17884b4b6 100644
--- a/platform/openide.explorer/src/org/openide/explorer/DefaultEMLookup.java
+++ b/platform/openide.explorer/src/org/openide/explorer/DefaultEMLookup.java
@@ -84,7 +84,7 @@ final class DefaultEMLookup extends ProxyLookup implements 
LookupListener, Prope
             if (attachedTo == null) {
                 copy = Collections.<Lookup, Lookup.Result>emptyMap();
             } else {
-                copy = new HashMap<Lookup, Lookup.Result>(attachedTo);
+                copy = new HashMap<>(attachedTo);
             }
         }
 
diff --git 
a/webcommon/javascript2.source.query/src/org/netbeans/modules/javascript2/source/query/SourceElementsQueryImpl.java
 
b/webcommon/javascript2.source.query/src/org/netbeans/modules/javascript2/source/query/SourceElementsQueryImpl.java
index 1425708908..061e79b93a 100644
--- 
a/webcommon/javascript2.source.query/src/org/netbeans/modules/javascript2/source/query/SourceElementsQueryImpl.java
+++ 
b/webcommon/javascript2.source.query/src/org/netbeans/modules/javascript2/source/query/SourceElementsQueryImpl.java
@@ -44,7 +44,7 @@ public class SourceElementsQueryImpl implements 
SourceElementsQuery {
 
     @Override
     public Collection<Var> getVarsAt(Source source, int offset) {
-        final Collection[] vars = new Collection[] { Collections.emptyList()};
+        final Collection[] vars = new Collection[] { 
Collections.<Var>emptyList()};
         try {
             ParserManager.parse(Collections.singleton(source), new UserTask() {
                 public @Override


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

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

Reply via email to