You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "lbownik (via GitHub)" <gi...@apache.org> on 2023/05/24 06:52:54 UTC

[GitHub] [netbeans] lbownik commented on a diff in pull request #5983: [JS] Fix ConcurrentModificationException scanning export class {} with multiple members

lbownik commented on code in PR #5983:
URL: https://github.com/apache/netbeans/pull/5983#discussion_r1203547539


##########
webcommon/javascript2.model/src/org/netbeans/modules/javascript2/model/ModelVisitor.java:
##########
@@ -712,8 +712,9 @@ public boolean enterClassNode(ClassNode node) {
             );
             JsObject origClassObject = parent.getProperty(className.getName());
             if (origClassObject != null) {
-                for (Entry<String, ? extends JsObject> e : origClassObject.getProperties().entrySet()) {
-                    ModelUtils.moveProperty(classObject, e.getValue());
+                List<JsObject> properties = new ArrayList<>(origClassObject.getProperties().values());

Review Comment:
   is there a specific reason for creating a new ArrayList ?



-- 
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