mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
minor cleanup
This commit is contained in:
+3
-8
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
+3
-5
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user