From f5f3c9f07816a29a7fddc64d8cbd6eaddb933c6c Mon Sep 17 00:00:00 2001 From: Brad Walker Date: Mon, 13 Apr 2020 09:43:26 -0600 Subject: [PATCH] [NETBEANS-4050] - cleanup uses of EMPTY_LIST, EMPTY_SET, EMPTY_MAP Clean up a bunch of compiler warning messages related to the use of Collections.[EMPTY_LIST, EMPTY_SET, EMPTY_MAP].. [repeat] /home/bwalker/src/netbeans/java/ant.debugger/src/org/netbeans/modules/ant/debugger/RunTargetsAction.java:145: warning: [unchecked] unchecked conversion [repeat] allTargets = Collections.EMPTY_SET; [repeat] ^ [repeat] required: Set [repeat] found: Set --- .../maven/apisupport/ExamineManifest.java | 2 +- .../dd/wizard/PayaraDDWizardIterator.java | 2 +- .../web/core/syntax/JspHyperlinkProvider.java | 2 +- .../modules/web/jsf/editor/HtmlSourceTask.java | 2 +- .../modules/web/jsf/JSFConfigUtilities.java | 2 +- .../modules/web/project/ui/EjbsNodeFactory.java | 2 +- .../web/struts/StrutsConfigUtilities.java | 2 +- .../websvc/rest/nodes/RestServiceChildren.java | 2 +- .../ConstructorGenerationCompletion.java | 2 +- .../bugtracking/issuetable/IssueTable.java | 4 ++-- .../docker/api/DockerContainerDetail.java | 2 +- .../editor/completion/CompletionJList.java | 2 +- .../modules/versioning/hooks/VCSHooks.java | 2 +- .../webkit/debugging/api/css/MatchedStyles.java | 2 +- .../webkit/debugging/api/css/PropertyInfo.java | 4 ++-- .../web/webkit/debugging/api/css/Rule.java | 2 +- .../webkit/debugging/api/css/StyleSheetBody.java | 2 +- .../modules/ant/debugger/RunTargetsAction.java | 2 +- .../dbschema/jdbcimpl/SchemaElementImpl.java | 4 ++-- .../debugger/jpda/ui/focus/AWTGrabHandler.java | 16 ++++++++-------- .../debugger/jpda/expr/EvaluatorVisitor.java | 16 ++++++++-------- .../jpda/models/VariableMirrorTranslator.java | 8 ++++---- .../debugger/jpda/remote/RemoteServices.java | 6 +++--- .../queries/DefaultSourceLevelQueryImpl.java | 4 ++-- .../maven/indexer/spi/NullResultImpl.java | 2 +- .../settings/impl/SettingsComponentImpl.java | 2 +- .../netbeans/modules/maven/DependencyType.java | 2 +- .../spring/beans/refactoring/Modifications.java | 2 +- .../ui/wizards/TestNGSuiteHyperlingProvider.java | 2 +- .../codegen/AddJavaFXPropertyCodeGenerator.java | 2 +- .../editor/codegen/AddJavaFXPropertyMaker.java | 14 +++++++------- .../org/openide/windows/DelegateActionMap.java | 2 +- .../modules/javascript2/model/ModelVisitor.java | 2 +- .../editor/model/NodeJsObjectInterceptor.java | 2 +- .../source/query/SourceElementsQueryImpl.java | 2 +- .../src/org/netbeans/lib/v8debug/JSONReader.java | 2 +- .../org/netbeans/lib/v8debug/commands/Flags.java | 2 +- .../saas/ui/nodes/WadlSaasNodeChildren.java | 2 +- .../saas/ui/nodes/WsdlSaasNodeChildren.java | 2 +- 39 files changed, 68 insertions(+), 68 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 07f7257cd595..b7946564149a 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.EMPTY_LIST; + private List dependencyTokens = Collections.emptyList(); public void checkFile() throws MojoExecutionException { diff --git a/enterprise/payara.eecommon/src/org/netbeans/modules/payara/eecommon/dd/wizard/PayaraDDWizardIterator.java b/enterprise/payara.eecommon/src/org/netbeans/modules/payara/eecommon/dd/wizard/PayaraDDWizardIterator.java index bc6c6f18f1a3..81f6f13f855d 100644 --- a/enterprise/payara.eecommon/src/org/netbeans/modules/payara/eecommon/dd/wizard/PayaraDDWizardIterator.java +++ b/enterprise/payara.eecommon/src/org/netbeans/modules/payara/eecommon/dd/wizard/PayaraDDWizardIterator.java @@ -106,7 +106,7 @@ private WizardDescriptor.Panel[] getPanels() { @Override public Set instantiate() throws IOException { - Set result = Collections.EMPTY_SET; + Set result = Collections.emptySet(); PayaraDDWizardPanel wizardPanel = (PayaraDDWizardPanel) panels[0]; File configDir = wizardPanel.getSelectedLocation(); diff --git a/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JspHyperlinkProvider.java b/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JspHyperlinkProvider.java index 8fa351292012..ffc11645b494 100644 --- a/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JspHyperlinkProvider.java +++ b/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JspHyperlinkProvider.java @@ -408,7 +408,7 @@ public void run() { //compute the type off awt ClasspathInfo cpInfo = ClasspathInfo.create(jspSup.getFileObject()); - JavaSource source = JavaSource.create(cpInfo, Collections.EMPTY_LIST); + JavaSource source = JavaSource.create(cpInfo, Collections.emptyList()); AtomicBoolean cancel = new AtomicBoolean(); Compute compute = new Compute(cancel, diff --git a/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/HtmlSourceTask.java b/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/HtmlSourceTask.java index 959a639107fd..944b4f1beaf2 100644 --- a/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/HtmlSourceTask.java +++ b/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/HtmlSourceTask.java @@ -57,7 +57,7 @@ public Collection create(Snapshot snapshot) { if (mimeType.equals("text/html")) { //NOI18N return Collections.singletonList(new HtmlSourceTask()); } else { - return Collections.EMPTY_LIST; + return Collections.emptyList(); } } } diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFConfigUtilities.java b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFConfigUtilities.java index c61bbfc9fac2..292f1e652b38 100644 --- a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFConfigUtilities.java +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFConfigUtilities.java @@ -206,7 +206,7 @@ public static JavaSource createJavaSource(WebModule webModule) { ClassPath bootCP = cpp.findClassPath(webModule.getDocumentBase(), ClassPath.BOOT); ClassPath compileCP = cpp.findClassPath(webModule.getDocumentBase(), ClassPath.COMPILE); ClassPath sourceCP = cpp.findClassPath(webModule.getDocumentBase(), ClassPath.SOURCE); - return JavaSource.create(ClasspathInfo.create(bootCP, compileCP, sourceCP), Collections.EMPTY_LIST); + return JavaSource.create(ClasspathInfo.create(bootCP, compileCP, sourceCP), Collections.emptyList()); } private static boolean containsAnnotatedJsfResource(CompilationController parameter) { diff --git a/enterprise/web.project/src/org/netbeans/modules/web/project/ui/EjbsNodeFactory.java b/enterprise/web.project/src/org/netbeans/modules/web/project/ui/EjbsNodeFactory.java index 92974d5adc96..9d45c85f3814 100644 --- a/enterprise/web.project/src/org/netbeans/modules/web/project/ui/EjbsNodeFactory.java +++ b/enterprise/web.project/src/org/netbeans/modules/web/project/ui/EjbsNodeFactory.java @@ -84,7 +84,7 @@ public List keys() { if (!isViewEmpty){ return Collections.singletonList(KEY_EJBS); }else{ - return Collections.EMPTY_LIST; + return Collections.emptyList(); } } 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 14b536c66c1b..03138f2590fb 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 @@ -243,7 +243,7 @@ public static Servlet getActionServlet(FileObject dd) { } ClasspathInfo cpi = ClasspathInfo.create(dd); - JavaSource js = JavaSource.create(cpi, Collections.EMPTY_LIST); + JavaSource js = JavaSource.create(cpi, Collections.emptyList()); final int[] index = new int[]{-1}; js.runUserActionTask( new Task (){ public void run(CompilationController cc) throws Exception { diff --git a/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/nodes/RestServiceChildren.java b/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/nodes/RestServiceChildren.java index 943e56cbea60..cf4f9a51ebfc 100644 --- a/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/nodes/RestServiceChildren.java +++ b/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/nodes/RestServiceChildren.java @@ -51,7 +51,7 @@ protected void addNotify() { protected void removeNotify() { super.removeNotify(); - setKeys(Collections.EMPTY_SET); + setKeys(Collections.emptySet()); } private void updateKeys() { diff --git a/groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/completion/ConstructorGenerationCompletion.java b/groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/completion/ConstructorGenerationCompletion.java index df5d2041005b..320db5fc2f64 100644 --- a/groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/completion/ConstructorGenerationCompletion.java +++ b/groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/completion/ConstructorGenerationCompletion.java @@ -62,7 +62,7 @@ public boolean complete(List proposals, CompletionContext re boolean camelCaseMatch = CamelCaseUtil.compareCamelCase(className, request.getPrefix()); if (camelCaseMatch) { LOG.log(Level.FINEST, "Prefix matches Class's CamelCase signature. Adding."); // NOI18N - proposals.add(new CompletionItem.ConstructorItem(className, Collections.EMPTY_LIST, anchor, true)); + proposals.add(new CompletionItem.ConstructorItem(className, Collections.emptyList(), anchor, true)); } return camelCaseMatch; diff --git a/ide/bugtracking.commons/src/org/netbeans/modules/bugtracking/issuetable/IssueTable.java b/ide/bugtracking.commons/src/org/netbeans/modules/bugtracking/issuetable/IssueTable.java index be0121048a8d..73a470208ee2 100644 --- a/ide/bugtracking.commons/src/org/netbeans/modules/bugtracking/issuetable/IssueTable.java +++ b/ide/bugtracking.commons/src/org/netbeans/modules/bugtracking/issuetable/IssueTable.java @@ -413,7 +413,7 @@ void sortOrderChanged() { private Map getColumnSorting() { String sortingString = getColumnSorting(repositoryId); if(sortingString == null || sortingString.equals("")) { - return Collections.EMPTY_MAP; + return Collections.emptyMap(); } Map map = new HashMap<>(); String[] sortingArray = sortingString.split(CONFIG_DELIMITER); @@ -697,7 +697,7 @@ private Map getPersistedColumnValues() { String columns = getColumns(repositoryId); String[] visibleColumns = columns.split(CONFIG_DELIMITER); // NOI18N if(visibleColumns.length <= 1) { - return Collections.EMPTY_MAP; + return Collections.emptyMap(); } Map ret = new HashMap(); for (int i = 0; i < visibleColumns.length; i=i+2) { diff --git a/ide/docker.api/src/org/netbeans/modules/docker/api/DockerContainerDetail.java b/ide/docker.api/src/org/netbeans/modules/docker/api/DockerContainerDetail.java index 16e475ff922b..37f9096effbc 100644 --- a/ide/docker.api/src/org/netbeans/modules/docker/api/DockerContainerDetail.java +++ b/ide/docker.api/src/org/netbeans/modules/docker/api/DockerContainerDetail.java @@ -42,7 +42,7 @@ public DockerContainerDetail(String name, DockerContainer.Status status, boolean this.status = status; this.stdin = stdin; this.tty = tty; - this.portMappings = Collections.EMPTY_LIST; + this.portMappings = Collections.emptyList(); } public DockerContainerDetail(String name, DockerContainer.Status status, boolean stdin, boolean tty, List portMappings) { diff --git a/ide/editor.completion/src/org/netbeans/modules/editor/completion/CompletionJList.java b/ide/editor.completion/src/org/netbeans/modules/editor/completion/CompletionJList.java index 67cb9fff417e..ee52b7221834 100644 --- a/ide/editor.completion/src/org/netbeans/modules/editor/completion/CompletionJList.java +++ b/ide/editor.completion/src/org/netbeans/modules/editor/completion/CompletionJList.java @@ -62,7 +62,7 @@ public CompletionJList(int maxVisibleRowCount, MouseListener mouseListener, JTex setFont(editorComponent.getFont()); setLayoutOrientation(JList.VERTICAL); setFixedCellHeight(fixedItemHeight = Math.max(CompletionLayout.COMPLETION_ITEM_HEIGHT, getFontMetrics(getFont()).getHeight())); - setModel(new Model(Collections.EMPTY_LIST)); + setModel(new Model(Collections.emptyList())); setFocusable(false); renderComponent = new RenderComponent(); diff --git a/ide/versioning.util/src/org/netbeans/modules/versioning/hooks/VCSHooks.java b/ide/versioning.util/src/org/netbeans/modules/versioning/hooks/VCSHooks.java index 6c31bff24eb2..5b7e0b9006c7 100644 --- a/ide/versioning.util/src/org/netbeans/modules/versioning/hooks/VCSHooks.java +++ b/ide/versioning.util/src/org/netbeans/modules/versioning/hooks/VCSHooks.java @@ -63,7 +63,7 @@ private Collection getFactories() { hooksResult = Lookup.getDefault().lookupResult(VCSHookFactory.class); } if(hooksResult == null) { - return Collections.EMPTY_LIST; + return Collections.emptyList(); } Collection c = (Collection) Lookup.getDefault().lookupAll(VCSHookFactory.class); return hooksResult.allInstances(); diff --git a/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/MatchedStyles.java b/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/MatchedStyles.java index 90b9cd15fd77..0ad01f36b127 100644 --- a/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/MatchedStyles.java +++ b/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/MatchedStyles.java @@ -52,7 +52,7 @@ public class MatchedStyles { } Collections.reverse(matchedRules); } else { - matchedRules = Collections.EMPTY_LIST; + matchedRules = Collections.emptyList(); } /* TODO: After it's needed, follow the most recent spec. if (styles.containsKey("pseudoElements")) { // NOI18N diff --git a/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/PropertyInfo.java b/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/PropertyInfo.java index d7861d7901c6..0b0b3a4d1929 100644 --- a/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/PropertyInfo.java +++ b/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/PropertyInfo.java @@ -43,7 +43,7 @@ public class PropertyInfo { name = (String)propertyInfo.get("name"); // NOI18N JSONArray longHandsArray = (JSONArray)propertyInfo.get("longhands"); // NOI18N if (longHandsArray == null) { - longhands = Collections.EMPTY_LIST; + longhands = Collections.emptyList(); } else { longhands = (List)longHandsArray; } @@ -57,7 +57,7 @@ public class PropertyInfo { */ PropertyInfo(String name) { this.name = name; - this.longhands = Collections.EMPTY_LIST; + this.longhands = Collections.emptyList(); } /** diff --git a/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/Rule.java b/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/Rule.java index ff304c060f1f..5af99867a5b0 100644 --- a/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/Rule.java +++ b/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/Rule.java @@ -89,7 +89,7 @@ public class Rule { media.add(new Media((JSONObject)o)); } } else { - media = Collections.EMPTY_LIST; + media = Collections.emptyList(); } if (rule.containsKey("selectorList")) { // NOI18N JSONObject selectorList = (JSONObject)rule.get("selectorList"); // NOI18N diff --git a/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/StyleSheetBody.java b/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/StyleSheetBody.java index f4df3e0088b3..b5b7dac91367 100644 --- a/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/StyleSheetBody.java +++ b/ide/web.webkit.debugging/src/org/netbeans/modules/web/webkit/debugging/api/css/StyleSheetBody.java @@ -69,7 +69,7 @@ public class StyleSheetBody { this.styleSheetHeader = header; this.styleSheetId = header.getStyleSheetId(); this.text = text; - this.rules = Collections.EMPTY_LIST; + this.rules = Collections.emptyList(); } /** diff --git a/java/ant.debugger/src/org/netbeans/modules/ant/debugger/RunTargetsAction.java b/java/ant.debugger/src/org/netbeans/modules/ant/debugger/RunTargetsAction.java index 27125c05f2c7..72d75ba609ef 100644 --- a/java/ant.debugger/src/org/netbeans/modules/ant/debugger/RunTargetsAction.java +++ b/java/ant.debugger/src/org/netbeans/modules/ant/debugger/RunTargetsAction.java @@ -142,7 +142,7 @@ public JPopupMenu getPopupMenu() { } catch (IOException e) { DialogDisplayer.getDefault().notify( new NotifyDescriptor.Message(e.getLocalizedMessage())); - allTargets = Collections.EMPTY_SET; + allTargets = Collections.emptySet(); } String defaultTarget = null; SortedSet describedTargets = new TreeSet(Collator.getInstance()); diff --git a/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/SchemaElementImpl.java b/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/SchemaElementImpl.java index a318a2754a13..f04bbc7e1ce5 100644 --- a/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/SchemaElementImpl.java +++ b/java/dbschema/src/org/netbeans/modules/dbschema/jdbcimpl/SchemaElementImpl.java @@ -741,13 +741,13 @@ private List getOracleRecycleBinTables() { " Setting recycle bin tables to an empty list.", exc); // NOI18N - result = Collections.EMPTY_LIST; + result = Collections.emptyList(); } catch (AbstractMethodError ame) { LOGGER.log(Level.WARNING, "Some older versions of the Oracle " + " driver do not support getDatabaseMajorVersion(). " + " Setting recycle bin tables to an empty list.", ame); // NOI18N - result = Collections.EMPTY_LIST; + result = Collections.emptyList(); } return result; } diff --git a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/focus/AWTGrabHandler.java b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/focus/AWTGrabHandler.java index f3741fdf081d..de8d67da5a83 100644 --- a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/focus/AWTGrabHandler.java +++ b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/focus/AWTGrabHandler.java @@ -309,7 +309,7 @@ private boolean ungrabWindowAWT(ThreadReference tr, ObjectReference grabbedWindo logger.info("Unable to release X grab, method ungrabInput not found in target VM "+VirtualMachineWrapper.description(vm)); return false; } - XBaseWindowClass.invokeMethod(tr, ungrabInput, Collections.EMPTY_LIST, ObjectReference.INVOKE_SINGLE_THREADED); + XBaseWindowClass.invokeMethod(tr, ungrabInput, Collections.emptyList(), ObjectReference.INVOKE_SINGLE_THREADED); } catch (VMDisconnectedExceptionWrapper vmdex) { return true; // Disconnected, all is good. } catch (Exception ex) { @@ -338,7 +338,7 @@ private boolean ungrabWindowFX(ThreadReference tr) { logger.info("Unable to release FX X grab, no impl_getWindows() method in "+WindowClass); return true; // We do not know whether there was any grab } - ObjectReference windowsIterator = (ObjectReference) WindowClass.invokeMethod(tr, getWindowsMethod, Collections.EMPTY_LIST, ObjectReference.INVOKE_SINGLE_THREADED); + ObjectReference windowsIterator = (ObjectReference) WindowClass.invokeMethod(tr, getWindowsMethod, Collections.emptyList(), ObjectReference.INVOKE_SINGLE_THREADED); if (windowsIterator == null) { return true; // We do not know whether there was any grab } @@ -359,12 +359,12 @@ private boolean ungrabWindowFX(ThreadReference tr) { } private boolean hasNext(Method hasNext, ThreadReference tr, ObjectReference iterator) throws Exception { - Value v = iterator.invokeMethod(tr, hasNext, Collections.EMPTY_LIST, ObjectReference.INVOKE_SINGLE_THREADED); + Value v = iterator.invokeMethod(tr, hasNext, Collections.emptyList(), ObjectReference.INVOKE_SINGLE_THREADED); return (v instanceof BooleanValue) && ((BooleanValue) v).booleanValue(); } private ObjectReference next(Method next, ThreadReference tr, ObjectReference iterator) throws Exception { - return (ObjectReference) iterator.invokeMethod(tr, next, Collections.EMPTY_LIST, ObjectReference.INVOKE_SINGLE_THREADED); + return (ObjectReference) iterator.invokeMethod(tr, next, Collections.emptyList(), ObjectReference.INVOKE_SINGLE_THREADED); } private void ungrabWindowFX(ClassType WindowClass, ObjectReference w, ThreadReference tr) throws Exception { @@ -400,7 +400,7 @@ private void ungrabWindowFX(ClassType WindowClass, ObjectReference w, ThreadRefe } InterfaceType TKStageClass = (InterfaceType) w.virtualMachine().classesByName("com.sun.javafx.tk.TKStage").get(0); Method ungrabFocusMethod = TKStageClass.methodsByName("ungrabFocus", "()V").get(0); - impl_peer.invokeMethod(tr, ungrabFocusMethod, Collections.EMPTY_LIST, ObjectReference.INVOKE_SINGLE_THREADED); + impl_peer.invokeMethod(tr, ungrabFocusMethod, Collections.emptyList(), ObjectReference.INVOKE_SINGLE_THREADED); if (logger.isLoggable(Level.FINE)) { logger.fine("FX Window "+w+" was successfully ungrabbed."); } @@ -547,7 +547,7 @@ private Boolean checkXServerExc(ThreadReference tr, TOOLKIT tkt) throws ClassNot //writeLock.lock(); ClassType ToolkitClass = (ClassType) toolkitClassesByName.get(0); Method getDefaultToolkit = ClassTypeWrapper.concreteMethodByName(ToolkitClass, "getDefaultToolkit", "()Ljava/awt/Toolkit;"); - ObjectReference toolkit = (ObjectReference) ToolkitClass.invokeMethod(tr, getDefaultToolkit, Collections.EMPTY_LIST, ObjectReference.INVOKE_SINGLE_THREADED); + ObjectReference toolkit = (ObjectReference) ToolkitClass.invokeMethod(tr, getDefaultToolkit, Collections.emptyList(), ObjectReference.INVOKE_SINGLE_THREADED); ClassType XToolkitClass; switch (tkt) { @@ -583,7 +583,7 @@ private Boolean checkXServerExc(ThreadReference tr, TOOLKIT tkt) throws ClassNot if (getSunAwtDisableGrab == null) { logger.fine("XToolkit.getSunAwtDisableGrab() method not found in target VM "+VirtualMachineWrapper.description(virtualMachine)); } else { - BooleanValue sunAwtDisableGrab = (BooleanValue) XToolkitClass.invokeMethod(tr, getSunAwtDisableGrab, Collections.EMPTY_LIST, ObjectReference.INVOKE_SINGLE_THREADED); + BooleanValue sunAwtDisableGrab = (BooleanValue) XToolkitClass.invokeMethod(tr, getSunAwtDisableGrab, Collections.emptyList(), ObjectReference.INVOKE_SINGLE_THREADED); if (logger.isLoggable(Level.FINE)) { logger.fine("sunAwtDisableGrab = "+sunAwtDisableGrab.value()); } @@ -601,7 +601,7 @@ private Boolean checkXServerExc(ThreadReference tr, TOOLKIT tkt) throws ClassNot logger.fine("XToolkit.getDefaultRootWindow() method does not exist in the target VM "+VirtualMachineWrapper.description(virtualMachine)); return false; } - LongValue defaultRootWindowValue = (LongValue) XToolkitClass.invokeMethod(tr, getDefaultRootWindow, Collections.EMPTY_LIST, ObjectReference.INVOKE_SINGLE_THREADED); + LongValue defaultRootWindowValue = (LongValue) XToolkitClass.invokeMethod(tr, getDefaultRootWindow, Collections.emptyList(), ObjectReference.INVOKE_SINGLE_THREADED); // XAtom xa = new XAtom(grabCheckStr, true); List xatomClassesByName = VirtualMachineWrapper.classesByName(virtualMachine, "sun.awt.X11.XAtom"); diff --git a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/expr/EvaluatorVisitor.java b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/expr/EvaluatorVisitor.java index 614b7c7a87e7..251a458b3ff6 100644 --- a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/expr/EvaluatorVisitor.java +++ b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/expr/EvaluatorVisitor.java @@ -1719,15 +1719,15 @@ public Mirror visitEnhancedForLoop(EnhancedForLoopTree arg0, EvaluationContext e } Method iteratorMethod = null; try { - iteratorMethod = getConcreteMethod(objType, "iterator", Collections.EMPTY_LIST); + iteratorMethod = getConcreteMethod(objType, "iterator", Collections.emptyList()); } catch (UnsuitableArgumentsException ex) { } iterator = (ObjectReference)invokeMethod(arg0, iteratorMethod, Boolean.FALSE, (ClassType)objRef.type(), - objRef, Collections.EMPTY_LIST, evaluationContext, false); + objRef, Collections.emptyList(), evaluationContext, false); try { ReferenceType iteratorType = iterator.referenceType(); - nextMethod = getConcreteMethod(iteratorType, "next", Collections.EMPTY_LIST); - hasNextMethod = getConcreteMethod(iteratorType, "hasNext", Collections.EMPTY_LIST); + nextMethod = getConcreteMethod(iteratorType, "next", Collections.emptyList()); + hasNextMethod = getConcreteMethod(iteratorType, "hasNext", Collections.emptyList()); } catch (UnsuitableArgumentsException ex) { } } else { @@ -1752,12 +1752,12 @@ public Mirror visitEnhancedForLoop(EnhancedForLoopTree arg0, EvaluationContext e index++; } else { value = invokeMethod(arg0, hasNextMethod, Boolean.FALSE, (ClassType)iterator.type(), - iterator, Collections.EMPTY_LIST, evaluationContext, false); + iterator, Collections.emptyList(), evaluationContext, false); if (!((BooleanValue)value).value()) { break; } value = invokeMethod(arg0, nextMethod, Boolean.FALSE, (ClassType)iterator.type(), - iterator, Collections.EMPTY_LIST, evaluationContext, false); + iterator, Collections.emptyList(), evaluationContext, false); } scriptVar.setValue(value); // [TODO] check if value is assignable to variable try { @@ -5496,7 +5496,7 @@ public List methodsByName(String string, String string1) { @Override public List nestedTypes() { - return Collections.EMPTY_LIST; + return Collections.emptyList(); } @Override @@ -5600,7 +5600,7 @@ public String defaultStratum() { @Override public List instances(long l) { - return Collections.EMPTY_LIST; + return Collections.emptyList(); } @Override diff --git a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/VariableMirrorTranslator.java b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/VariableMirrorTranslator.java index 47394382abcc..f616e142a4f3 100644 --- a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/VariableMirrorTranslator.java +++ b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/VariableMirrorTranslator.java @@ -586,12 +586,12 @@ private static ObjectReference createObjectOfType(ClassType type, VirtualMachine ObjectReference objectConstructor = (ObjectReference) ObjectReferenceWrapper.invokeMethod(objectClass, thread, getDeclaredConstructorMethod, - Collections.EMPTY_LIST, + Collections.emptyList(), ClassType.INVOKE_SINGLE_THREADED); ObjectReference rf = (ObjectReference) ClassTypeWrapper.invokeMethod(reflectionFactoryType, thread, getReflectionFactoryMethod, - Collections.EMPTY_LIST, + Collections.emptyList(), ClassType.INVOKE_SINGLE_THREADED); ObjectReference constructor = (ObjectReference) ObjectReferenceWrapper.invokeMethod(rf, thread, @@ -610,11 +610,11 @@ private static ObjectReference createObjectOfType(ClassType type, VirtualMachine ObjectReference newInstance = (ObjectReference) ObjectReferenceWrapper.invokeMethod(constructor, thread, newInstanceMethod, - Collections.EMPTY_LIST, + Collections.emptyList(), ClassType.INVOKE_SINGLE_THREADED); return newInstance; } else { - return ClassTypeWrapper.newInstance(type, thread, c, Collections.EMPTY_LIST, ClassType.INVOKE_SINGLE_THREADED); + return ClassTypeWrapper.newInstance(type, thread, c, Collections.emptyList(), ClassType.INVOKE_SINGLE_THREADED); } } diff --git a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/remote/RemoteServices.java b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/remote/RemoteServices.java index 293dc75ebb99..31af1e408266 100644 --- a/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/remote/RemoteServices.java +++ b/java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/remote/RemoteServices.java @@ -143,7 +143,7 @@ public static ClassObjectReference uploadClass(ThreadReference tr, RemoteClass r ClassType theClass = getClass(vm, Class.class.getName()); // Call some method that will prepare the class: Method aMethod = ClassTypeWrapper.concreteMethodByName(theClass, "getConstructors", "()[Ljava/lang/reflect/Constructor;"); - ObjectReferenceWrapper.invokeMethod(theUploadedClass, tr, aMethod, Collections.EMPTY_LIST, ObjectReference.INVOKE_SINGLE_THREADED); + ObjectReferenceWrapper.invokeMethod(theUploadedClass, tr, aMethod, Collections.emptyList(), ObjectReference.INVOKE_SINGLE_THREADED); } } } finally { @@ -167,12 +167,12 @@ private static ObjectReference getContextClassLoader(ThreadReference tr, Virtual ObjectCollectedExceptionWrapper { ReferenceType threadType = tr.referenceType(); Method getContextCl = ClassTypeWrapper.concreteMethodByName((ClassType) threadType, "getContextClassLoader", "()Ljava/lang/ClassLoader;"); - ObjectReference cl = (ObjectReference) ObjectReferenceWrapper.invokeMethod(tr, tr, getContextCl, Collections.EMPTY_LIST, ObjectReference.INVOKE_SINGLE_THREADED); + ObjectReference cl = (ObjectReference) ObjectReferenceWrapper.invokeMethod(tr, tr, getContextCl, Collections.emptyList(), ObjectReference.INVOKE_SINGLE_THREADED); ClassType classLoaderClass = null; if (cl == null) { classLoaderClass = getClass(vm, ClassLoader.class.getName()); Method getSystemClassLoader = ClassTypeWrapper.concreteMethodByName(classLoaderClass, "getSystemClassLoader", "()Ljava/lang/ClassLoader;"); - cl = (ObjectReference) ClassTypeWrapper.invokeMethod(classLoaderClass, tr, getSystemClassLoader, Collections.EMPTY_LIST, ObjectReference.INVOKE_SINGLE_THREADED); + cl = (ObjectReference) ClassTypeWrapper.invokeMethod(classLoaderClass, tr, getSystemClassLoader, Collections.emptyList(), ObjectReference.INVOKE_SINGLE_THREADED); } return cl; } diff --git a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/DefaultSourceLevelQueryImpl.java b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/DefaultSourceLevelQueryImpl.java index 6492821c564c..e600684a1e20 100644 --- a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/DefaultSourceLevelQueryImpl.java +++ b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/DefaultSourceLevelQueryImpl.java @@ -195,8 +195,8 @@ private static String parsePackage(@NonNull final FileObject javaFile) { null, null, null, - Collections.EMPTY_LIST, - Collections.EMPTY_LIST, + Collections.emptyList(), + Collections.emptyList(), Collections.singleton(new JFO(javaFile))); final Iterator cus = jt.parse().iterator(); if (cus.hasNext()) { diff --git a/java/maven.indexer/src/org/netbeans/modules/maven/indexer/spi/NullResultImpl.java b/java/maven.indexer/src/org/netbeans/modules/maven/indexer/spi/NullResultImpl.java index c5d780614ff7..58e497abd3e3 100644 --- a/java/maven.indexer/src/org/netbeans/modules/maven/indexer/spi/NullResultImpl.java +++ b/java/maven.indexer/src/org/netbeans/modules/maven/indexer/spi/NullResultImpl.java @@ -41,7 +41,7 @@ public void waitForSkipped() { @Override public List getResults() { - return Collections.EMPTY_LIST; + return Collections.emptyList(); } @Override diff --git a/java/maven.model/src/org/netbeans/modules/maven/model/settings/impl/SettingsComponentImpl.java b/java/maven.model/src/org/netbeans/modules/maven/model/settings/impl/SettingsComponentImpl.java index ffdb04c48fff..585e281a4814 100644 --- a/java/maven.model/src/org/netbeans/modules/maven/model/settings/impl/SettingsComponentImpl.java +++ b/java/maven.model/src/org/netbeans/modules/maven/model/settings/impl/SettingsComponentImpl.java @@ -172,7 +172,7 @@ public void setChildElementText(String propertyName, String text, QName qname) { if (text != null) { SettingsExtensibilityElement el = getModel().getFactory().createSettingsExtensibilityElement(qname); el.setElementText(text); - addAfter(qname.getLocalPart(), el, Collections.EMPTY_LIST); + addAfter(qname.getLocalPart(), el, Collections.emptyList()); } } diff --git a/java/maven/src/org/netbeans/modules/maven/DependencyType.java b/java/maven/src/org/netbeans/modules/maven/DependencyType.java index 11d12ad02050..4abea3a861f5 100644 --- a/java/maven/src/org/netbeans/modules/maven/DependencyType.java +++ b/java/maven/src/org/netbeans/modules/maven/DependencyType.java @@ -36,7 +36,7 @@ public enum DependencyType { private final List scopes; private DependencyType(String... artifactScopes) { - this.scopes = Collections.unmodifiableList(artifactScopes == null || artifactScopes.length == 0 ? Collections.EMPTY_LIST : Arrays.asList(artifactScopes)); + this.scopes = Collections.unmodifiableList(artifactScopes == null || artifactScopes.length == 0 ? Collections.emptyList() : Arrays.asList(artifactScopes)); } public List artifactScopes() { diff --git a/java/spring.beans/src/org/netbeans/modules/spring/beans/refactoring/Modifications.java b/java/spring.beans/src/org/netbeans/modules/spring/beans/refactoring/Modifications.java index 6fdda398142c..b7c65daee637 100644 --- a/java/spring.beans/src/org/netbeans/modules/spring/beans/refactoring/Modifications.java +++ b/java/spring.beans/src/org/netbeans/modules/spring/beans/refactoring/Modifications.java @@ -225,7 +225,7 @@ public String getResultingSource(FileObject fileObject) throws IOException { @Override public Collection getNewFiles() { - return Collections.EMPTY_LIST; + return Collections.emptyList(); } public static final class Difference { diff --git a/java/testng.ui/src/org/netbeans/modules/testng/ui/wizards/TestNGSuiteHyperlingProvider.java b/java/testng.ui/src/org/netbeans/modules/testng/ui/wizards/TestNGSuiteHyperlingProvider.java index e451a1b57748..1ff9bbfca476 100644 --- a/java/testng.ui/src/org/netbeans/modules/testng/ui/wizards/TestNGSuiteHyperlingProvider.java +++ b/java/testng.ui/src/org/netbeans/modules/testng/ui/wizards/TestNGSuiteHyperlingProvider.java @@ -268,7 +268,7 @@ private void performGoTo(Document doc, int offset, final String file, final Stri break; case JAVA_SOURCE: final ClasspathInfo cp = ClasspathInfo.create(doc); - JavaSource js = JavaSource.create(cp, Collections.EMPTY_LIST); + JavaSource js = JavaSource.create(cp, Collections.emptyList()); try { js.runUserActionTask(new Task() { diff --git a/javafx/javafx2.editor/src/org/netbeans/modules/javafx2/editor/codegen/AddJavaFXPropertyCodeGenerator.java b/javafx/javafx2.editor/src/org/netbeans/modules/javafx2/editor/codegen/AddJavaFXPropertyCodeGenerator.java index daeca5e5a1da..0d93190ba6d5 100644 --- a/javafx/javafx2.editor/src/org/netbeans/modules/javafx2/editor/codegen/AddJavaFXPropertyCodeGenerator.java +++ b/javafx/javafx2.editor/src/org/netbeans/modules/javafx2/editor/codegen/AddJavaFXPropertyCodeGenerator.java @@ -86,7 +86,7 @@ public List create(Lookup context) { Element e = javac.getTrees().getElement(path); if (e == null || !e.getKind().isClass()) { - return Collections.EMPTY_LIST; + return Collections.emptyList(); } List existingFields = new LinkedList(); diff --git a/javafx/javafx2.editor/src/org/netbeans/modules/javafx2/editor/codegen/AddJavaFXPropertyMaker.java b/javafx/javafx2.editor/src/org/netbeans/modules/javafx2/editor/codegen/AddJavaFXPropertyMaker.java index 895ec3226eaf..9788d1220687 100644 --- a/javafx/javafx2.editor/src/org/netbeans/modules/javafx2/editor/codegen/AddJavaFXPropertyMaker.java +++ b/javafx/javafx2.editor/src/org/netbeans/modules/javafx2/editor/codegen/AddJavaFXPropertyMaker.java @@ -72,7 +72,7 @@ public AddJavaFXPropertyMaker(WorkingCopy javac, Scope scope, TreeMaker make, Ad private MethodTree createGetter(ModifiersTree mods, TypeMirror valueType) { StringBuilder getterName = GeneratorUtils.getCapitalizedName(config.getName()); getterName.insert(0, valueType.getKind() == TypeKind.BOOLEAN ? "is" : "get"); - ReturnTree returnTree = make.Return(make.MethodInvocation(Collections.EMPTY_LIST, make.MemberSelect(make.Identifier(config.getName()), hasGet ? "get" : "getValue"), Collections.EMPTY_LIST)); + ReturnTree returnTree = make.Return(make.MethodInvocation(Collections.emptyList(), make.MemberSelect(make.Identifier(config.getName()), hasGet ? "get" : "getValue"), Collections.emptyList())); BlockTree getterBody = make.Block(Collections.singletonList(returnTree), false); Tree valueTree; if (valueType.getKind() == TypeKind.DECLARED) { @@ -82,7 +82,7 @@ private MethodTree createGetter(ModifiersTree mods, TypeMirror valueType) { } else { valueTree = make.Identifier(valueType.toString()); } - MethodTree getter = make.Method(mods, getterName, valueTree, Collections.EMPTY_LIST, Collections.EMPTY_LIST, Collections.EMPTY_LIST, getterBody, null); + MethodTree getter = make.Method(mods, getterName, valueTree, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), getterBody, null); return getter; } @@ -97,10 +97,10 @@ private MethodTree createSetter(ModifiersTree mods, TypeMirror valueType) { } else { valueTree = make.Identifier(valueType.toString()); } - StatementTree statement = make.ExpressionStatement(make.MethodInvocation(Collections.EMPTY_LIST, make.MemberSelect(make.Identifier(config.getName()), hasGet ? "set" : "setValue"), Collections.singletonList(make.Identifier("value")))); + StatementTree statement = make.ExpressionStatement(make.MethodInvocation(Collections.emptyList(), make.MemberSelect(make.Identifier(config.getName()), hasGet ? "set" : "setValue"), Collections.singletonList(make.Identifier("value")))); BlockTree getterBody = make.Block(Collections.singletonList(statement), false); VariableTree var = make.Variable(make.Modifiers(EnumSet.noneOf(Modifier.class)), "value", valueTree, null); - MethodTree getter = make.Method(mods, getterName, make.PrimitiveType(TypeKind.VOID), Collections.EMPTY_LIST, Collections.singletonList(var), Collections.EMPTY_LIST, getterBody, null); + MethodTree getter = make.Method(mods, getterName, make.PrimitiveType(TypeKind.VOID), Collections.emptyList(), Collections.singletonList(var), Collections.emptyList(), getterBody, null); return getter; } @@ -110,11 +110,11 @@ private MethodTree createProperty(ModifiersTree mods, DeclaredType selectedType, if (wrapperMethod == null) { expression = make.Identifier(config.getName()); } else { - expression = make.MethodInvocation(Collections.EMPTY_LIST, make.MemberSelect(make.Identifier(config.getName()), wrapperMethod.getSimpleName()), Collections.EMPTY_LIST); + expression = make.MethodInvocation(Collections.emptyList(), make.MemberSelect(make.Identifier(config.getName()), wrapperMethod.getSimpleName()), Collections.emptyList()); } ReturnTree returnTree = make.Return(expression); BlockTree getterBody = make.Block(Collections.singletonList(returnTree), false); - MethodTree getter = make.Method(mods, getterName, selectedType == null ? make.Identifier(config.getPropertyType()) : make.QualIdent(selectedType.asElement()), Collections.EMPTY_LIST, Collections.EMPTY_LIST, Collections.EMPTY_LIST, getterBody, null); + MethodTree getter = make.Method(mods, getterName, selectedType == null ? make.Identifier(config.getPropertyType()) : make.QualIdent(selectedType.asElement()), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), getterBody, null); return getter; } @@ -191,7 +191,7 @@ public List createMembers() { private VariableTree createField(DeclaredType selectedType, ExpressionTree implementationType) { String initializer = config.getInitializer(); NewClassTree newClass = make.NewClass(null, - Collections.EMPTY_LIST, + Collections.emptyList(), implementationType, Collections.singletonList(make.Identifier(initializer)), null); VariableTree property = make.Variable( diff --git a/platform/openide.windows/src/org/openide/windows/DelegateActionMap.java b/platform/openide.windows/src/org/openide/windows/DelegateActionMap.java index 1da67bcb5456..cccb3fd17e34 100644 --- a/platform/openide.windows/src/org/openide/windows/DelegateActionMap.java +++ b/platform/openide.windows/src/org/openide/windows/DelegateActionMap.java @@ -134,7 +134,7 @@ private Object[] keys(boolean all) { if (all) { Object[] allKeys = m.allKeys(); if( null == allKeys ) { - l = Collections.EMPTY_LIST; + l = Collections.emptyList(); } else { l = Arrays.asList(m.allKeys()); } diff --git a/webcommon/javascript2.model/src/org/netbeans/modules/javascript2/model/ModelVisitor.java b/webcommon/javascript2.model/src/org/netbeans/modules/javascript2/model/ModelVisitor.java index c61324c488b8..669512ba0a9d 100644 --- a/webcommon/javascript2.model/src/org/netbeans/modules/javascript2/model/ModelVisitor.java +++ b/webcommon/javascript2.model/src/org/netbeans/modules/javascript2/model/ModelVisitor.java @@ -1400,7 +1400,7 @@ private void processJsDoc(JsFunctionImpl jsFunction, FunctionNode fn, JsDocument JsObject parentObject = parentFqn.isEmpty() ? getGlobalObject() : ModelUtils.getJsObject(modelBuilder, parentFqn, true); JsFunctionImpl callBackFunction = new JsFunctionImpl( parentObject instanceof DeclarationScope ? (DeclarationScope) parentObject : ModelUtils.getDeclarationScope(parentObject), - parentObject, fqn.get(fqn.size() - 1), Collections.EMPTY_LIST, + parentObject, fqn.get(fqn.size() - 1), Collections.emptyList(), callBack.getOffset() > -1 ? new OffsetRange(callBack.getOffset(), callBack.getOffset() + callBack.getType().length()) : OffsetRange.NONE, JsTokenId.JAVASCRIPT_MIME_TYPE, null); parentObject.addProperty(callBackFunction.getName(), callBackFunction); diff --git a/webcommon/javascript2.nodejs/src/org/netbeans/modules/javascript2/nodejs/editor/model/NodeJsObjectInterceptor.java b/webcommon/javascript2.nodejs/src/org/netbeans/modules/javascript2/nodejs/editor/model/NodeJsObjectInterceptor.java index 7daeb072cb45..b318e982214b 100644 --- a/webcommon/javascript2.nodejs/src/org/netbeans/modules/javascript2/nodejs/editor/model/NodeJsObjectInterceptor.java +++ b/webcommon/javascript2.nodejs/src/org/netbeans/modules/javascript2/nodejs/editor/model/NodeJsObjectInterceptor.java @@ -80,7 +80,7 @@ public void interceptGlobal(final JsObject global, final ModelElementFactory fac } } if (exports != null) { - JsFunction module = factory.newFunction((DeclarationScope) global, global, NodeJsUtils.FAKE_OBJECT_NAME_PREFIX + global.getName(), Collections.EMPTY_LIST, global.getOffsetRange(), null); + JsFunction module = factory.newFunction((DeclarationScope) global, global, NodeJsUtils.FAKE_OBJECT_NAME_PREFIX + global.getName(), Collections.emptyList(), global.getOffsetRange(), null); module.setAnonymous(true); global.addProperty(module.getName(), module); ((DeclarationScope)global).addDeclaredScope(module); 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 1b9563e2a902..14257089087c 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 getVarsAt(Source source, int offset) { - final Collection[] vars = new Collection[] { Collections.EMPTY_LIST }; + final Collection[] vars = new Collection[] { Collections.emptyList()}; try { ParserManager.parse(Collections.singleton(source), new UserTask() { public @Override diff --git a/webcommon/lib.v8debug/src/org/netbeans/lib/v8debug/JSONReader.java b/webcommon/lib.v8debug/src/org/netbeans/lib/v8debug/JSONReader.java index 3ccde92f241f..5745620985b3 100644 --- a/webcommon/lib.v8debug/src/org/netbeans/lib/v8debug/JSONReader.java +++ b/webcommon/lib.v8debug/src/org/netbeans/lib/v8debug/JSONReader.java @@ -845,7 +845,7 @@ private static Map getProperties(JSONArray array, V8O return null; } if (array.isEmpty()) { - return Collections.EMPTY_MAP; + return Collections.emptyMap(); } Map properties = new LinkedHashMap<>(); V8Object.Property.Type[] types = V8Object.Property.Type.values(); diff --git a/webcommon/lib.v8debug/src/org/netbeans/lib/v8debug/commands/Flags.java b/webcommon/lib.v8debug/src/org/netbeans/lib/v8debug/commands/Flags.java index 9cce4234801d..128e3b7cb499 100644 --- a/webcommon/lib.v8debug/src/org/netbeans/lib/v8debug/commands/Flags.java +++ b/webcommon/lib.v8debug/src/org/netbeans/lib/v8debug/commands/Flags.java @@ -75,7 +75,7 @@ public static final class ResponseBody extends V8Body { private final Map flags; public ResponseBody() { - this(Collections.EMPTY_MAP); + this(Collections.emptyMap()); } public ResponseBody(Map flags) { diff --git a/websvccommon/websvc.saas.ui/src/org/netbeans/modules/websvc/saas/ui/nodes/WadlSaasNodeChildren.java b/websvccommon/websvc.saas.ui/src/org/netbeans/modules/websvc/saas/ui/nodes/WadlSaasNodeChildren.java index e30f0c15ead8..5cf2c0961cfd 100644 --- a/websvccommon/websvc.saas.ui/src/org/netbeans/modules/websvc/saas/ui/nodes/WadlSaasNodeChildren.java +++ b/websvccommon/websvc.saas.ui/src/org/netbeans/modules/websvc/saas/ui/nodes/WadlSaasNodeChildren.java @@ -63,7 +63,7 @@ protected void updateKeys() { } else if (state == Saas.State.INITIALIZING) { setKeys(WAIT_HOLDER); } else { - setKeys(Collections.EMPTY_LIST); + setKeys(Collections.emptyList()); } } diff --git a/websvccommon/websvc.saas.ui/src/org/netbeans/modules/websvc/saas/ui/nodes/WsdlSaasNodeChildren.java b/websvccommon/websvc.saas.ui/src/org/netbeans/modules/websvc/saas/ui/nodes/WsdlSaasNodeChildren.java index 87f48df10d62..b622b312b748 100644 --- a/websvccommon/websvc.saas.ui/src/org/netbeans/modules/websvc/saas/ui/nodes/WsdlSaasNodeChildren.java +++ b/websvccommon/websvc.saas.ui/src/org/netbeans/modules/websvc/saas/ui/nodes/WsdlSaasNodeChildren.java @@ -62,7 +62,7 @@ protected void updateKeys() { } else if (state == Saas.State.INITIALIZING) { setKeys(WAIT_HOLDER); } else { - setKeys(Collections.EMPTY_LIST); + setKeys(Collections.emptyList()); } }