diff --git a/hystrix-contrib/hystrix-javanica/build.gradle b/hystrix-contrib/hystrix-javanica/build.gradle index 547f4ad31..3febf6ddb 100644 --- a/hystrix-contrib/hystrix-javanica/build.gradle +++ b/hystrix-contrib/hystrix-javanica/build.gradle @@ -101,7 +101,6 @@ dependencies { compile "org.aspectj:aspectjrt:$aspectjVersion" compileApi 'com.google.guava:guava:15.0' - compile 'commons-collections:commons-collections:3.2.2' compile 'org.apache.commons:commons-lang3:3.1' compileApi 'com.google.code.findbugs:jsr305:2.0.0' compile 'org.ow2.asm:asm:5.0.4' diff --git a/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/FallbackMethod.java b/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/FallbackMethod.java index c73e9e0c6..b19b53fc5 100644 --- a/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/FallbackMethod.java +++ b/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/FallbackMethod.java @@ -22,7 +22,6 @@ import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; import com.netflix.hystrix.contrib.javanica.command.ExecutionType; import com.netflix.hystrix.contrib.javanica.exception.FallbackDefinitionException; -import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; @@ -294,7 +293,7 @@ private static String positionAsString(Type type, List types) { private static int position(Type type, List types) { if (type == null) return -1; - if (CollectionUtils.isEmpty(types)) return -1; + if (types == null || types.isEmpty()) return -1; return types.indexOf(type); }