clean code

pull/1182/head
hengyunabc 5 years ago
parent 8d12bb7e0a
commit 2b740b121f

@ -323,7 +323,7 @@ public abstract class Binding {
public static class MethodInfoBindingParser implements BindingParser {
@Override
public Binding parse(Annotation annotation) {
return new MethodDeclarationBinding();
return new MethodInfoBinding();
}
}

@ -1,43 +0,0 @@
package com.taobao.arthas.core.advisor;
/**
*
*/
public class AdviceListenerAdapter implements AdviceListener {
@Override
public void create() {
}
@Override
public void destroy() {
}
@Override
public void before(
ClassLoader loader, String className, String methodName, String methodDesc,
Object target, Object[] args) throws Throwable {
}
@Override
public void afterReturning(
ClassLoader loader, String className, String methodName, String methodDesc,
Object target, Object[] args,
Object returnObject) throws Throwable {
}
@Override
public void afterThrowing(
ClassLoader loader, String className, String methodName, String methodDesc,
Object target, Object[] args,
Throwable throwable) throws Throwable {
}
}

@ -4,7 +4,6 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.TimeUnit;
@ -23,15 +22,9 @@ import com.taobao.arthas.core.shell.system.Job;
* @author gehui 2017731 11:55:41
*/
public class GlobalJobControllerImpl extends JobControllerImpl {
private Timer timer;
private Map<Integer, TimerTask> jobTimeoutTaskMap = new HashMap<Integer, TimerTask>();
private static final Logger logger = LoggerFactory.getLogger(GlobalJobControllerImpl.class);
public GlobalJobControllerImpl() {
timer = ArthasBootstrap.getInstance().getTimer();
}
@Override
public void close(final Handler<Void> completionHandler) {
if (completionHandler != null) {
@ -70,7 +63,7 @@ public class GlobalJobControllerImpl extends JobControllerImpl {
}
};
Date timeoutDate = new Date(System.currentTimeMillis() + (getJobTimeoutInSecond() * 1000));
timer.schedule(jobTimeoutTask, timeoutDate);
ArthasBootstrap.getInstance().getTimer().schedule(jobTimeoutTask, timeoutDate);
jobTimeoutTaskMap.put(job.id(), jobTimeoutTask);
job.setTimeoutDate(timeoutDate);

Loading…
Cancel
Save