From: chiba Date: Wed, 19 Mar 2008 19:06:05 +0000 (+0000) Subject: fixed JASSIST-56 X-Git-Tag: rel_3_17_1_ga~213 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e570927feb075b54c420005dc0807899aebd87a1;p=javassist.git fixed JASSIST-56 git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@430 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- diff --git a/src/main/javassist/bytecode/annotation/Annotation.java b/src/main/javassist/bytecode/annotation/Annotation.java index a2cef9a7..1156a460 100644 --- a/src/main/javassist/bytecode/annotation/Annotation.java +++ b/src/main/javassist/bytecode/annotation/Annotation.java @@ -332,10 +332,15 @@ public class Annotation { if (getTypeName().equals(other.getTypeName()) == false) return false; - if (members == null && other.members != null) - return false; - if (members != null && other.members == null) - return false; - return members.equals(other.members); + HashMap otherMembers = other.members; + if (members == otherMembers) + return true; + else if (members == null) + return otherMembers == null; + else + if (otherMembers == null) + return false; + else + return members.equals(otherMembers); } }