lbownik commented on code in PR #5660:
URL: https://github.com/apache/netbeans/pull/5660#discussion_r1135920504
##########
extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java:
##########
@@ -290,7 +290,8 @@ private void detectTaskProperties(NbProjectInfoModel model)
{
Map<String, Object> taskProperties = new HashMap<>();
Map<String, String> taskPropertyTypes = new HashMap<>();
- for (Task task : project.getTasks().getAsMap().values()) {
+ // make a copy of the task map; may mutate.
+ for (Task task : new
ArrayList<>(project.getTasks().getAsMap().values())) {
Review Comment:
what happens when map mutates while ArrayList constructor rxecutes
--
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