diff --git a/core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java b/core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java index 38934d79a2..10d373a30e 100644 --- a/core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java +++ b/core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java @@ -61,11 +61,11 @@ public class ShellServerImpl extends ShellServer { public ShellServerImpl(ShellServerOptions options) { this.welcomeMessage = options.getWelcomeMessage(); - this.termServers = new ArrayList(); + this.termServers = new ArrayList<>(); this.timeoutMillis = options.getSessionTimeout(); - this.sessions = new ConcurrentHashMap(); + this.sessions = new ConcurrentHashMap<>(); this.reaperInterval = options.getReaperInterval(); - this.resolvers = new CopyOnWriteArrayList(); + this.resolvers = new CopyOnWriteArrayList<>(); this.commandManager = new InternalCommandManager(resolvers); this.instrumentation = options.getInstrumentation(); this.pid = options.getPid(); @@ -141,7 +141,7 @@ public ShellServer listen(final Handler> listenHandler) { private void evictSessions() { long now = System.currentTimeMillis(); - Set toClose = new HashSet(); + Set toClose = new HashSet<>(); for (ShellImpl session : sessions.values()) { // do not close if there is still job running, // e.g. trace command might wait for a long time before condition is met @@ -229,7 +229,7 @@ public void close(final Handler> completionHandler) { scheduledExecutorService.shutdownNow(); } toStop = termServers; - toClose = new ArrayList(sessions.values()); + toClose = new ArrayList<>(sessions.values()); if (toClose.isEmpty()) { sessionsClosed.complete(); } @@ -253,10 +253,12 @@ public void close(final Handler> completionHandler) { } } + @Override public JobControllerImpl getJobController() { return jobController; } + @Override public InternalCommandManager getCommandManager() { return commandManager; }