diff --git a/core/src/main/java/org/jclouds/rest/internal/RestAnnotationProcessor.java b/core/src/main/java/org/jclouds/rest/internal/RestAnnotationProcessor.java index 1564b57ce8..5e0566e76d 100644 --- a/core/src/main/java/org/jclouds/rest/internal/RestAnnotationProcessor.java +++ b/core/src/main/java/org/jclouds/rest/internal/RestAnnotationProcessor.java @@ -348,7 +348,7 @@ public class RestAnnotationProcessor { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + ((declaringPackage == null) ? 0 : declaringPackage.hashCode()); + result = prime * result + ((declaringClass == null) ? 0 : declaringClass.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + parametersTypeHashCode; return result; @@ -363,10 +363,10 @@ public class RestAnnotationProcessor { if (getClass() != obj.getClass()) return false; MethodKey other = (MethodKey) obj; - if (declaringPackage == null) { - if (other.declaringPackage != null) + if (declaringClass == null) { + if (other.declaringClass != null) return false; - } else if (!declaringPackage.equals(other.declaringPackage)) + } else if (!declaringClass.equals(other.declaringClass)) return false; if (name == null) { if (other.name != null) @@ -380,11 +380,11 @@ public class RestAnnotationProcessor { private final String name; private final int parametersTypeHashCode; - private final Package declaringPackage; + private final Class declaringClass; public MethodKey(Method method) { this.name = method.getName(); - this.declaringPackage = method.getDeclaringClass().getPackage(); + this.declaringClass = method.getDeclaringClass(); int parametersTypeHashCode = 0; for (Class param : method.getParameterTypes()) parametersTypeHashCode += param.hashCode();