Skip to content

Commit

Permalink
Remove unused lastReadInvokerPair field in ReflectivePropertyAccessor
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Mar 5, 2024
1 parent ddab971 commit 1fa6ac3
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,13 @@ public class ReflectivePropertyAccessor implements PropertyAccessor {

private final Map<Class<?>, Method[]> sortedMethodsCache = new ConcurrentHashMap<>(64);

@Nullable
private volatile InvokerPair lastReadInvokerPair;


/**
* Create a new property accessor for reading as well writing.
* @see #ReflectivePropertyAccessor(boolean)
*/
public ReflectivePropertyAccessor() {
this.allowWrite = true;
this(true);
}

/**
Expand Down Expand Up @@ -171,7 +168,6 @@ public TypedValue read(EvaluationContext context, @Nullable Object target, Strin

PropertyCacheKey cacheKey = new PropertyCacheKey(type, name, target instanceof Class);
InvokerPair invoker = this.readerCache.get(cacheKey);
this.lastReadInvokerPair = invoker;

if (invoker == null || invoker.member instanceof Method) {
Method method = (Method) (invoker != null ? invoker.member : null);
Expand All @@ -184,7 +180,6 @@ public TypedValue read(EvaluationContext context, @Nullable Object target, Strin
TypeDescriptor typeDescriptor = new TypeDescriptor(property);
method = ClassUtils.getInterfaceMethodIfPossible(method, type);
invoker = new InvokerPair(method, typeDescriptor);
this.lastReadInvokerPair = invoker;
this.readerCache.put(cacheKey, invoker);
}
}
Expand All @@ -206,7 +201,6 @@ public TypedValue read(EvaluationContext context, @Nullable Object target, Strin
field = findField(name, type, target);
if (field != null) {
invoker = new InvokerPair(field, new TypeDescriptor(field));
this.lastReadInvokerPair = invoker;
this.readerCache.put(cacheKey, invoker);
}
}
Expand Down

0 comments on commit 1fa6ac3

Please sign in to comment.