harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjanu...@apache.org
Subject svn commit: r675615 - in /harmony/enhanced/classlib/trunk/modules/pack200/src: main/java/org/apache/harmony/unpack200/ main/java/org/apache/harmony/unpack200/bytecode/ test/java/org/apache/harmony/unpack200/tests/ test/java/org/apache/harmony/unpack200...
Date Thu, 10 Jul 2008 15:18:20 GMT
Author: sjanuary
Date: Thu Jul 10 08:18:08 2008
New Revision: 675615

URL: http://svn.apache.org/viewvc?rev=675615&view=rev
Log:
Pack200 - removed unnecessary class constant pool 'domain' related code, which was used for sorting the constant pool before the latest re-write.

Modified:
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/BandSet.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/ClassBands.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/NewAttributeBands.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentConstantPool.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/AnnotationDefaultAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPClass.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPDouble.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPFieldRef.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPFloat.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPInteger.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPInterfaceMethodRef.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPLong.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPMethodRef.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPNameAndType.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPString.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPUTF8.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CodeAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ConstantPoolEntry.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ConstantValueAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/DeprecatedAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/EnclosingMethodAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ExceptionsAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/InnerClassesAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LineNumberTableAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTableAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTypeTableAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SignatureAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SourceFileAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/AttributeLayoutTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/BcBandsTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/CPUTF8Test.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/CodeAttributeTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/bytecode/ClassFileEntryTest.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/bytecode/ConstantPoolTest.java

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/BandSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/BandSet.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/BandSet.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/BandSet.java Thu Jul 10 08:18:08 2008
@@ -37,7 +37,6 @@
 import org.apache.harmony.unpack200.bytecode.CPNameAndType;
 import org.apache.harmony.unpack200.bytecode.CPString;
 import org.apache.harmony.unpack200.bytecode.CPUTF8;
