Skip to content

Commit

Permalink
编译器可自动类型推导无需显示声明、增加@OverRide注解
Browse files Browse the repository at this point in the history
Signed-off-by: hecy7 <[email protected]>
  • Loading branch information
MiKKiYang committed Dec 11, 2023
1 parent 6a3bc66 commit f72e275
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ public class ShellServerImpl extends ShellServer {

public ShellServerImpl(ShellServerOptions options) {
this.welcomeMessage = options.getWelcomeMessage();
this.termServers = new ArrayList<TermServer>();
this.termServers = new ArrayList<>();
this.timeoutMillis = options.getSessionTimeout();
this.sessions = new ConcurrentHashMap<String, ShellImpl>();
this.sessions = new ConcurrentHashMap<>();
this.reaperInterval = options.getReaperInterval();
this.resolvers = new CopyOnWriteArrayList<CommandResolver>();
this.resolvers = new CopyOnWriteArrayList<>();
this.commandManager = new InternalCommandManager(resolvers);
this.instrumentation = options.getInstrumentation();
this.pid = options.getPid();
Expand Down Expand Up @@ -141,7 +141,7 @@ public ShellServer listen(final Handler<Future<Void>> listenHandler) {

private void evictSessions() {
long now = System.currentTimeMillis();
Set<ShellImpl> toClose = new HashSet<ShellImpl>();
Set<ShellImpl> 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
Expand Down Expand Up @@ -229,7 +229,7 @@ public void close(final Handler<Future<Void>> completionHandler) {
scheduledExecutorService.shutdownNow();
}
toStop = termServers;
toClose = new ArrayList<ShellImpl>(sessions.values());
toClose = new ArrayList<>(sessions.values());
if (toClose.isEmpty()) {
sessionsClosed.complete();
}
Expand All @@ -253,10 +253,12 @@ public void close(final Handler<Future<Void>> completionHandler) {
}
}

@Override
public JobControllerImpl getJobController() {
return jobController;
}

@Override
public InternalCommandManager getCommandManager() {
return commandManager;
}
Expand Down

0 comments on commit f72e275

Please sign in to comment.