Closed
Description
Matthias Rühl opened SPR-14554 and commented
java.lang.ArrayIndexOutOfBoundsException: 2
at org.springframework.context.expression.MethodBasedEvaluationContext.lazyLoadArguments(MethodBasedEvaluationContext.java:94)
at org.springframework.context.expression.MethodBasedEvaluationContext.lookupVariable(MethodBasedEvaluationContext.java:68)
at org.springframework.cache.interceptor.CacheEvaluationContext.lookupVariable(CacheEvaluationContext.java:74)
at org.springframework.expression.spel.ExpressionState.lookupVariable(ExpressionState.java:144)
at org.springframework.expression.spel.ast.VariableReference.getValueInternal(VariableReference.java:75)
at org.springframework.expression.spel.ast.MethodReference.getArguments(MethodReference.java:154)
at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:84)
at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:57)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:87)
at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:120)
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:242)
at org.springframework.cache.interceptor.CacheOperationExpressionEvaluator.key(CacheOperationExpressionEvaluator.java:117)
at org.springframework.cache.interceptor.CacheAspectSupport$CacheOperationContext.generateKey(CacheAspectSupport.java:738)
at org.springframework.cache.interceptor.CacheAspectSupport.generateKey(CacheAspectSupport.java:554)
at org.springframework.cache.interceptor.CacheAspectSupport.findCachedItem(CacheAspectSupport.java:498)
at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:389)
at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:327)
at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
This is my cacheable annotation:
@Cacheable(value = "dummyCache", key = "'getSomethingList_'.concat(#var1).concat(T(java.util.Arrays).deepHashCode(#var2))")
List<Something> getSomethingList(String var1, Integer... var2);
Affects: 4.2.7, 4.3.2
Issue Links:
- MethodBasedEvaluationContext.lazyLoadArguments() execution fails for empty variable arguments call [SPR-14453] #19022 MethodBasedEvaluationContext.lazyLoadArguments() execution fails for empty variable arguments call
Referenced from: commits 4543a28, 48980a2, fae503d
Backported to: 4.2.8