From: chiba Date: Thu, 15 Apr 2010 16:05:15 +0000 (+0000) Subject: since Javassist doesn't support JDK 1.3, I changed the source code to use LinkedHashM... X-Git-Tag: rel_3_17_1_ga~120 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ace1eaed1dc97a8c608c576bcb5e6811b128ae56;p=javassist.git since Javassist doesn't support JDK 1.3, I changed the source code to use LinkedHashMap (since 1.4) git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@530 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- diff --git a/src/main/javassist/bytecode/annotation/Annotation.java b/src/main/javassist/bytecode/annotation/Annotation.java index 075b6e62..b48cc8ef 100644 --- a/src/main/javassist/bytecode/annotation/Annotation.java +++ b/src/main/javassist/bytecode/annotation/Annotation.java @@ -23,7 +23,7 @@ import javassist.CtMethod; import javassist.NotFoundException; import java.io.IOException; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Set; import java.util.Iterator; @@ -52,7 +52,7 @@ public class Annotation { ConstPool pool; int typeIndex; - HashMap members; // this sould be LinkedHashMap + LinkedHashMap members; // this sould be LinkedHashMap // but it is not supported by JDK 1.3. /** @@ -107,7 +107,7 @@ public class Annotation { CtMethod methods[] = clazz.getDeclaredMethods(); if (methods.length > 0) { - members = new HashMap(); + members = new LinkedHashMap(); } for (int i = 0; i < methods.length; i++) { @@ -195,7 +195,7 @@ public class Annotation { p.name = pool.addUtf8Info(name); p.value = value; if (members == null) - members = new HashMap(); + members = new LinkedHashMap(); members.put(name, p); } @@ -203,7 +203,7 @@ public class Annotation { private void addMemberValue(Pair pair) { String name = pool.getUtf8Info(pair.name); if (members == null) - members = new HashMap(); + members = new LinkedHashMap(); members.put(name, pair); } @@ -333,7 +333,7 @@ public class Annotation { if (getTypeName().equals(other.getTypeName()) == false) return false; - HashMap otherMembers = other.members; + LinkedHashMap otherMembers = other.members; if (members == otherMembers) return true; else if (members == null)