diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2008-03-19 19:06:05 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2008-03-19 19:06:05 +0000 |
commit | e570927feb075b54c420005dc0807899aebd87a1 (patch) | |
tree | 9720fae7f1501050a26d9692cd0cbee8e9ba7ad3 | |
parent | b665ab3f354c513a086913fd4c6d328eb33d9d3a (diff) | |
download | javassist-e570927feb075b54c420005dc0807899aebd87a1.tar.gz javassist-e570927feb075b54c420005dc0807899aebd87a1.zip |
fixed JASSIST-56
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@430 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
-rw-r--r-- | src/main/javassist/bytecode/annotation/Annotation.java | 15 |
1 files changed, 10 insertions, 5 deletions
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); } } |