From e570927feb075b54c420005dc0807899aebd87a1 Mon Sep 17 00:00:00 2001 From: chiba Date: Wed, 19 Mar 2008 19:06:05 +0000 Subject: [PATCH] fixed JASSIST-56 git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@430 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- .../javassist/bytecode/annotation/Annotation.java | 15 ++++++++++----- 1 file 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); } } -- 2.39.5