dbalek commented on code in PR #7979:
URL: https://github.com/apache/netbeans/pull/7979#discussion_r1866032258


##########
java/maven/src/org/netbeans/modules/maven/execute/AbstractOutputHandler.java:
##########
@@ -226,12 +232,16 @@ protected final void processEnd(String id, OutputWriter 
writer) {
                 writer.println(visitor.getLine());
             }
         }
-        Set set = processors.get(id);
-        if (set != null) {
-            //TODO a bulletproof way would be to keep a list of currently 
started
-            // sections and compare to the list of 
getRegisteredOutputSequences fo each of the
-            // processors in set..
-            currentProcessors.removeAll(set);
+        AtomicInteger count = id2count.getOrDefault(id, new AtomicInteger(1));
+        if (count.decrementAndGet() == 0) {

Review Comment:
   Not sure, if the proposed solution works - `id2count.remove()` should be 
called only when `count` drops to zero. 



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