From fe962dfdb92d77656f309b2428c9223831e38289 Mon Sep 17 00:00:00 2001 From: Dave Brosius Date: Sat, 21 May 2016 18:05:20 -0400 Subject: [PATCH] no need to fetch the method's parameter annotations, if there aren't any. --- .../hystrix/contrib/javanica/cache/CacheInvocationContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/cache/CacheInvocationContext.java b/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/cache/CacheInvocationContext.java index 6d502f082..1f06e5fe3 100644 --- a/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/cache/CacheInvocationContext.java +++ b/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/cache/CacheInvocationContext.java @@ -59,9 +59,9 @@ public CacheInvocationContext(A cacheAnnotation, MethodExecutionAction cacheKeyM this.cacheKeyMethod = cacheKeyMethod; this.cacheAnnotation = cacheAnnotation; Class[] parametersTypes = method.getParameterTypes(); - Annotation[][] parametersAnnotations = method.getParameterAnnotations(); int parameterCount = parametersTypes.length; if (parameterCount > 0) { + Annotation[][] parametersAnnotations = method.getParameterAnnotations(); ImmutableList.Builder parametersBuilder = ImmutableList.builder(); for (int pos = 0; pos < parameterCount; pos++) { Class paramType = parametersTypes[pos];