-import org.apache.harmony.unpack200.bytecode.ClassConstantPool;
 
 /**
  * Abstract superclass for a set of bands
@@ -478,8 +477,7 @@
         CPUTF8[] result = new CPUTF8[indices.length];
         for (int i1 = 0; i1 < count; i1++) {
             int index = indices[i1];
-            result[i1] = segment.getCpBands().cpUTF8Value(index,
-                    ClassConstantPool.DOMAIN_NORMALASCIIZ);
+            result[i1] = segment.getCpBands().cpUTF8Value(index);
         }
         return result;
     }
@@ -496,8 +494,7 @@
         int[] indices = decodeBandInt(name, in, codec, sum);
         for (int i1 = 0; i1 < sum; i1++) {
             int index = indices[i1];
-            result1[i1] = segment.getCpBands().cpUTF8Value(index,
-                    ClassConstantPool.DOMAIN_NORMALASCIIZ);
+            result1[i1] = segment.getCpBands().cpUTF8Value(index);
         }
         CPUTF8[] refs = result1;
         int pos = 0;

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/ClassBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/ClassBands.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/ClassBands.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/ClassBands.java Thu Jul 10 08:18:08 2008
@@ -28,7 +28,6 @@
 import org.apache.harmony.unpack200.bytecode.CPClass;
 import org.apache.harmony.unpack200.bytecode.CPNameAndType;
 import org.apache.harmony.unpack200.bytecode.CPUTF8;
-import org.apache.harmony.unpack200.bytecode.ClassConstantPool;
 import org.apache.harmony.unpack200.bytecode.ClassFileEntry;
 import org.apache.harmony.unpack200.bytecode.ConstantValueAttribute;
 import org.apache.harmony.unpack200.bytecode.DeprecatedAttribute;
@@ -625,7 +624,7 @@
                         className = className.substring(0, index);
                     }
                     // Add .java to the end
-                    value = cpBands.cpUTF8Value(className + ".java", ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ, true);
+                    value = cpBands.cpUTF8Value(className + ".java", true);
                 }
                 classAttributes[i].add(new SourceFileAttribute((CPUTF8)value));
                 sourceFileIndex++;
@@ -848,11 +847,11 @@
                 CPUTF8 element = localVariableTableTypeRS[x][y];
                 // TODO: come up with a better test for native vs nonnative
                 // signatures?
-                if (element.underlyingString().length() > 2) {
-                    element.setDomain(ClassConstantPool.DOMAIN_SIGNATUREASCIIZ);
-                } else {
-                    element.setDomain(ClassConstantPool.DOMAIN_NORMALASCIIZ);
-                }
+//                if (element.underlyingString().length() > 2) {
+//                    element.setDomain(ClassConstantPool.DOMAIN_SIGNATUREASCIIZ);
+//                } else {
+//                    element.setDomain(ClassConstantPool.DOMAIN_NORMALASCIIZ);
+//                }
             }
         }
 

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java Thu Jul 10 08:18:08 2008
@@ -34,7 +34,6 @@
 import org.apache.harmony.unpack200.bytecode.CPNameAndType;
 import org.apache.harmony.unpack200.bytecode.CPString;
 import org.apache.harmony.unpack200.bytecode.CPUTF8;
-import org.apache.harmony.unpack200.bytecode.ClassConstantPool;
 
 /**
  * Constant Pool bands
@@ -74,7 +73,7 @@
     private int[] cpStringInts;
     private String[] cpUTF8;
 
-    private final HashMap[] stringsToCPUTF8 = new HashMap[ClassConstantPool.NUM_DOMAINS];
+    private final HashMap stringsToCPUTF8 = new HashMap();
     private final HashMap stringsToCPStrings = new HashMap();
     private final HashMap longsToCPLongs = new HashMap();
     private final HashMap integersToCPIntegers = new HashMap();
@@ -357,11 +356,11 @@
             }
             cpSignature[i] = signature.toString();
         }
-        for (int i = 0; i < cpSignatureInts.length; i++) {
-            if(cpSignatureInts[i] == -1) {
-                cpSignatureInts[i] = search(cpUTF8, cpSignature[i]);
-            }
-        }
+//        for (int i = 0; i < cpSignatureInts.length; i++) {
+//            if(cpSignatureInts[i] == -1) {
+//                cpSignatureInts[i] = search(cpUTF8, cpSignature[i]);
+//            }
+//        }
     }
 
     /**
@@ -508,35 +507,37 @@
         return cpUTF8;
     }
 
-    public CPUTF8 cpUTF8Value(int index, int domain) {
+    public CPUTF8 cpUTF8Value(int index) {
         String string = cpUTF8[index];
-        if (stringsToCPUTF8[domain] == null) {
-            stringsToCPUTF8[domain] = new HashMap();
+        if(string.equals("[Ljava/lang/String;")) {
+            int i = 0;
         }
-        CPUTF8 cputf8 = (CPUTF8) stringsToCPUTF8[domain].get(string);
+        CPUTF8 cputf8 = (CPUTF8) stringsToCPUTF8.get(string);
         if (cputf8 == null) {
-            cputf8 = new CPUTF8(string, domain, index);
-            stringsToCPUTF8[domain].put(string, cputf8);
+            cputf8 = new CPUTF8(string, index);
+            stringsToCPUTF8.put(string, cputf8);
+        } else if(cputf8.getGlobalIndex() > index) {
+            cputf8.setGlobalIndex(index);
         }
         return cputf8;
     }
 
-    public CPUTF8 cpUTF8Value(String string, int domain) {
-        return cpUTF8Value(string, domain, true);
+    public CPUTF8 cpUTF8Value(String string) {
+        return cpUTF8Value(string, true);
     }
 
-    public CPUTF8 cpUTF8Value(String string, int domain, boolean searchForIndex) {
-        if (stringsToCPUTF8[domain] == null) {
-            stringsToCPUTF8[domain] = new HashMap();
+    public CPUTF8 cpUTF8Value(String string, boolean searchForIndex) {
+        if(string.equals("[Ljava/lang/String;")) {
+            int i = 0;
         }
-        CPUTF8 cputf8 = (CPUTF8) stringsToCPUTF8[domain].get(string);
+        CPUTF8 cputf8 = (CPUTF8) stringsToCPUTF8.get(string);
         if (cputf8 == null) {
             int index = -1;
             if(searchForIndex) {
                 index = search(cpUTF8, string);
             }
             if(index != -1) {
-                return cpUTF8Value(index, domain);
+                return cpUTF8Value(index);
             }
             if(searchForIndex) {
                 index = search(cpSignature, string);
@@ -544,8 +545,8 @@
             if(index != -1) {
                 return cpSignatureValue(index);
             }
-            cputf8 = new CPUTF8(string, domain, -1);
-            stringsToCPUTF8[domain].put(string, cputf8);
+            cputf8 = new CPUTF8(string, -1);
+            stringsToCPUTF8.put(string, cputf8);
         }
         return cputf8;
     }
@@ -556,8 +557,7 @@
         int globalIndex = stringOffset + index;
         CPString cpString = (CPString) stringsToCPStrings.get(string);
         if (cpString == null) {
-            cpString = new CPString(cpUTF8Value(utf8Index,
-                    ClassConstantPool.DOMAIN_NORMALASCIIZ), globalIndex);
+            cpString = new CPString(cpUTF8Value(utf8Index), globalIndex);
             stringsToCPStrings.put(string, cpString);
         }
         return cpString;
@@ -599,8 +599,7 @@
         int globalIndex = classOffset + index;
         CPClass cpString = (CPClass) stringsToCPClass.get(string);
         if (cpString == null) {
-            cpString = new CPClass(cpUTF8Value(utf8Index,
-                    ClassConstantPool.DOMAIN_NORMALASCIIZ), globalIndex);
+            cpString = new CPClass(cpUTF8Value(utf8Index), globalIndex);
             stringsToCPClass.put(string, cpString);
         }
         return cpString;
@@ -613,8 +612,7 @@
             if(index != -1) {
                 return cpClassValue(index);
             }
-            cpString = new CPClass(cpUTF8Value(string,
-                    ClassConstantPool.DOMAIN_NORMALASCIIZ, false), -1);
+            cpString = new CPClass(cpUTF8Value(string, false), -1);
             stringsToCPClass.put(string, cpString);
         }
         return cpString;
@@ -644,7 +642,6 @@
         CPNameAndType cpNameAndType = (CPNameAndType) descriptorsToCPNameAndTypes
                 .get(descriptor);
         if (cpNameAndType == null) {
-            int descriptorDomain = ClassConstantPool.DOMAIN_UNDEFINED;
             int nameIndex = cpDescriptorNameInts[index];
             int descriptorIndex = cpDescriptorTypeInts[index];
             String descriptorString = cpSignature[descriptorIndex];
@@ -663,18 +660,15 @@
                     break;
                 }
             }
-            int domain = ClassConstantPool.DOMAIN_NAMEANDTYPE;
-            CPUTF8 name = cpUTF8Value(nameIndex,
-                    ClassConstantPool.DOMAIN_NORMALASCIIZ);
-            if (nativeDescriptor) {
-                // Native signatures are stored in DOMAIN_NORMALASCIIZ, not
-                // DOMAIN_SIGNATUREASCIIZ for some reason.
-                descriptorDomain = ClassConstantPool.DOMAIN_NORMALASCIIZ;
-            } else {
-                descriptorDomain = ClassConstantPool.DOMAIN_SIGNATUREASCIIZ;
-            }
-            CPUTF8 descriptorU = cpSignatureValue(descriptorIndex, descriptorDomain);
-            cpNameAndType = new CPNameAndType(name, descriptorU, domain, index + descrOffset);
+            CPUTF8 name = cpUTF8Value(nameIndex);
+//            if (nativeDescriptor) {
+//                // Native signatures are stored in DOMAIN_NORMALASCIIZ, not
+//                // DOMAIN_SIGNATUREASCIIZ for some reason.
+//            } else {
+//                descriptorDomain = ClassConstantPool.DOMAIN_SIGNATUREASCIIZ;
+//            }
+            CPUTF8 descriptorU = cpSignatureValue(descriptorIndex);
+            cpNameAndType = new CPNameAndType(name, descriptorU, index + descrOffset);
             descriptorsToCPNameAndTypes.put(descriptor, cpNameAndType);
         }
         return cpNameAndType;
@@ -699,24 +693,20 @@
     }
 
     public CPUTF8 cpSignatureValue(int index) {
-        return cpSignatureValue(index, ClassConstantPool.DOMAIN_SIGNATUREASCIIZ);
-    }
-
-    public CPUTF8 cpSignatureValue(int index, int domain) {
         int globalIndex;
         if(cpSignatureInts[index] != -1) {
             globalIndex = cpSignatureInts[index];
         } else {
             globalIndex = index + signatureOffset;
         }
-        if (stringsToCPUTF8[domain] == null) {
-            stringsToCPUTF8[domain] = new HashMap();
-        }
         String string = cpSignature[index];
-        CPUTF8 cpUTF8 = (CPUTF8) stringsToCPUTF8[domain].get(string);
+        if(string.equals("[Ljava/lang/String;")) {
+            int i = 0;
+        }
+        CPUTF8 cpUTF8 = (CPUTF8) stringsToCPUTF8.get(string);
         if(cpUTF8 == null) {
-            cpUTF8 = new CPUTF8(string, domain, globalIndex);
-            stringsToCPUTF8[domain].put(string, cpUTF8);
+            cpUTF8 = new CPUTF8(string, globalIndex);
+            stringsToCPUTF8.put(string, cpUTF8);
         }
         return cpUTF8;
     }
@@ -729,7 +719,6 @@
             if(index != -1) {
                 return cpNameAndTypeValue(index);
             }
-            int descriptorDomain = ClassConstantPool.DOMAIN_UNDEFINED;
             int colon = descriptor.indexOf(':');
             String nameString = descriptor.substring(0, colon);
             String descriptorString = descriptor.substring(colon + 1);
@@ -747,18 +736,18 @@
                     break;
                 }
             }
-            int domain = ClassConstantPool.DOMAIN_NAMEANDTYPE;
-            CPUTF8 name = cpUTF8Value(nameString,
-                    ClassConstantPool.DOMAIN_NORMALASCIIZ, true);
-            if (nativeDescriptor) {
-                // Native signatures are stored in DOMAIN_NORMALASCIIZ, not
-                // DOMAIN_SIGNATUREASCIIZ for some reason.
-                descriptorDomain = ClassConstantPool.DOMAIN_NORMALASCIIZ;
-            } else {
-                descriptorDomain = ClassConstantPool.DOMAIN_SIGNATUREASCIIZ;
-            }
-            CPUTF8 descriptorU = cpUTF8Value(descriptorString, descriptorDomain, true);
-            cpNameAndType = new CPNameAndType(name, descriptorU, domain, index + descrOffset);
+//            int domain = ClassConstantPool.DOMAIN_NAMEANDTYPE;
+            CPUTF8 name = cpUTF8Value(nameString, true);
+//                    ClassConstantPool.DOMAIN_NORMALASCIIZ, true);
+//            if (nativeDescriptor) {
+//                // Native signatures are stored in DOMAIN_NORMALASCIIZ, not
+//                // DOMAIN_SIGNATUREASCIIZ for some reason.
+//                descriptorDomain = ClassConstantPool.DOMAIN_NORMALASCIIZ;
+//            } else {
+//                descriptorDomain = ClassConstantPool.DOMAIN_SIGNATUREASCIIZ;
+//            }
+            CPUTF8 descriptorU = cpUTF8Value(descriptorString, true);
+            cpNameAndType = new CPNameAndType(name, descriptorU, index + descrOffset);
             descriptorsToCPNameAndTypes.put(descriptor, cpNameAndType);
         }
         return cpNameAndType;

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java Thu Jul 10 08:18:08 2008
@@ -28,7 +28,6 @@
 import org.apache.harmony.unpack200.bytecode.CPInteger;
 import org.apache.harmony.unpack200.bytecode.CPLong;
 import org.apache.harmony.unpack200.bytecode.CPUTF8;
-import org.apache.harmony.unpack200.bytecode.ClassConstantPool;
 import org.apache.harmony.unpack200.bytecode.RuntimeVisibleorInvisibleAnnotationsAttribute;
 import org.apache.harmony.unpack200.bytecode.RuntimeVisibleorInvisibleParameterAnnotationsAttribute;
 import org.apache.harmony.unpack200.bytecode.AnnotationsAttribute.Annotation;
@@ -43,16 +42,12 @@
     private final String type;
     private final CpBands cpBands;
 
-    private final CPUTF8 rvaUTF8 = new CPUTF8("RuntimeVisibleAnnotations",
-            ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ);
-    private final CPUTF8 riaUTF8 = new CPUTF8("RuntimeInvisibleAnnotations",
-            ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ);
+    private final CPUTF8 rvaUTF8 = new CPUTF8("RuntimeVisibleAnnotations");
+    private final CPUTF8 riaUTF8 = new CPUTF8("RuntimeInvisibleAnnotations");
     private final CPUTF8 rvpaUTF8 = new CPUTF8(
-            "RuntimeVisibleParameterAnnotations",
-            ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ);
+            "RuntimeVisibleParameterAnnotations");
     private final CPUTF8 ripaUTF8 = new CPUTF8(
-            "RuntimeInvisibleParameterAnnotations",
-            ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ);
+            "RuntimeInvisibleParameterAnnotations");
 
     public MetadataBandGroup(String type, CpBands cpBands) {
         this.type = type;

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/NewAttributeBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/NewAttributeBands.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/NewAttributeBands.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/NewAttributeBands.java Thu Jul 10 08:18:08 2008
@@ -38,7 +38,6 @@
 import org.apache.harmony.unpack200.bytecode.CPNameAndType;
 import org.apache.harmony.unpack200.bytecode.CPString;
 import org.apache.harmony.unpack200.bytecode.CPUTF8;
-import org.apache.harmony.unpack200.bytecode.ClassConstantPool;
 import org.apache.harmony.unpack200.bytecode.NewAttribute;
 
 /**
@@ -100,8 +99,7 @@
      */
     private Attribute getOneAttribute(int index, List elements) {
         NewAttribute attribute = new NewAttribute(segment.getCpBands()
-                .cpUTF8Value(attributeLayout.getName(),
-                        ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ),
+                .cpUTF8Value(attributeLayout.getName()),
                 attributeLayout.getIndex());
         for (Iterator iter = elements.iterator(); iter.hasNext();) {
             AttributeLayoutElement element = (AttributeLayoutElement) iter

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java Thu Jul 10 08:18:08 2008
@@ -142,8 +142,7 @@
                     fileName = fullName.substring(i) + ".java";
                 }
                 sourceFileAttribute = new SourceFileAttribute(cpBands
-                        .cpUTF8Value(fileName,
-                                ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ, false));
+                        .cpUTF8Value(fileName, false));
                 classFile.attributes = new Attribute[] { (Attribute) cp
                         .add(sourceFileAttribute) };
             } else {
@@ -197,10 +196,8 @@
             int descriptorIndex = classBands.getFieldDescrInts()[classNum][i];
             int nameIndex = cpBands.getCpDescriptorNameInts()[descriptorIndex];
             int typeIndex = cpBands.getCpDescriptorTypeInts()[descriptorIndex];
-            CPUTF8 name = cpBands.cpUTF8Value(nameIndex,
-                    ClassConstantPool.DOMAIN_NORMALASCIIZ);
-            CPUTF8 descriptor = cpBands.cpSignatureValue(typeIndex,
-                    ClassConstantPool.DOMAIN_SIGNATUREASCIIZ);
+            CPUTF8 name = cpBands.cpUTF8Value(nameIndex);
+            CPUTF8 descriptor = cpBands.cpSignatureValue(typeIndex);
             cfFields[i] = cp.add(new CPField(name, descriptor, classBands
                     .getFieldFlags()[classNum][i], classBands
                     .getFieldAttributes()[classNum][i]));
@@ -214,10 +211,8 @@
 //            int colon = descriptorStr.indexOf(':');
             int nameIndex = cpBands.getCpDescriptorNameInts()[descriptorIndex];
             int typeIndex = cpBands.getCpDescriptorTypeInts()[descriptorIndex];
-            CPUTF8 name = cpBands.cpUTF8Value(nameIndex,
-                    ClassConstantPool.DOMAIN_NORMALASCIIZ);
-            CPUTF8 descriptor = cpBands.cpSignatureValue(typeIndex,
-                    ClassConstantPool.DOMAIN_SIGNATUREASCIIZ);
+            CPUTF8 name = cpBands.cpUTF8Value(nameIndex);
+            CPUTF8 descriptor = cpBands.cpSignatureValue(typeIndex);
             cfMethods[i] = cp.add(new CPMethod(name, descriptor, classBands
                     .getMethodFlags()[classNum][i], classBands
                     .getMethodAttributes()[classNum][i]));
@@ -250,10 +245,8 @@
                     .cpClassValue(innerClassString);
             if (!ic_stored[index].isAnonymous()) {
                 innerName = simpleClassNameIndex != -1 ? cpBands.cpUTF8Value(
-                        simpleClassNameIndex,
-                        ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ) : cpBands
-                        .cpUTF8Value(simpleClassName,
-                                ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ);
+                        simpleClassNameIndex) : cpBands
+                        .cpUTF8Value(simpleClassName);
             }
 
             if (ic_stored[index].isMember()) {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentConstantPool.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentConstantPool.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentConstantPool.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentConstantPool.java Thu Jul 10 08:18:08 2008
@@ -16,11 +16,11 @@
  */
 package org.apache.harmony.unpack200;
 
+import java.util.List;
+
 import org.apache.harmony.pack200.Pack200Exception;
-import org.apache.harmony.unpack200.bytecode.ClassConstantPool;
 import org.apache.harmony.unpack200.bytecode.ClassFileEntry;
 import org.apache.harmony.unpack200.bytecode.ConstantPoolEntry;
-import java.util.List;
 
 /**
  * SegmentConstantPool manages the constant pool used for re-creating class
@@ -64,7 +64,7 @@
         } else if (index < 0) {
             throw new Pack200Exception("Cannot have a negative range");
         } else if (cp == UTF_8) {
-            return bands.cpUTF8Value(index, ClassConstantPool.DOMAIN_NORMALASCIIZ);
+            return bands.cpUTF8Value(index);
         } else if (cp == CP_INT) {
             return bands.cpIntegerValue(index);
         } else if (cp == CP_FLOAT) {
@@ -203,9 +203,9 @@
      * of the number of hits it finds using the following basis of comparison
      * for a hit: - the primaryArray[index] must be .equals() to the
      * primaryCompareString - the secondaryArray[index] .matches() the
-     * secondaryCompareString. When the desiredIndex number of hits 
-     * has been reached, the index into the original two arrays of 
-     * the element hit is returned. 
+     * secondaryCompareString. When the desiredIndex number of hits
+     * has been reached, the index into the original two arrays of
+     * the element hit is returned.
      *
      * @param primaryArray
      *            The first array to search
@@ -283,8 +283,7 @@
         } else if (index < 0) {
             throw new Pack200Exception("Cannot have a negative range");
         } else if (cp == UTF_8) {
-            return bands.cpUTF8Value(index,
-                    ClassConstantPool.DOMAIN_NORMALASCIIZ);
+            return bands.cpUTF8Value(index);
         } else if (cp == CP_INT) {
             return bands.cpIntegerValue(index);
         } else if (cp == CP_FLOAT) {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/AnnotationDefaultAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/AnnotationDefaultAttribute.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/AnnotationDefaultAttribute.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/AnnotationDefaultAttribute.java Thu Jul 10 08:18:08 2008
@@ -26,8 +26,7 @@
 
     private final ElementValue element_value;
 
-    private static final CPUTF8 attributeName = new CPUTF8("AnnotationDefault",
-            ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ);
+    private static final CPUTF8 attributeName = new CPUTF8("AnnotationDefault");
 
     public AnnotationDefaultAttribute(ElementValue element_value) {
         super(attributeName);

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPClass.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPClass.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPClass.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPClass.java Thu Jul 10 08:18:08 2008
@@ -40,7 +40,6 @@
     public CPClass(CPUTF8 name, int globalIndex) {
         super(ConstantPoolEntry.CP_Class, globalIndex);
         this.name = name.underlyingString();
-        this.domain = ClassConstantPool.DOMAIN_CLASSREF;
         this.utf8 = name;
         if (name == null) {
             throw new NullPointerException("Null arguments are not allowed");

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPDouble.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPDouble.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPDouble.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPDouble.java Thu Jul 10 08:18:08 2008
@@ -26,7 +26,6 @@
 
     public CPDouble(Double value, int globalIndex) {
         super(ConstantPoolEntry.CP_Double, value, globalIndex);
-        this.domain = ClassConstantPool.DOMAIN_DOUBLE;
     }
 
     protected void writeBody(DataOutputStream dos) throws IOException {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPFieldRef.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPFieldRef.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPFieldRef.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPFieldRef.java Thu Jul 10 08:18:08 2008
@@ -31,7 +31,6 @@
 
     public CPFieldRef(CPClass className, CPNameAndType descriptor, int globalIndex) {
         super(ConstantPoolEntry.CP_Fieldref, globalIndex);
-        this.domain = ClassConstantPool.DOMAIN_FIELD;
         this.className = className;
         this.nameAndType = descriptor;
     }

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPFloat.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPFloat.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPFloat.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPFloat.java Thu Jul 10 08:18:08 2008
@@ -26,7 +26,6 @@
 
     public CPFloat(Float value, int globalIndex) {
         super(ConstantPoolEntry.CP_Float, value, globalIndex);
-        this.domain = ClassConstantPool.DOMAIN_FLOAT;
     }
 
     protected void writeBody(DataOutputStream dos) throws IOException {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPInteger.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPInteger.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPInteger.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPInteger.java Thu Jul 10 08:18:08 2008
@@ -26,7 +26,6 @@
 
     public CPInteger(Integer value, int globalIndex) {
         super(ConstantPoolEntry.CP_Integer, value, globalIndex);
-        this.domain = ClassConstantPool.DOMAIN_INTEGER;
     }
 
     protected void writeBody(DataOutputStream dos) throws IOException {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPInterfaceMethodRef.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPInterfaceMethodRef.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPInterfaceMethodRef.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPInterfaceMethodRef.java Thu Jul 10 08:18:08 2008
@@ -20,7 +20,6 @@
 
     public CPInterfaceMethodRef(CPClass className, CPNameAndType descriptor, int globalIndex) {
         super(ConstantPoolEntry.CP_InterfaceMethodref, className, descriptor, globalIndex);
-        this.domain = ClassConstantPool.DOMAIN_METHOD;
     }
 
     /**

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPLong.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPLong.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPLong.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPLong.java Thu Jul 10 08:18:08 2008
@@ -26,7 +26,6 @@
 
     public CPLong(Long value, int globalIndex) {
         super(ConstantPoolEntry.CP_Long, value, globalIndex);
-        this.domain = ClassConstantPool.DOMAIN_LONG;
     }
 
     protected void writeBody(DataOutputStream dos) throws IOException {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPMethodRef.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPMethodRef.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPMethodRef.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPMethodRef.java Thu Jul 10 08:18:08 2008
@@ -23,7 +23,6 @@
 
     public CPMethodRef(CPClass className, CPNameAndType descriptor, int globalIndex) {
         super(ConstantPoolEntry.CP_Methodref, className, descriptor, globalIndex);
-        this.domain = ClassConstantPool.DOMAIN_METHOD;
     }
 
     protected ClassFileEntry[] getNestedClassFileEntries() {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPNameAndType.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPNameAndType.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPNameAndType.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPNameAndType.java Thu Jul 10 08:18:08 2008
@@ -43,11 +43,10 @@
      * @throws NullPointerException
      *             if name or descriptor is null
      */
-    public CPNameAndType(CPUTF8 name, CPUTF8 descriptor, int domain, int globalIndex) {
+    public CPNameAndType(CPUTF8 name, CPUTF8 descriptor, int globalIndex) {
         super(ConstantPoolEntry.CP_NameAndType, globalIndex);
         this.name = name;
         this.descriptor = descriptor;
-        this.domain = domain;
         if (name == null || descriptor == null) {
             throw new NullPointerException("Null arguments are not allowed");
         }

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPString.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPString.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPString.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPString.java Thu Jul 10 08:18:08 2008
@@ -29,7 +29,6 @@
 
     public CPString(CPUTF8 value, int globalIndex) {
         super(ConstantPoolEntry.CP_String, value, globalIndex);
-        this.domain = ClassConstantPool.DOMAIN_STRING;
         this.name = value;
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPUTF8.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPUTF8.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPUTF8.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPUTF8.java Thu Jul 10 08:18:08 2008
@@ -18,7 +18,6 @@
 
 import java.io.DataOutputStream;
 import java.io.IOException;
-import java.io.UnsupportedEncodingException;
 
 /**
  * UTF8 constant pool entry, used for storing long Strings.
@@ -35,20 +34,16 @@
      * @throws NullPointerException
      *             if utf8 is null
      */
-    public CPUTF8(String utf8, int domain, int globalIndex) {
+    public CPUTF8(String utf8, int globalIndex) {
         super(ConstantPoolEntry.CP_UTF8, globalIndex);
         this.utf8 = utf8;
-        this.domain = domain;
-        if (domain == ClassConstantPool.DOMAIN_UNDEFINED) {
-            throw new RuntimeException();
-        }
         if (utf8 == null) {
             throw new NullPointerException("Null arguments are not allowed");
         }
     }
 
-    public CPUTF8(String string, int domain) {
-        this(string, domain, -1);
+    public CPUTF8(String string) {
+        this(string, -1);
     }
 
     public boolean equals(Object obj) {
@@ -78,4 +73,8 @@
     public String underlyingString() {
         return utf8;
     }
+
+    public void setGlobalIndex(int index) {
+        globalIndex = index;
+    }
 }
\ No newline at end of file

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java Thu Jul 10 08:18:08 2008
@@ -17,7 +17,6 @@
 package org.apache.harmony.unpack200.bytecode;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -33,22 +32,6 @@
  */
 public class ClassConstantPool {
 
-    // These are the domains in sorted order.
-    public static final int DOMAIN_UNDEFINED = 0;
-    public static final int DOMAIN_INTEGER = 1;
-    public static final int DOMAIN_FLOAT = 2;
-    public static final int DOMAIN_STRING = 3;
-    public static final int DOMAIN_NORMALASCIIZ = 4;
-    public static final int DOMAIN_LONG = 5;
-    public static final int DOMAIN_DOUBLE = 6;
-    public static final int DOMAIN_CLASSREF = 7;
-    public static final int DOMAIN_SIGNATUREASCIIZ = 8;
-    public static final int DOMAIN_NAMEANDTYPE = 9;
-    public static final int DOMAIN_FIELD = 10;
-    public static final int DOMAIN_METHOD = 11;
-    public static final int DOMAIN_ATTRIBUTEASCIIZ = 12;
-    public static final int NUM_DOMAINS = DOMAIN_ATTRIBUTEASCIIZ + 1;
-
     protected HashSet entriesContainsSet = new HashSet();
     protected HashSet othersContainsSet = new HashSet();
 
@@ -66,27 +49,6 @@
     private boolean resolved;
 
     public ClassFileEntry add(ClassFileEntry entry) {
-        // We don't want duplicates.
-        // Only add in constant pools, but resolve all types since they may
-        // introduce new constant pool entries
-        // This is a handy way to see what's adding a ClassFileEntry - set a
-        // breakpoint on the print
-        // if(entry instanceof CPLong) {
-        // org.apache.harmony.unpack200.SegmentUtils.debug("AAH:" +
-        // ((CPUTF8)entry).underlyingString());
-        // if (((CPUTF8)entry).underlyingString().indexOf('\b') != -1) {
-        // boolean halt = false;
-        // for(int index=0; index < entries.size(); index++) {
-        // ClassFileEntry foo = (ClassFileEntry)(entries.get(index));
-        // if(foo instanceof CPUTF8) {
-        // if(((CPUTF8)foo).underlyingString().matches(".*MRUBundleFileList.java.*"))
-        // {
-        // halt = true;
-        // }
-        //
-        // }
-        // }
-        // }
         if (entry instanceof ConstantPoolEntry) {
             if (!entriesContainsSet.contains(entry)) {
                 entriesContainsSet.add(entry);
@@ -247,7 +209,7 @@
         Iterator it = entries.iterator();
         while (it.hasNext()) {
             ConstantPoolEntry entry = (ConstantPoolEntry) it.next();
-            if (entry.getDomain() == DOMAIN_CLASSREF) {
+            if (entry instanceof CPClass) {
                 classesList.add(entry);
             }
         }

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CodeAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CodeAttribute.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CodeAttribute.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CodeAttribute.java Thu Jul 10 08:18:08 2008
@@ -34,8 +34,7 @@
     public List exceptionTable; // of ExceptionTableEntry
     public int maxLocals;
     public int maxStack;
-    private static final CPUTF8 attributeName = new CPUTF8("Code",
-            ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ);
+    private static final CPUTF8 attributeName = new CPUTF8("Code");
 
     public CodeAttribute(int maxStack, int maxLocals, byte codePacked[],
             Segment segment, OperandManager operandManager, List exceptionTable) {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ConstantPoolEntry.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ConstantPoolEntry.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ConstantPoolEntry.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ConstantPoolEntry.java Thu Jul 10 08:18:08 2008
@@ -55,9 +55,7 @@
 
     byte tag;
 
-    protected int domain = ClassConstantPool.DOMAIN_UNDEFINED;
-
-    protected final int globalIndex;
+    protected int globalIndex;
 
     ConstantPoolEntry(byte tag, int globalIndex) {
         this.tag = tag;
@@ -70,14 +68,6 @@
         return tag;
     }
 
-    public int getDomain() {
-        return domain;
-    }
-
-    public void setDomain(int newDomain) {
-        this.domain = newDomain;
-    }
-
     public abstract int hashCode();
 
     public void doWrite(DataOutputStream dos) throws IOException {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ConstantValueAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ConstantValueAttribute.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ConstantValueAttribute.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ConstantValueAttribute.java Thu Jul 10 08:18:08 2008
@@ -29,7 +29,7 @@
     private final ClassFileEntry entry;
 
     private static final CPUTF8 attributeName = new CPUTF8(
-            "ConstantValue", ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ); //$NON-NLS-1$
+            "ConstantValue"); //$NON-NLS-1$
 
     public ConstantValueAttribute(ClassFileEntry entry) {
         super(attributeName);

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/DeprecatedAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/DeprecatedAttribute.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/DeprecatedAttribute.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/DeprecatedAttribute.java Thu Jul 10 08:18:08 2008
@@ -24,8 +24,7 @@
  */
 public class DeprecatedAttribute extends Attribute {
 
-    private static final CPUTF8 attributeName = new CPUTF8("Deprecated",
-            ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ);
+    private static final CPUTF8 attributeName = new CPUTF8("Deprecated");
 
     public DeprecatedAttribute() {
         super(attributeName);

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/EnclosingMethodAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/EnclosingMethodAttribute.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/EnclosingMethodAttribute.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/EnclosingMethodAttribute.java Thu Jul 10 08:18:08 2008
@@ -29,7 +29,7 @@
     private final CPClass cpClass;
     private final CPNameAndType method;
     private static final CPUTF8 attributeName = new CPUTF8(
-            "EnclosingMethod", ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ); //$NON-NLS-1$
+            "EnclosingMethod"); //$NON-NLS-1$
 
     public EnclosingMethodAttribute(CPClass cpClass, CPNameAndType method) {
         super(attributeName);

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ExceptionsAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ExceptionsAttribute.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ExceptionsAttribute.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ExceptionsAttribute.java Thu Jul 10 08:18:08 2008
@@ -26,7 +26,7 @@
 public class ExceptionsAttribute extends Attribute {
 
     private static final CPUTF8 attributeName = new CPUTF8(
-            "Exceptions", ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ); //$NON-NLS-1$
+            "Exceptions"); //$NON-NLS-1$
 
     private static int hashCode(Object[] array) {
         final int prime = 31;

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/InnerClassesAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/InnerClassesAttribute.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/InnerClassesAttribute.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/InnerClassesAttribute.java Thu Jul 10 08:18:08 2008
@@ -28,7 +28,7 @@
 public class InnerClassesAttribute extends Attribute {
 
     private static final CPUTF8 attributeName = new CPUTF8(
-            "InnerClasses", ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ); //$NON-NLS-1$
+            "InnerClasses"); //$NON-NLS-1$
 
     private static class InnerClassesEntry {
 

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LineNumberTableAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LineNumberTableAttribute.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LineNumberTableAttribute.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LineNumberTableAttribute.java Thu Jul 10 08:18:08 2008
@@ -28,7 +28,7 @@
     private final int[] start_pcs;
     private final int[] line_numbers;
     private static final CPUTF8 attributeName = new CPUTF8(
-            "LineNumberTable", ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ); //$NON-NLS-1$
+            "LineNumberTable"); //$NON-NLS-1$
 
     public LineNumberTableAttribute(int line_number_table_length,
             int[] start_pcs, int[] line_numbers) {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTableAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTableAttribute.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTableAttribute.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTableAttribute.java Thu Jul 10 08:18:08 2008
@@ -38,7 +38,7 @@
     private final CPUTF8[] descriptors;
     private int codeLength;
     private static final CPUTF8 attributeName = new CPUTF8(
-            "LocalVariableTable", ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ); //$NON-NLS-1$
+            "LocalVariableTable"); //$NON-NLS-1$
 
     public LocalVariableTableAttribute(int local_variable_table_length,
             int[] start_pcs, int[] lengths, CPUTF8[] names,

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTypeTableAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTypeTableAttribute.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTypeTableAttribute.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTypeTableAttribute.java Thu Jul 10 08:18:08 2008
@@ -38,7 +38,7 @@
     private final CPUTF8[] signatures;
     private int codeLength;
     private static final CPUTF8 attributeName = new CPUTF8(
-            "LocalVariableTypeTable", ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ); //$NON-NLS-1$
+            "LocalVariableTypeTable"); //$NON-NLS-1$
 
     public LocalVariableTypeTableAttribute(
             int local_variable_type_table_length, int[] start_pcs,

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SignatureAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SignatureAttribute.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SignatureAttribute.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SignatureAttribute.java Thu Jul 10 08:18:08 2008
@@ -27,8 +27,7 @@
     private int signature_index;
     private final CPUTF8 signature;
 
-    private static final CPUTF8 attributeName = new CPUTF8("Signature",
-            ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ);
+    private static final CPUTF8 attributeName = new CPUTF8("Signature");
 
     public SignatureAttribute(CPUTF8 value) {
         super(attributeName);

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SourceFileAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SourceFileAttribute.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SourceFileAttribute.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SourceFileAttribute.java Thu Jul 10 08:18:08 2008
@@ -27,7 +27,7 @@
     private final CPUTF8 name;
     private int nameIndex;
     private static final CPUTF8 attributeName = new CPUTF8(
-            "SourceFile", ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ); //$NON-NLS-1$
+            "SourceFile"); //$NON-NLS-1$
 
     public SourceFileAttribute(CPUTF8 name) {
         super(attributeName);

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/AttributeLayoutTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/AttributeLayoutTest.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/AttributeLayoutTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/AttributeLayoutTest.java Thu Jul 10 08:18:08 2008
@@ -24,7 +24,6 @@
 import org.apache.harmony.unpack200.Segment;
 import org.apache.harmony.unpack200.SegmentConstantPool;
 import org.apache.harmony.unpack200.bytecode.CPUTF8;
-import org.apache.harmony.unpack200.bytecode.ClassConstantPool;
 import org.apache.harmony.unpack200.bytecode.ClassFileEntry;
 
 public class AttributeLayoutTest extends TestCase {
@@ -60,7 +59,7 @@
         }
 
         private ClassFileEntry entry(String string) {
-            return new CPUTF8(string, ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ);
+            return new CPUTF8(string);
         }
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/BcBandsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/BcBandsTest.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/BcBandsTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/BcBandsTest.java Thu Jul 10 08:18:08 2008
@@ -39,7 +39,6 @@
 import org.apache.harmony.unpack200.bytecode.CPNameAndType;
 import org.apache.harmony.unpack200.bytecode.CPString;
 import org.apache.harmony.unpack200.bytecode.CPUTF8;
-import org.apache.harmony.unpack200.bytecode.ClassConstantPool;
 
 /**
  * Tests for Pack200 bytecode bands
@@ -55,13 +54,10 @@
 
     public class MockCpBands extends CpBands {
 
-        private final CPUTF8 cpUTF8 = new CPUTF8("java/lang/String",
-                ClassConstantPool.DOMAIN_NORMALASCIIZ);
+        private final CPUTF8 cpUTF8 = new CPUTF8("java/lang/String");
         private final CPClass cpClass = new CPClass(cpUTF8, -1);
         private final CPNameAndType descriptor = new CPNameAndType(new CPUTF8(
-                "Hello", ClassConstantPool.DOMAIN_NORMALASCIIZ), new CPUTF8(
-                "(a, b, c)", ClassConstantPool.DOMAIN_NORMALASCIIZ),
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, -1);
+                "Hello"), new CPUTF8("(a, b, c)"), -1);
 
         public MockCpBands(Segment segment) {
             super(segment);
@@ -106,7 +102,7 @@
         public String[] getCpClass() {
             return new String[] {"Hello"};
         }
-        
+
         public String[] getCpFieldClass() {
             return new String[]{};
         }

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/CPUTF8Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/CPUTF8Test.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/CPUTF8Test.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/CPUTF8Test.java Thu Jul 10 08:18:08 2008
@@ -19,17 +19,13 @@
 import junit.framework.TestCase;
 
 import org.apache.harmony.unpack200.bytecode.CPUTF8;
-import org.apache.harmony.unpack200.bytecode.ClassConstantPool;
 
 public class CPUTF8Test extends TestCase {
 
     public void testEquality() {
-        CPUTF8 one = new CPUTF8("(III)V",
-                ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ, 1);
-        CPUTF8 two = new CPUTF8("((I[II)V",
-                ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ, 2);
-        CPUTF8 three = new CPUTF8("([III)V",
-                ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ, 3);
+        CPUTF8 one = new CPUTF8("(III)V", 1);
+        CPUTF8 two = new CPUTF8("((I[II)V", 2);
+        CPUTF8 three = new CPUTF8("([III)V", 3);
         assertFalse(one.equals(two));
         assertFalse(one.equals(three));
         assertFalse(two.equals(three));

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/CodeAttributeTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/CodeAttributeTest.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/CodeAttributeTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/CodeAttributeTest.java Thu Jul 10 08:18:08 2008
@@ -29,7 +29,6 @@
 import org.apache.harmony.unpack200.bytecode.CPMethodRef;
 import org.apache.harmony.unpack200.bytecode.CPString;
 import org.apache.harmony.unpack200.bytecode.CPUTF8;
-import org.apache.harmony.unpack200.bytecode.ClassConstantPool;
 import org.apache.harmony.unpack200.bytecode.CodeAttribute;
 import org.apache.harmony.unpack200.bytecode.LocalVariableTableAttribute;
 import org.apache.harmony.unpack200.bytecode.OperandManager;
@@ -64,7 +63,7 @@
         }
 
         public CPString cpStringValue(int index) {
-            return new CPString(new CPUTF8("Hello", ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ), -1);
+            return new CPString(new CPUTF8("Hello"), -1);
         }
 
         public CPMethodRef cpMethodValue(int index) {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/bytecode/ClassFileEntryTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/bytecode/ClassFileEntryTest.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/bytecode/ClassFileEntryTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/bytecode/ClassFileEntryTest.java Thu Jul 10 08:18:08 2008
@@ -1,18 +1,18 @@
 /*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
  */
 package org.apache.harmony.unpack200.tests.bytecode;
 
@@ -25,18 +25,14 @@
 import org.apache.harmony.unpack200.bytecode.CPMember;
 import org.apache.harmony.unpack200.bytecode.CPString;
 import org.apache.harmony.unpack200.bytecode.CPUTF8;
-import org.apache.harmony.unpack200.bytecode.ClassConstantPool;
 import org.apache.harmony.unpack200.bytecode.SourceFileAttribute;
 
 public class ClassFileEntryTest extends TestCase {
 
     public void testUTF8() {
-        CPUTF8 u1 = new CPUTF8(
-                new String("thing"), ClassConstantPool.DOMAIN_NORMALASCIIZ, 1); //$NON-NLS-1$
-        CPUTF8 u2 = new CPUTF8(
-                new String("thing"), ClassConstantPool.DOMAIN_NORMALASCIIZ, 1); //$NON-NLS-1$
-        CPUTF8 u3 = new CPUTF8(
-                new String("otherthing"), ClassConstantPool.DOMAIN_NORMALASCIIZ, 2); //$NON-NLS-1$
+        CPUTF8 u1 = new CPUTF8(new String("thing"), 1); //$NON-NLS-1$
+        CPUTF8 u2 = new CPUTF8(new String("thing"), 1); //$NON-NLS-1$
+        CPUTF8 u3 = new CPUTF8(new String("otherthing"), 2); //$NON-NLS-1$
         checkEquality(u1, u2, "thing", u3);
     }
 
@@ -52,15 +48,12 @@
     }
 
     public void testSourceAttribute() {
-        SourceFileAttribute sfa1 = new SourceFileAttribute(
-                new CPUTF8(
-                        new String("Thing.java"), ClassConstantPool.DOMAIN_NORMALASCIIZ, 1)); //$NON-NLS-1$
-        SourceFileAttribute sfa2 = new SourceFileAttribute(
-                new CPUTF8(
-                        new String("Thing.java"), ClassConstantPool.DOMAIN_NORMALASCIIZ, 1)); //$NON-NLS-1$
-        SourceFileAttribute sfa3 = new SourceFileAttribute(
-                new CPUTF8(
-                        new String("OtherThing.java"), ClassConstantPool.DOMAIN_NORMALASCIIZ, 2)); //$NON-NLS-1$
+        SourceFileAttribute sfa1 = new SourceFileAttribute(new CPUTF8(
+                new String("Thing.java"), 1)); //$NON-NLS-1$
+        SourceFileAttribute sfa2 = new SourceFileAttribute(new CPUTF8(
+                new String("Thing.java"), 1)); //$NON-NLS-1$
+        SourceFileAttribute sfa3 = new SourceFileAttribute(new CPUTF8(
+                new String("OtherThing.java"), 2)); //$NON-NLS-1$
         checkEquality(sfa1, sfa2, "Thing.java", sfa3); //$NON-NLS-1$
     }
 
@@ -93,28 +86,21 @@
     }
 
     public void testCPString() {
-        CPString cp1 = new CPString(new CPUTF8(new String("3"),
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 3), 3);
-        CPString cp2 = new CPString(new CPUTF8(new String("3"),
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 3), 3);
-        CPString cp3 = new CPString(new CPUTF8(new String("5"),
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 5), 5);
+        CPString cp1 = new CPString(new CPUTF8(new String("3"), 3), 3);
+        CPString cp2 = new CPString(new CPUTF8(new String("3"), 3), 3);
+        CPString cp3 = new CPString(new CPUTF8(new String("5"), 5), 5);
         checkEquality(cp1, cp2, "3", cp3); //$NON-NLS-1$
     }
 
     public void testCPField() {
-        CPMember cp1 = new CPMember(new CPUTF8("Name",
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 3), new CPUTF8("I",
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 4), 0, null);
-        CPMember cp2 = new CPMember(new CPUTF8("Name",
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 3), new CPUTF8("I",
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 4), 0, null);
-        CPMember cp3 = new CPMember(new CPUTF8("Name",
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 3), new CPUTF8("Z",
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 5), 0, null);
-        CPMember cp4 = new CPMember(new CPUTF8("GName",
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 6), new CPUTF8("I",
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 4), 0, null);
+        CPMember cp1 = new CPMember(new CPUTF8("Name", 3), new CPUTF8("I", 4),
+                0, null);
+        CPMember cp2 = new CPMember(new CPUTF8("Name", 3), new CPUTF8("I", 4),
+                0, null);
+        CPMember cp3 = new CPMember(new CPUTF8("Name", 3), new CPUTF8("Z", 5),
+                0, null);
+        CPMember cp4 = new CPMember(new CPUTF8("GName", 6), new CPUTF8("I", 4),
+                0, null);
         checkEquality(cp1, cp2, "Name", cp3); //$NON-NLS-1$
         checkEquality(cp1, cp2, "I", cp4); //$NON-NLS-1$
     }

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/bytecode/ConstantPoolTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/bytecode/ConstantPoolTest.java?rev=675615&r1=675614&r2=675615&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/bytecode/ConstantPoolTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/bytecode/ConstantPoolTest.java Thu Jul 10 08:18:08 2008
@@ -1,18 +1,18 @@
 /*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
  */
 package org.apache.harmony.unpack200.tests.bytecode;
 
@@ -33,43 +33,37 @@
     }
 
     public void testDuplicateUTF8() {
-        CPUTF8 u1 = new CPUTF8("thing", ClassConstantPool.DOMAIN_NORMALASCIIZ, 1);
-        CPUTF8 u2 = new CPUTF8("thing", ClassConstantPool.DOMAIN_NORMALASCIIZ, 1);
+        CPUTF8 u1 = new CPUTF8("thing", 1);
+        CPUTF8 u2 = new CPUTF8("thing", 1);
         pool.add(u1);
         pool.add(u2);
         assertEquals(1, pool.size());
     }
 
     public void testDuplicateField() {
-        CPMember cp1 = new CPMember(new CPUTF8("name",
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 1), new CPUTF8("I",
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 2), 0, null);
+        CPMember cp1 = new CPMember(new CPUTF8("name", 1), new CPUTF8("I", 2),
+                0, null);
         pool.add(cp1);
         pool.addNestedEntries();
         assertEquals(2, pool.size());
-        CPMember cp2 = new CPMember(new CPUTF8("name",
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 1), new CPUTF8("I",
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 2), 0, null);
+        CPMember cp2 = new CPMember(new CPUTF8("name", 1), new CPUTF8("I", 2),
+                0, null);
         pool.add(cp2);
         pool.addNestedEntries();
         assertEquals(2, pool.size());
     }
 
     public void testIndex() {
-        pool
-                .add(new CPUTF8("OtherThing",
-                        ClassConstantPool.DOMAIN_NORMALASCIIZ, 1));
-        CPUTF8 u1 = new CPUTF8("thing", ClassConstantPool.DOMAIN_NORMALASCIIZ, 2);
+        pool.add(new CPUTF8("OtherThing", 1));
+        CPUTF8 u1 = new CPUTF8("thing", 2);
         pool.add(u1);
         pool.resolve(new Segment());
         assertTrue(pool.indexOf(u1) > 0);
     }
 
     public void testAllClasses() {
-        pool.add(new CPClass(new CPUTF8("RandomClass",
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 1), 10));
-        pool.add(new CPClass(new CPUTF8("RandomClass2",
-                ClassConstantPool.DOMAIN_NORMALASCIIZ, 2), 20));
+        pool.add(new CPClass(new CPUTF8("RandomClass", 1), 10));
+        pool.add(new CPClass(new CPUTF8("RandomClass2", 2), 20));
         assertEquals(2, pool.allClasses().size());
     }
 }



Mime
View raw message