pepness commented on code in PR #6596:
URL: https://github.com/apache/netbeans/pull/6596#discussion_r1375182156
##########
enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/LogViewMgr.java:
##########
@@ -1196,27 +1197,25 @@ private static FetchLog getServerLogStream(
final GlassfishInstance instance) {
FetchLog log;
FetchLog deadLog = null;
- synchronized (serverInputStreams) {
- log = serverInputStreams.get(instance);
- if (log != null) {
- if (log instanceof FetchLogPiped) {
- // Log reading task in running state
- if (((FetchLogPiped) log).isRunning()) {
- return log;
- // Log reading task is dead
- } else {
- // Postpone cleanup after synchronized block.
- deadLog = log;
- removeLog(instance);
- }
- } else {
+ log = serverInputStreams.computeIfPresent(instance, (key, value) ->
value);
Review Comment:
Again, you are correct. Thanks for the observations.
--
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