Skip to content

Commit

Permalink
删除无效代码、补齐缺失的@OverRide注解,采用内置list.sort函数无需引入工具类
Browse files Browse the repository at this point in the history
Signed-off-by: hecy7 <hecy7@asiainfo.com>
  • Loading branch information
MiKKiYang committed Dec 11, 2023
1 parent 6a3bc66 commit acb41fc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ private static File findJava(String javaHome) {

// find the shortest path, jre path longer than jdk path
if (javaList.size() > 1) {
Collections.sort(javaList, new Comparator<File>() {
javaList.sort(new Comparator<File>() {
@Override
public int compare(File file1, File file2) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,8 @@ public static boolean completeMethodName(Completion completion) {
// retrieve the class name
String className;
if (StringUtils.isBlank(lastToken)) {
// tokens = { " ", "CLASS_NAME", " "}
className = tokens.get(tokens.size() - 2).value();
} else {
// tokens = { " ", "CLASS_NAME", " ", "PARTIAL_METHOD_NAME"}
className = tokens.get(tokens.size() - 3).value();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ public boolean isBlank() {
return !text;
}

@Override
public String raw() {
return raw;
}

@Override
public String value() {
return value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ public Session createSession() {
session.put(Session.COMMAND_MANAGER, commandManager);
session.put(Session.INSTRUMENTATION, instrumentation);
session.put(Session.PID, pid);
//session.put(Session.SERVER, server);
//session.put(Session.TTY, term);
String sessionId = UUID.randomUUID().toString();
session.put(Session.ID, sessionId);

Expand Down

0 comments on commit acb41fc

Please sign in to comment.