mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-158216 - Docker: unable to reopen Inspect window
+ leak fixed - log manager should forget disposed logs
This commit is contained in:
+2
@@ -32,6 +32,8 @@ public interface DeploymentLogManager {
|
||||
@NotNull
|
||||
LoggingHandler addAdditionalLog(@NotNull String presentableName);
|
||||
|
||||
void removeAdditionalLog(@NotNull String presentableName);
|
||||
|
||||
boolean isTtySupported();
|
||||
|
||||
TerminalHandler addTerminal(@NotNull String presentableName, InputStream terminalOutput, OutputStream terminalInput);
|
||||
|
||||
+11
@@ -79,6 +79,17 @@ public class DeploymentLogManagerImpl implements DeploymentLogManager {
|
||||
return handler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAdditionalLog(@NotNull String presentableName) {
|
||||
synchronized (myAdditionalLoggingHandlers) {
|
||||
myAdditionalLoggingHandlers.stream()
|
||||
.filter(next -> presentableName.equals(next.getPresentableName()))
|
||||
.findAny()
|
||||
.ifPresent(myAdditionalLoggingHandlers::remove);
|
||||
}
|
||||
myChangeListener.run();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public LoggingHandler findOrCreateAdditionalLog(@NotNull String presentableName) {
|
||||
synchronized (myAdditionalLoggingHandlers) {
|
||||
|
||||
Reference in New Issue
Block a user