Author: tchemit Date: 2012-07-02 23:36:50 +0200 (Mon, 02 Jul 2012) New Revision: 2373 Url: http://nuiton.org/repositories/revision/jaxx/2373 Log: fixes #2153: ClassDescriptor equals and isAssignableFrom are not correct Modified: trunk/jaxx-compiler/src/main/java/jaxx/compiler/reflect/ClassDescriptor.java Modified: trunk/jaxx-compiler/src/main/java/jaxx/compiler/reflect/ClassDescriptor.java =================================================================== --- trunk/jaxx-compiler/src/main/java/jaxx/compiler/reflect/ClassDescriptor.java 2012-07-02 16:10:23 UTC (rev 2372) +++ trunk/jaxx-compiler/src/main/java/jaxx/compiler/reflect/ClassDescriptor.java 2012-07-02 21:36:50 UTC (rev 2373) @@ -251,7 +251,7 @@ return true; } for (ClassDescriptor anInterface : descriptor.getInterfaces()) { - if (equals(anInterface)) { + if (equals(anInterface) || isAssignableFrom(anInterface)) { return true; } } @@ -265,6 +265,22 @@ return "ClassDescriptor[" + getName() + "]"; } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof ClassDescriptor)) return false; + + ClassDescriptor that = (ClassDescriptor) o; + + return name.equals(that.name); + + } + + @Override + public int hashCode() { + return name.hashCode(); + } + protected ClassDescriptor getClassDescriptor(String fqn) { if (fqn == null) { return null;