Removed unused local variable from ScriptClassInfo (#28617)

Following [8999104](8999104b14)
  the local variable `argumentNames` is no longer used, so removed.
This commit is contained in:
Robin Neatherway 2018-02-12 23:58:09 +00:00 committed by Ryan Ernst
parent 282974215c
commit 8d0f976024
1 changed files with 1 additions and 3 deletions

View File

@ -84,8 +84,7 @@ public class ScriptClassInfo {
componentType -> "Painless can only implement execute methods returning a whitelisted type but [" + baseClass.getName() componentType -> "Painless can only implement execute methods returning a whitelisted type but [" + baseClass.getName()
+ "#execute] returns [" + componentType.getName() + "] which isn't whitelisted."); + "#execute] returns [" + componentType.getName() + "] which isn't whitelisted.");
// Look up the argument names // Look up the argument
Set<String> argumentNames = new LinkedHashSet<>();
List<MethodArgument> arguments = new ArrayList<>(); List<MethodArgument> arguments = new ArrayList<>();
String[] argumentNamesConstant = readArgumentNamesConstant(baseClass); String[] argumentNamesConstant = readArgumentNamesConstant(baseClass);
Class<?>[] types = executeMethod.getParameterTypes(); Class<?>[] types = executeMethod.getParameterTypes();
@ -95,7 +94,6 @@ public class ScriptClassInfo {
} }
for (int arg = 0; arg < types.length; arg++) { for (int arg = 0; arg < types.length; arg++) {
arguments.add(methodArgument(definition, types[arg], argumentNamesConstant[arg])); arguments.add(methodArgument(definition, types[arg], argumentNamesConstant[arg]));
argumentNames.add(argumentNamesConstant[arg]);
} }
this.executeArguments = unmodifiableList(arguments); this.executeArguments = unmodifiableList(arguments);
this.needsMethods = unmodifiableList(needsMethods); this.needsMethods = unmodifiableList(needsMethods);