Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译器可自动类型推导无需显示声明、增加@Override注解 #2761

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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