pepness commented on code in PR #6596:
URL: https://github.com/apache/netbeans/pull/6596#discussion_r1375181745


##########
enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/LogViewMgr.java:
##########
@@ -1114,11 +1121,9 @@ public void stateChanged(final FetchLogEvent event) {
             switch (event.getState()) {
                 case COMPLETED: case FAILED:
                     FetchLog oldLog = null;
-                    synchronized (serverInputStreams) {
-                        FetchLog storedLog = serverInputStreams.get(instance);
-                        if (this.log.equals(storedLog)) {
-                            oldLog = serverInputStreams.remove(instance);
-                        }
+                    FetchLog storedLog = 
serverInputStreams.computeIfPresent(instance, (key, value) -> value);
+                    if (this.log.equals(storedLog)) {
+                        oldLog = serverInputStreams.remove(instance);

Review Comment:
   You are correct.



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