]> source.dussan.org Git - javassist.git/commitdiff
since Javassist doesn't support JDK 1.3, I changed the source code to use LinkedHashM...
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Thu, 15 Apr 2010 16:05:15 +0000 (16:05 +0000)
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Thu, 15 Apr 2010 16:05:15 +0000 (16:05 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@530 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

src/main/javassist/bytecode/annotation/Annotation.java

index 075b6e628650ce0d925ecac06ee5379d41bd8238..b48cc8ef43e49c85cf9053e951cf2dde8d31a477 100644 (file)
@@ -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)