You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/03/30 12:45:14 UTC
[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #2842: [NETBEANS-5511] Remove items via the iterator.
matthiasblaesing commented on a change in pull request #2842:
URL: https://github.com/apache/netbeans/pull/2842#discussion_r604061809
##########
File path: platform/autoupdate.services/src/org/netbeans/modules/autoupdate/services/FeatureUpdateElementImpl.java
##########
@@ -496,7 +496,7 @@ private void initializeAgent() {
}
Module m = Utilities.toModule(cnb, null);
if (m != null && ! m.getProblems().isEmpty()) {
- dependenciesToModulesOrFeatures.remove(depSpec);
+ it.remove();
Review comment:
I ran against the same wall yesterday and came to the same conclusion. As this is a double nested loop, I think it would be good to either terminate the inner loop with a break or the continue the outer loop with a label. Else we could hit the remove a second time and enter undefined territory.
--
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.
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