mbien commented on code in PR #5332:
URL: https://github.com/apache/netbeans/pull/5332#discussion_r1103819997


##########
enterprise/j2ee.sun.ddui/src/org/netbeans/modules/j2ee/sun/ddloaders/multiview/webservice/WebServiceMetadataReader.java:
##########
@@ -89,7 +91,7 @@ public Map<String, Object> readAnnotations(DataObject dObj) {
     private void filterInvalidServices(Map<String, Object> annotationMap, 
Object moduleType) {
         String invalidBindingType = J2eeModule.Type.WAR.equals(moduleType) ? 
DDBinding.PROP_EJB_LINK : DDBinding.PROP_SERVLET_LINK;
         
-        List<String> servicesToRemove = new ArrayList<String>();
+        Set<String> servicesToRemove = new HashSet<String>();

Review Comment:
   service name are already distinct. This can be reverted back to a list.



##########
ide/project.ant/src/org/netbeans/spi/project/support/ant/ReferenceHelper.java:
##########
@@ -1346,9 +1346,9 @@ public void fixReferences(File originalPath) {
         EditableProperties priv = 
h.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);
         
         File projectDir = FileUtil.toFile(h.getProjectDirectory());
-        
-        List<String> pubRemove = new ArrayList<String>();
-        List<String> privRemove = new ArrayList<String>();
+
+        Set<String> pubRemove = new HashSet<String>();
+        Set<String> privRemove = new HashSet<String>();

Review Comment:
   revert please. Elements are already distinct so they can be stored in a list.



##########
enterprise/websvc.core/src/org/netbeans/modules/websvc/core/jaxws/projects/JavaEEWSOpenHook.java:
##########
@@ -217,15 +217,13 @@ private void updateWsModel(Map<String, String> services){
                     }
                 }
 
-                for (String key : commonServices) {
-                    oldServices.remove(key);
-                    services.remove(key);
-                }
+                oldServices.keySet().removeAll(commonServices);
+                services.keySet().removeAll(commonServices);

Review Comment:
   @tbw777 you marked this as resolved but forgot to revert.



##########
apisupport/timers/src/org/netbeans/modules/timers/TimeComponentPanel.java:
##########
@@ -439,18 +440,13 @@ public void stateChanged(ChangeEvent arg0) {
                 inner.paintImmediately(inner.getBounds());
             }
         });
-        Map/*<Object,Path>*/ traces = LiveReferences.fromRoots(objects, null, 
bar.getModel());
+        Map<Object, Path> traces = LiveReferences.fromRoots(objects, null, 
bar.getModel());
         if (traces == null) {
             return "";
         }
         StringBuffer sb = new StringBuffer();
-        
-        for (Object inst : traces.keySet()) {
-            sb.append(inst);
-            sb.append(":\n"); // NOI18N
-            sb.append(traces.get(inst));
-            sb.append("\n\n"); // NOI18N
-        }
+
+        traces.forEach((inst, path) -> sb.append(inst + ":\n" + path + 
"\n\n"));

Review Comment:
   @tbw777 you forgot this one. Please revert the change to append.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to