Skip to content

Commit

Permalink
removed thread-local tempArray
Browse files Browse the repository at this point in the history
  • Loading branch information
wizzardo committed May 25, 2024
1 parent c7c14ed commit 5adafe0
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ public Function clone() {
return new Function(thatObject.clone(), methodName, args, safeNavigation, file, lineNumber, linePosition);
}

private ThreadLocal<Object[]> tempArray = new ThreadLocal<Object[]>();

interface Getter {
Object get(Object instance);
}
Expand Down Expand Up @@ -428,11 +426,7 @@ protected Object doExecute(Map<String, Object> model) {
}

protected Object[] resolveArgs(Map<String, Object> model) {
Object[] arr;
if ((arr = tempArray.get()) == null) {
arr = new Object[args.length];
tempArray.set(arr);
}
Object[] arr = new Object[args.length];
// System.out.println("try resolve args:");
for (int i = 0; i < arr.length; i++) {
// System.out.println(i+"\t"+args[i]);
Expand Down

0 comments on commit 5adafe0

Please sign in to comment.