minor cleanup

This commit is contained in:
Egor.Ushakov
2015-01-21 13:28:01 +03:00
parent 5a11edf754
commit e3669c8d2c
3 changed files with 9 additions and 15 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2010 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@ import com.intellij.debugger.engine.evaluation.EvaluationContextImpl;
import com.sun.jdi.*;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
@@ -87,12 +87,7 @@ public class BoxingEvaluator implements Evaluator{
if (methods.size() == 0) {
throw new EvaluateException("Cannot construct wrapper object for value of type " + value.type() + ": Unable to find either valueOf() or constructor method");
}
final Method factoryMethod = methods.get(0);
final ArrayList args = new ArrayList();
args.add(value);
return process.invokeMethod(context, wrapperClass, factoryMethod, args);
return process.invokeMethod(context, wrapperClass, methods.get(0), Collections.singletonList(value));
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@ import com.sun.jdi.ObjectReference;
import com.sun.jdi.Value;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -86,8 +86,6 @@ public class UnBoxingEvaluator implements Evaluator{
conversionMethodName + conversionMethodSignature);
}
final Method method = methods.get(0);
return process.invokeMethod(context, value, method, new ArrayList());
return process.invokeMethod(context, value, methods.get(0), Collections.emptyList());
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,6 +33,7 @@ import com.intellij.util.containers.HashMap;
import com.sun.jdi.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
@@ -99,7 +100,7 @@ public class BatchEvaluator {
if(constructor != null){
ObjectReference evaluator = null;
try {
evaluator = myDebugProcess.newInstance(evaluationContext, batchEvaluatorClass, constructor, new ArrayList());
evaluator = myDebugProcess.newInstance(evaluationContext, batchEvaluatorClass, constructor, Collections.emptyList());
}
catch (Exception e) {
LOG.debug(e);