harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r996799 [1/2] - in /harmony/enhanced/java/branches/mrh: ./ classlib/ classlib/modules/archive/src/main/java/java/util/zip/ classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ classlib/modules/awt/make/ cla...
Date Tue, 14 Sep 2010 08:56:47 GMT
Author: hindessm
Date: Tue Sep 14 08:56:45 2010
New Revision: 996799

URL: http://svn.apache.org/viewvc?rev=996799&view=rev
Log:
Merging changes from trunk@996687

Added:
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/RunCodecTest.java
      - copied unchanged from r996687, harmony/enhanced/java/trunk/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/RunCodecTest.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/resources/org/apache/harmony/pack200/tests/annotations.jar
      - copied unchanged from r996687, harmony/enhanced/java/trunk/classlib/modules/pack200/src/test/resources/org/apache/harmony/pack200/tests/annotations.jar
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/resources/org/apache/harmony/pack200/tests/annotations2unpacked.jar
      - copied unchanged from r996687, harmony/enhanced/java/trunk/classlib/modules/pack200/src/test/resources/org/apache/harmony/pack200/tests/annotations2unpacked.jar
    harmony/enhanced/java/branches/mrh/drlvm/vm/tests/excludes/exclude.drlvm_jvmti.freebsd.x86.opt
      - copied unchanged from r996687, harmony/enhanced/java/trunk/drlvm/vm/tests/excludes/exclude.drlvm_jvmti.freebsd.x86.opt
    harmony/enhanced/java/branches/mrh/drlvm/vm/tests/excludes/exclude.drlvm_jvmti.freebsd.x86.srv
      - copied unchanged from r996687, harmony/enhanced/java/trunk/drlvm/vm/tests/excludes/exclude.drlvm_jvmti.freebsd.x86.srv
    harmony/enhanced/java/branches/mrh/drlvm/vm/tests/excludes/exclude.drlvm_jvmti.freebsd.x86_64.opt
      - copied unchanged from r996687, harmony/enhanced/java/trunk/drlvm/vm/tests/excludes/exclude.drlvm_jvmti.freebsd.x86_64.opt
    harmony/enhanced/java/branches/mrh/drlvm/vm/tests/excludes/exclude.drlvm_jvmti.freebsd.x86_64.srv
      - copied unchanged from r996687, harmony/enhanced/java/trunk/drlvm/vm/tests/excludes/exclude.drlvm_jvmti.freebsd.x86_64.srv
Modified:
    harmony/enhanced/java/branches/mrh/   (props changed)
    harmony/enhanced/java/branches/mrh/classlib/   (props changed)
    harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/main/java/java/util/zip/Deflater.java
    harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterTest.java
    harmony/enhanced/java/branches/mrh/classlib/modules/awt/make/depends.properties
    harmony/enhanced/java/branches/mrh/classlib/modules/jmx/make/depends.properties
    harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/shared/luniglob.c
    harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
    harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c
    harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ByteBufferTest.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeDefinitionBands.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/MetadataBandGroup.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttribute.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PackingOptions.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PackingUtils.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/RunCodec.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ByteCodeForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ByteForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ClassRefForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/DoubleForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/FieldRefForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/FloatRefForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/IMethodRefForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/IincForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/InitMethodReferenceForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/IntRefForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LabelForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LocalForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LongForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/MethodRefForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/MultiANewArrayForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/NewInitMethodRefForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/NoArgumentForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ShortForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/StringRefForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SuperFieldRefForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SuperInitMethodRefForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SuperMethodRefForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SwitchForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ThisFieldRefForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ThisInitMethodRefForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ThisMethodRefForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/WideForm.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/CodecTest.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/PopulationCodecTest.java
    harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/AttributeLayoutMapTest.java
    harmony/enhanced/java/branches/mrh/classlib/support/src/test/java/tests/support/Support_NetworkInterface.java
    harmony/enhanced/java/branches/mrh/common_resources/   (props changed)
    harmony/enhanced/java/branches/mrh/common_resources/make/depends.properties
    harmony/enhanced/java/branches/mrh/debian/changelog
    harmony/enhanced/java/branches/mrh/drlvm/   (props changed)
    harmony/enhanced/java/branches/mrh/drlvm/make/depends.properties
    harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/port/unix/thread/thread_os.c
    harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/keytool/ArgumentsParser.java
    harmony/enhanced/java/branches/mrh/jdktools/modules/jretools/src/main/java/org/apache/harmony/jretools/keytool/ArgumentsParser.java
    harmony/enhanced/java/branches/mrh/jdktools/modules/jretools/src/test/java/org/apache/harmony/jretools/tests/keytool/GenKeyTest.java

Propchange: harmony/enhanced/java/branches/mrh/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 14 08:56:45 2010
@@ -1,2 +1,2 @@
 /harmony/enhanced/java/branches/mrh:935751
-/harmony/enhanced/java/trunk:935751-986356
+/harmony/enhanced/java/trunk:935751-996687

Propchange: harmony/enhanced/java/branches/mrh/classlib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 14 08:56:45 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/classlib/trunk:926318-926838
 /harmony/enhanced/java/branches/mrh/classlib:935751
-/harmony/enhanced/java/trunk/classlib:935751-986356
+/harmony/enhanced/java/trunk/classlib:935751-996687
 /harmony/enhanced/trunk/classlib:476395-926317

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/main/java/java/util/zip/Deflater.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/main/java/java/util/zip/Deflater.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/main/java/java/util/zip/Deflater.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/main/java/java/util/zip/Deflater.java Tue Sep 14 08:56:45 2010
@@ -451,9 +451,6 @@ public class Deflater {
         if (level < DEFAULT_COMPRESSION || level > BEST_COMPRESSION) {
             throw new IllegalArgumentException();
         }
-        if (inputBuffer != null) {
-            throw new IllegalStateException();
-        }
         compressLevel = level;
     }
 
@@ -472,9 +469,6 @@ public class Deflater {
         if (strategy < DEFAULT_STRATEGY || strategy > HUFFMAN_ONLY) {
             throw new IllegalArgumentException();
         }
-        if (inputBuffer != null) {
-            throw new IllegalStateException();
-        }
         this.strategy = strategy;
     }
 

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterTest.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterTest.java Tue Sep 14 08:56:45 2010
@@ -676,6 +676,22 @@ public class DeflaterTest extends TestCa
 			defl.end();
 		}
 
+        //test setLevel - Call after inputArray 
+        Deflater defl = new Deflater();
+        defl.setLevel(2);
+        outPutBuf = new byte[500];
+        defl.setInput(byteArray);
+        defl.setLevel(3);
+        while (!defl.needsInput()) {
+            defl.deflate(outPutBuf);
+        }
+        defl.finish();
+        while (!defl.finished()) {
+            defl.deflate(outPutBuf);
+        }
+        totalOut = defl.getTotalOut();
+        defl.end();
+
 		// testing boundaries
 		try {
 			Deflater boundDefl = new Deflater();
@@ -745,6 +761,21 @@ public class DeflaterTest extends TestCa
 			mdefl.end();
 		}
 
+		//Call setStrategy after setInput call
+        byte outPutBuf[] = new byte[500];
+        MyDeflater mdefl = new MyDeflater();
+        mdefl.setStrategy(mdefl.getDefStrategy());
+        mdefl.setInput(byteArray);
+        mdefl.setStrategy(mdefl.getHuffman());
+        while (!mdefl.needsInput()) {
+            mdefl.deflate(outPutBuf);
+        }
+        mdefl.finish();
+        while (!mdefl.finished()) {
+            mdefl.deflate(outPutBuf);
+        }
+        mdefl.end();
+
 		// Attempting to setStrategy to an invalid value
 		try {
 			Deflater defl = new Deflater();

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/awt/make/depends.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/awt/make/depends.properties?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/awt/make/depends.properties (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/awt/make/depends.properties Tue Sep 14 08:56:45 2010
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-sf.base=http://internap.dl.sourceforge.net/sourceforge
+sf.base=http://dfn.dl.sourceforge.net/sourceforge
 dejavu-fonts.dir=${depends.dir}/dejavu-fonts
 dejavu-fonts.fonts.dir=${depends.dir}/dejavu-fonts/dejavu-ttf-2.18
 dejavu-fonts.zip=${dejavu-fonts.dir}/dejavu-ttf-2.18-1.zip

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/jmx/make/depends.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/jmx/make/depends.properties?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/jmx/make/depends.properties (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/jmx/make/depends.properties Tue Sep 14 08:56:45 2010
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 depends.jars=${depends.dir}/jars
-sf.base=http://internap.dl.sourceforge.net/sourceforge
+sf.base=http://dfn.dl.sourceforge.net/sourceforge
 
 mx4j.version=3.0.2
 mx4j.dir=${depends.jars}/mx4j_${mx4j.version}

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/shared/luniglob.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/shared/luniglob.c?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/shared/luniglob.c (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/shared/luniglob.c Tue Sep 14 08:56:45 2010
@@ -57,6 +57,11 @@ JNI_OnLoad (JavaVM * vm, void *reserved)
   char charset[CHARSETBUFF];
   vmiError propRes;
 
+#ifdef ZOS
+  /* Ensure that stdout only line buffers and has a maximum buffer of 128 */
+  setvbuf(stdout, NULL, _IOLBF, 128);
+#endif
+
   /* Query the VM interface */
   vmInterface = VMI_GetVMIFromJavaVM (vm);
   if (!vmInterface)
@@ -156,9 +161,13 @@ JNI_OnLoad (JavaVM * vm, void *reserved)
        /* Many classes depend on correct "file.encoding" value */
        (*vmInterface)->GetSystemProperty (vmInterface, "file.encoding", &propVal);
        if (propVal == NULL) {
+#if defined(ZOS)
+           propRes = (*vmInterface)->SetSystemProperty (vmInterface, "file.encoding", "IBM-1047");
+#else
            /* FIXME provide appropriate non-dummy value */
            getOSCharset(charset, CHARSETBUFF);
            propRes = (*vmInterface)->SetSystemProperty (vmInterface, "file.encoding", charset);
+#endif
            if (VMI_ERROR_NONE != propRes) {
                /* goto fail2; */
            }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c Tue Sep 14 08:56:45 2010
@@ -177,7 +177,7 @@ JNIEXPORT jlong JNICALL Java_org_apache_
     vectors[i].iov_len = lengths[i];
     i++;
   }
-  totalRead = readv(fd - FD_BIAS, vectors, size);
+  totalRead = readv((int)fd - FD_BIAS, vectors, size);
   if(bufsCopied){
     (*env)->ReleaseLongArrayElements(env, jbuffers, bufs, JNI_ABORT);
   }
@@ -259,11 +259,12 @@ Java_org_apache_harmony_luni_platform_OS
     (*env)->ReleasePrimitiveArrayCritical(env, counts, cts, JNI_ABORT);
   }
 
-  result = writev(fd - FD_BIAS, vect, length);
+  result = writev((int)fd - FD_BIAS, vect, length);
 
   if (0 > result) {
     if (errno != EAGAIN) {
-      throwJavaIoIOException(env, "");
+      hyerror_set_last_error(errno, HYPORT_ERROR_OPFAILED);
+      throwJavaIoIOException(env, hyerror_last_error_message());
     }
     result = 0;
   }
@@ -352,7 +353,8 @@ JNIEXPORT jlong JNICALL Java_org_apache_
 (JNIEnv *env, jobject thiz, jlong fd)
 {
   struct stat statbuf;
-  if (fstat(fd - FD_BIAS, &statbuf) < 0) {
+  // cast long handler to int to avoid potential problems
+  if (fstat((int)fd - FD_BIAS, &statbuf) < 0) {
     return -1;
   }
   return (jlong)statbuf.st_size;

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c Tue Sep 14 08:56:45 2010
@@ -181,7 +181,7 @@ JNIEXPORT jlong JNICALL Java_org_apache_
         return -1;
     }
 
-  mapAddress = mmap(0, (size_t)(size&0x7fffffff), prot, flags, fd-FD_BIAS, (off_t)(alignment&0x7fffffff));
+  mapAddress = mmap(0, (size_t)(size&0x7fffffff), prot, flags, (int)fd-FD_BIAS, (off_t)(alignment&0x7fffffff));
   if (mapAddress == MAP_FAILED)
     {
       hyerror_set_last_error(errno, HYPORT_ERROR_OPFAILED);

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ByteBufferTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ByteBufferTest.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ByteBufferTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ByteBufferTest.java Tue Sep 14 08:56:45 2010
@@ -43,6 +43,7 @@ public class ByteBufferTest extends Abst
 
     protected void setUp() throws Exception {
         buf = ByteBuffer.allocate(10);
+        loadTestData1(buf);
         baseBuf = buf;
     }
 

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeDefinitionBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeDefinitionBands.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeDefinitionBands.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeDefinitionBands.java Tue Sep 14 08:56:45 2010
@@ -59,17 +59,19 @@ public class AttributeDefinitionBands ex
 
         for (int i = 0; i < attributePrototypes.length; i++) {
             NewAttribute newAttribute = (NewAttribute) attributePrototypes[i];
-            if (newAttribute.isContextClass()) {
-                classLayouts.put(newAttribute.type, newAttribute.getLayout());
-            }
-            if (newAttribute.isContextMethod()) {
-                methodLayouts.put(newAttribute.type, newAttribute.getLayout());
-            }
-            if (newAttribute.isContextField()) {
-                fieldLayouts.put(newAttribute.type, newAttribute.getLayout());
-            }
-            if (newAttribute.isContextCode()) {
-                codeLayouts.put(newAttribute.type, newAttribute.getLayout());
+            if(!(newAttribute instanceof NewAttribute.ErrorAttribute) && !(newAttribute instanceof NewAttribute.PassAttribute) && !(newAttribute instanceof NewAttribute.StripAttribute)) {
+                if (newAttribute.isContextClass()) {
+                    classLayouts.put(newAttribute.type, newAttribute.getLayout());
+                }
+                if (newAttribute.isContextMethod()) {
+                    methodLayouts.put(newAttribute.type, newAttribute.getLayout());
+                }
+                if (newAttribute.isContextField()) {
+                    fieldLayouts.put(newAttribute.type, newAttribute.getLayout());
+                }
+                if (newAttribute.isContextCode()) {
+                    codeLayouts.put(newAttribute.type, newAttribute.getLayout());
+                }
             }
         }
         if (classLayouts.keySet().size() > 7) {

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java Tue Sep 14 08:56:45 2010
@@ -1327,23 +1327,23 @@ public class ClassBands extends BandSet 
     public void addParameterAnnotation(int parameter, String desc,
             boolean visible, List nameRU, List t, List values, List caseArrayN, List nestTypeRS, List nestNameRU, List nestPairN) {
         if(visible) {
-            method_RVPA_bands.addAnnotation(desc, nameRU, t, values, caseArrayN, nestTypeRS, nestNameRU, nestPairN);
-            Integer flag = (Integer) tempMethodFlags.remove(tempMethodFlags.size() - 1);
+            method_RVPA_bands.addParameterAnnotation(parameter, desc, nameRU, t, values, caseArrayN, nestTypeRS, nestNameRU, nestPairN);
+            Long flag = (Long) tempMethodFlags.remove(tempMethodFlags.size() - 1);
             if((flag.intValue() & (1<<23)) != 0) {
                 method_RVPA_bands.incrementAnnoN();
             } else {
                 method_RVPA_bands.newEntryInAnnoN();
             }
-            tempMethodFlags.add(new Integer(flag.intValue() | (1<<23)));
+            tempMethodFlags.add(new Long(flag.longValue() | (1<<23)));
         } else {
-            method_RIPA_bands.addAnnotation(desc, nameRU, t, values, caseArrayN, nestTypeRS, nestNameRU, nestPairN);
-            Integer flag = (Integer) tempMethodFlags.remove(tempMethodFlags.size() - 1);
-            if((flag.intValue() & (1<<24)) != 0) {
+            method_RIPA_bands.addParameterAnnotation(parameter, desc, nameRU, t, values, caseArrayN, nestTypeRS, nestNameRU, nestPairN);
+            Long flag = (Long) tempMethodFlags.remove(tempMethodFlags.size() - 1);
+            if((flag.longValue() & (1<<24)) != 0) {
                 method_RIPA_bands.incrementAnnoN();
             } else {
                 method_RIPA_bands.newEntryInAnnoN();
             }
-            tempMethodFlags.add(new Integer(flag.intValue() | (1<<24)));
+            tempMethodFlags.add(new Long(flag.longValue() | (1<<24)));
         }
     }
 

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/MetadataBandGroup.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/MetadataBandGroup.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/MetadataBandGroup.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/MetadataBandGroup.java Tue Sep 14 08:56:45 2010
@@ -35,7 +35,7 @@ public class MetadataBandGroup extends B
     private final String type;
     private int numBackwardsCalls = 0;
 
-    public List param_NB = new ArrayList(); // TODO: Lazy instantiation?
+    public IntList param_NB = new IntList(); // TODO: Lazy instantiation?
     public IntList anno_N = new IntList();
     public List type_RS = new ArrayList();
     public IntList pair_N = new IntList();
@@ -95,6 +95,16 @@ public class MetadataBandGroup extends B
             }
             byte[] encodedBand = null;
             if(!type.equals("AD")) {
+                if(type.indexOf('P') != -1) {
+                    // Parameter annotation so we need to transmit param_NB
+                    encodedBand = encodeBandInt(
+                            contextStr + "_" + type + " param_NB", param_NB.toArray(),
+                            Codec.BYTE1);
+                    out.write(encodedBand);
+                    PackingUtils.log("Wrote " + encodedBand.length
+                            + " bytes from " + contextStr + "_" + type + " anno_N["
+                            + param_NB.size() + "]");
+                }
                 encodedBand = encodeBandInt(
                         contextStr + "_" + type + " anno_N", anno_N.toArray(),
                         Codec.UNSIGNED5);
@@ -242,9 +252,26 @@ public class MetadataBandGroup extends B
      * @param nestNameRU
      * @param nestPairN
      */
+    public void addParameterAnnotation(int parameter, String desc, List nameRU, List t, List values, List caseArrayN, List nestTypeRS, List nestNameRU, List nestPairN) {
+        param_NB.add(parameter);
+        addAnnotation(desc, nameRU, t, values, caseArrayN, nestTypeRS, nestNameRU, nestPairN);
+    }
+
+    /**
+     * Add an annotation to this set of bands
+     *
+     * @param desc
+     * @param nameRU
+     * @param t
+     * @param values
+     * @param caseArrayN
+     * @param nestTypeRS
+     * @param nestNameRU
+     * @param nestPairN
+     */
     public void addAnnotation(String desc, List nameRU, List t, List values, List caseArrayN, List nestTypeRS, List nestNameRU, List nestPairN) {
         type_RS.add(cpBands.getCPSignature(desc));
-        pair_N.add(t.size());
+        pair_N.add(nameRU.size());
 
         for (Iterator iterator = nameRU.iterator(); iterator.hasNext();) {
             String name = (String) iterator.next();
@@ -268,7 +295,7 @@ public class MetadataBandGroup extends B
             } else if (tag.equals("J")) {
                 Long value = (Long)valuesIterator.next();
                 caseJ_KJ.add(cpBands.getConstant(value));
-            } else if (tag.equals("C")) {
+            } else if (tag.equals("c")) {
                 String value = (String)valuesIterator.next();
                 casec_RS.add(cpBands.getCPSignature(value));
             } else if (tag.equals("e")) {

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttribute.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttribute.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttribute.java Tue Sep 14 08:56:45 2010
@@ -142,4 +142,61 @@ public class NewAttribute extends Attrib
     public Label getLabel(int index) {
         return labels[index];
     }
+
+    /**
+     * ErrorAttribute extends <code>NewAttribute</code> and manages attributes
+     * encountered by ASM that have had an error action specified to pack200
+     * (e.g. via one of the -C, -M, -F or -D command line options such as
+     * -Cattribute-name=error)
+     */
+    public static class ErrorAttribute extends NewAttribute {
+
+        public ErrorAttribute(String type, int context) {
+            super(type, "", context);
+        }
+
+        protected Attribute read(ClassReader cr, int off, int len, char[] buf,
+                int codeOff, Label[] labels) {
+            throw new Error("Attribute " + type + " was found");
+        }
+
+    }
+
+    /**
+     * StripAttribute extends <code>NewAttribute</code> and manages attributes
+     * encountered by ASM that have had an strip action specified to pack200
+     * (e.g. via one of the -C, -M, -F or -D command line options such as
+     * -Cattribute-name=strip)
+     */
+    public static class StripAttribute extends NewAttribute {
+
+        public StripAttribute(String type, int context) {
+            super(type, "", context);
+        }
+
+        protected Attribute read(ClassReader cr, int off, int len, char[] buf,
+                int codeOff, Label[] labels) {
+            // TODO Not sure if this works, can we really strip an attribute if we don't know the layout?
+            return null;
+        }
+    }
+
+    /**
+     * PassAttribute extends <code>NewAttribute</code> and manages attributes
+     * encountered by ASM that have had an pass action specified to pack200
+     * (e.g. via one of the -C, -M, -F or -D command line options such as
+     * -Cattribute-name=pass)
+     */
+    public static class PassAttribute extends NewAttribute {
+
+        public PassAttribute(String type, int context) {
+            super(type, "", context);
+        }
+
+        protected Attribute read(ClassReader cr, int off, int len, char[] buf,
+                int codeOff, Label[] labels) {
+            throw new Segment.PassException();
+        }
+
+    }
 }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PackingOptions.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PackingOptions.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PackingOptions.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PackingOptions.java Tue Sep 14 08:56:45 2010
@@ -209,10 +209,6 @@ public class PackingOptions {
         }
     }
 
-    public Map getClassAttributeActions() {
-        return classAttributeActions;
-    }
-
     public void addClassAttributeAction(String attributeName, String action) {
         if(classAttributeActions == null) {
             classAttributeActions = new HashMap();
@@ -220,10 +216,6 @@ public class PackingOptions {
         classAttributeActions.put(attributeName, action);
     }
 
-    public Map getFieldAttributeActions() {
-        return fieldAttributeActions;
-    }
-
     public void addFieldAttributeAction(String attributeName, String action) {
         if(fieldAttributeActions == null) {
             fieldAttributeActions = new HashMap();
@@ -231,10 +223,6 @@ public class PackingOptions {
         fieldAttributeActions.put(attributeName, action);
     }
 
-    public Map getMethodAttributeActions() {
-        return methodAttributeActions;
-    }
-
     public void addMethodAttributeAction(String attributeName, String action) {
         if(methodAttributeActions == null) {
             methodAttributeActions = new HashMap();
@@ -242,10 +230,6 @@ public class PackingOptions {
         methodAttributeActions.put(attributeName, action);
     }
 
-    public Map getCodeAttributeActions() {
-        return codeAttributeActions;
-    }
-
     public void addCodeAttributeAction(String attributeName, String action) {
         if(codeAttributeActions == null) {
             codeAttributeActions = new HashMap();
@@ -288,25 +272,29 @@ public class PackingOptions {
                         .hasNext();) {
                     name = (String) iteratorI.next();
                     action = (String) attributeActions.get(name);
-                    if (!ERROR.equals(action) && !STRIP.equals(action)
-                            && !PASS.equals(action)) {
-                        prototypeExists = false;
-                        for (Iterator iteratorJ = prototypes.iterator(); iteratorJ
-                                .hasNext();) {
-                            newAttribute = (NewAttribute) iteratorJ.next();
-                            if (newAttribute.type.equals(name)) {
-                                // if the attribute exists, update its context
-                                newAttribute.addContext(tag);
-                                prototypeExists = true;
-                                break;
-                            }
-                            // if no attribute is found, add a new attribute
-                            if (!prototypeExists) {
-                                newAttribute = new NewAttribute(name, action,
-                                        tag);
-                                prototypes.add(newAttribute);
-                            }
+                    prototypeExists = false;
+                    for (Iterator iteratorJ = prototypes.iterator(); iteratorJ
+                            .hasNext();) {
+                        newAttribute = (NewAttribute) iteratorJ.next();
+                        if (newAttribute.type.equals(name)) {
+                            // if the attribute exists, update its context
+                            newAttribute.addContext(tag);
+                            prototypeExists = true;
+                            break;
+                        }
+                    }
+                    // if no attribute is found, add a new attribute
+                    if (!prototypeExists) {
+                        if (ERROR.equals(action)) {
+                            newAttribute = new NewAttribute.ErrorAttribute(name, tag);
+                        } else if (STRIP.equals(action)) {
+                            newAttribute = new NewAttribute.StripAttribute(name, tag);
+                        } else if (PASS.equals(action)) {
+                            newAttribute = new NewAttribute.PassAttribute(name, tag);
+                        } else {
+                            newAttribute = new NewAttribute(name, action, tag);
                         }
+                        prototypes.add(newAttribute);
                     }
                 }
             }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PackingUtils.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PackingUtils.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PackingUtils.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PackingUtils.java Tue Sep 14 08:56:45 2010
@@ -86,7 +86,7 @@ public class PackingUtils {
     }
 
     /**
-     * When effort is 0, the packer copys through the original jar input stream
+     * When effort is 0, the packer copies through the original jar input stream
      * without compression
      * 
      * @param jarInputStream

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java Tue Sep 14 08:56:45 2010
@@ -151,11 +151,16 @@ public class PopulationCodec extends Cod
     }
 
     public byte[] encode(int[] favoured, int[] tokens, int[] unfavoured) throws Pack200Exception {
-        byte[] favouredEncoded = favouredCodec.encode(favoured);
+        int[] favoured2 = new int[favoured.length + 1];
+        System.arraycopy(favoured, 0, favoured2, 0, favoured.length);
+        favoured2[favoured2.length - 1] = favoured[favoured.length - 1]; // repeat last value;
+        byte[] favouredEncoded = favouredCodec.encode(favoured2);
         byte[] tokensEncoded = tokenCodec.encode(tokens);
         byte[] unfavouredEncoded = unfavouredCodec.encode(unfavoured);
         byte[] band = new byte[favouredEncoded.length + tokensEncoded.length + unfavouredEncoded.length];
-
+        System.arraycopy(favouredEncoded, 0, band, 0, favouredEncoded.length);
+        System.arraycopy(tokensEncoded, 0, band, favouredEncoded.length, tokensEncoded.length);
+        System.arraycopy(unfavouredEncoded, 0, band, favouredEncoded.length + tokensEncoded.length, unfavouredEncoded.length);
         return band;
     }
 

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/RunCodec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/RunCodec.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/RunCodec.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/RunCodec.java Tue Sep 14 08:56:45 2010
@@ -135,13 +135,11 @@ public class RunCodec extends Codec {
     }
 
     public byte[] encode(int value, int last) throws Pack200Exception {
-        // TODO Auto-generated method stub
-        return null;
+        throw new Pack200Exception("Must encode entire band at once with a RunCodec");
     }
 
     public byte[] encode(int value) throws Pack200Exception {
-        // TODO Auto-generated method stub
-        return null;
+        throw new Pack200Exception("Must encode entire band at once with a RunCodec");
     }
 
     public int getK() {

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java Tue Sep 14 08:56:45 2010
@@ -53,7 +53,7 @@ public class Segment implements ClassVis
     private PackingOptions options;
     private boolean stripDebug;
     private Attribute[] nonStandardAttributePrototypes;
-    
+
     /**
      * The main method on Segment. Reads in all the class files, packs them and
      * then writes the packed segment out to the given OutputStream.
@@ -76,11 +76,11 @@ public class Segment implements ClassVis
         this.stripDebug = options.isStripDebug();
         int effort = options.getEffort();
         nonStandardAttributePrototypes = options.getUnknownAttributePrototypes();
-        
+
         PackingUtils.log("Start to pack a new segment with "
                 + segmentUnit.fileListSize() + " files including "
                 + segmentUnit.classListSize() + " classes");
-        
+
         PackingUtils.log("Initialize a header for the segment");
         segmentHeader = new SegmentHeader();
         segmentHeader.setFile_count(segmentUnit.fileListSize());
@@ -89,22 +89,22 @@ public class Segment implements ClassVis
             segmentHeader.setDeflate_hint("true".equals(options
                     .getDeflateHint()));
         }
-        
+
         PackingUtils.log("Setup constant pool bands for the segment");
         cpBands = new CpBands(this, effort);
-        
+
         PackingUtils.log("Setup attribute definition bands for the segment");
         attributeDefinitionBands = new AttributeDefinitionBands(this, effort, nonStandardAttributePrototypes);
-        
+
         PackingUtils.log("Setup internal class bands for the segment");
         icBands = new IcBands(segmentHeader, cpBands, effort);
-        
+
         PackingUtils.log("Setup class bands for the segment");
         classBands = new ClassBands(this, segmentUnit.classListSize(), effort, stripDebug);
-        
+
         PackingUtils.log("Setup byte code bands for the segment");
         bcBands = new BcBands(cpBands, this, effort);
-        
+
         PackingUtils.log("Setup file bands for the segment");
         fileBands = new FileBands(cpBands, segmentHeader, options, segmentUnit, effort);
 
@@ -136,10 +136,10 @@ public class Segment implements ClassVis
 
         headerOutputStream.writeTo(out);
         bandsOutputStream.writeTo(out);
-        
+
         segmentUnit.addPackedByteAmount(headerOutputStream.size());
         segmentUnit.addPackedByteAmount(bandsOutputStream.size());
-        
+
         PackingUtils.log("Wrote total of " + segmentUnit.getPackedByteAmount()
                 + " bytes");
         PackingUtils.log("Transmitted " + segmentUnit.fileListSize() + " files of "
@@ -458,31 +458,40 @@ public class Segment implements ClassVis
                 name = "";
             }
             nameRU.add(name);
-            values.add(value);
-            addTag(value);
+            addValueAndTag(value);
         }
 
-        private void addTag(Object value) {
+        private void addValueAndTag(Object value) {
             if(value instanceof Integer) {
                 T.add("I");
+                values.add(value);
             } else if (value instanceof Double) {
                 T.add("D");
+                values.add(value);
             } else if (value instanceof Float) {
                 T.add("F");
+                values.add(value);
             } else if (value instanceof Long) {
                 T.add("J");
+                values.add(value);
             } else if (value instanceof Byte) {
                 T.add("B");
+                values.add(new Integer(((Byte)value).intValue()));
             } else if (value instanceof Character) {
                 T.add("C");
+                values.add(new Integer(((Character)value).charValue()));
             } else if (value instanceof Short) {
                 T.add("S");
+                values.add(new Integer(((Short)value).intValue()));
             } else if (value instanceof Boolean) {
                 T.add("Z");
+                values.add(new Integer(((Boolean)value).booleanValue() ? 1 : 0));
             } else if (value instanceof String) {
                 T.add("s");
+                values.add(value);
             } else if (value instanceof Type) {
                 T.add("c");
+                values.add(((Type)value).toString());
             }
         }
 
@@ -499,8 +508,7 @@ public class Segment implements ClassVis
                     Integer numPairs = (Integer) nestPairN.remove(nestPairN.size() - 1);
                     nestPairN.add(new Integer(numPairs.intValue() + 1));
                     nestNameRU.add(name);
-                    values.add(value);
-                    addTag(value);
+                    addValueAndTag(value);
                 }
 
                 public AnnotationVisitor visitAnnotation(String arg0,
@@ -543,8 +551,7 @@ public class Segment implements ClassVis
                         name = "";
                     }
                     nameRU.add(name);
-                    values.add(value);
-                    addTag(value);
+                    addValueAndTag(value);
                 }
 
                 public AnnotationVisitor visitAnnotation(String arg0,
@@ -564,10 +571,6 @@ public class Segment implements ClassVis
                     Integer numCases = (Integer) caseArrayN.remove(caseArrayN.size() - 1);
                     caseArrayN.add(new Integer(numCases.intValue() + 1));
                     T.add("e");
-                    if(name == null) {
-                        name = "";
-                    }
-                    nameRU.add(name);
                     values.add(desc);
                     values.add(value);
                 }
@@ -670,7 +673,7 @@ public class Segment implements ClassVis
      * passed through as-is in the file_bands rather than being packed with
      * pack200.
      */
-    public class PassException extends RuntimeException {
+    public static class PassException extends RuntimeException {
 
     }
 }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java Tue Sep 14 08:56:45 2010
@@ -22,6 +22,8 @@ import java.util.Iterator;
 import java.util.List;
 
 import org.apache.harmony.unpack200.bytecode.AnnotationDefaultAttribute;
+import org.apache.harmony.unpack200.bytecode.AnnotationsAttribute.Annotation;
+import org.apache.harmony.unpack200.bytecode.AnnotationsAttribute.ElementValue;
 import org.apache.harmony.unpack200.bytecode.Attribute;
 import org.apache.harmony.unpack200.bytecode.CPDouble;
 import org.apache.harmony.unpack200.bytecode.CPFloat;
@@ -30,8 +32,6 @@ import org.apache.harmony.unpack200.byte
 import org.apache.harmony.unpack200.bytecode.CPUTF8;
 import org.apache.harmony.unpack200.bytecode.RuntimeVisibleorInvisibleAnnotationsAttribute;
 import org.apache.harmony.unpack200.bytecode.RuntimeVisibleorInvisibleParameterAnnotationsAttribute;
-import org.apache.harmony.unpack200.bytecode.AnnotationsAttribute.Annotation;
-import org.apache.harmony.unpack200.bytecode.AnnotationsAttribute.ElementValue;
 import org.apache.harmony.unpack200.bytecode.RuntimeVisibleorInvisibleParameterAnnotationsAttribute.ParameterAnnotation;
 
 /**
@@ -117,8 +117,6 @@ public class MetadataBandGroup {
 
     private int anno_N_Index;
 
-    private Iterator type_RS_Iterator;
-
     private int pair_N_Index;
 
     public List getAttributes() {
@@ -149,7 +147,6 @@ public class MetadataBandGroup {
                     }
                 } else if (type.equals("RVPA") || type.equals("RIPA")) {
                     anno_N_Index = 0;
-                    type_RS_Iterator = Arrays.asList(type_RS).iterator();
                     pair_N_Index = 0;
                     for (int i = 0; i < param_NB.length; i++) {
                         attributes.add(getParameterAttribute(param_NB[i],
@@ -185,14 +182,13 @@ public class MetadataBandGroup {
             int[] pairCounts = pair_N[pair_N_Index++];
             Annotation[] annotations = new Annotation[numAnnotations];
             for (int j = 0; j < annotations.length; j++) {
-                annotations[j] = getAnnotation(
-                        (CPUTF8) type_RS_Iterator.next(), pairCounts[j],
-                        namesIterator);
+                annotations[j] = getAnnotation(type_RS[anno_N_Index - 1][j],
+                        pairCounts[j], namesIterator);
             }
             parameter_annotations[i] = new ParameterAnnotation(annotations);
         }
-        return new RuntimeVisibleorInvisibleParameterAnnotationsAttribute(type
-                .equals("RVPA") ? rvpaUTF8 : ripaUTF8,
+        return new RuntimeVisibleorInvisibleParameterAnnotationsAttribute(
+                type.equals("RVPA") ? rvpaUTF8 : ripaUTF8,
                 parameter_annotations);
     }
 

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java Tue Sep 14 08:56:45 2010
@@ -100,10 +100,6 @@ public class ByteCode extends ClassFileE
         return getByteCodeForm().getOpcode();
     }
 
-    public int getOperandType() {
-        return getByteCodeForm().getOperandType();
-    }
-
     private boolean hashcodeComputed;
     private int cachedHashCode;
 

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ByteCodeForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ByteCodeForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ByteCodeForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ByteCodeForm.java Tue Sep 14 08:56:45 2010
@@ -23,39 +23,7 @@ import org.apache.harmony.unpack200.byte
 import org.apache.harmony.unpack200.bytecode.CodeAttribute;
 import org.apache.harmony.unpack200.bytecode.OperandManager;
 
-public class ByteCodeForm {
-
-    // Operand types. Those with no operands and
-    // those with operands on the operand stack are
-    // treated similarly. These types are used to
-    // distinguish different kinds of non-stack
-    // bytecode operands
-    protected static final int TYPE_NONE = 0;
-    protected static final int TYPE_BYTE = 1;
-    protected static final int TYPE_SHORT = 2;
-    protected static final int TYPE_INTREF = 3;
-    protected static final int TYPE_FLOATREF = 4;
-    protected static final int TYPE_STRINGREF = 5;
-    protected static final int TYPE_CLASSREF = 6;
-    protected static final int TYPE_LONG = 7;
-    protected static final int TYPE_DOUBLE = 8;
-    protected static final int TYPE_LOCAL = 9;
-    protected static final int TYPE_LABEL = 10;
-    protected static final int TYPE_FIELDREF = 11;
-    protected static final int TYPE_METHODREF = 12;
-    protected static final int TYPE_IMETHODREF = 13;
-    protected static final int TYPE_WIDE = 14;
-    protected static final int TYPE_IINC = 15;
-    protected static final int TYPE_SWITCH = 16;
-    protected static final int TYPE_MULTIANEWARRAY = 17;
-    protected static final int TYPE_THISFIELDREF = 18;
-    protected static final int TYPE_THISMETHODREF = 19;
-    protected static final int TYPE_SUPERFIELDREF = 20;
-    protected static final int TYPE_SUPERMETHODREF = 21;
-    protected static final int TYPE_THISINITMETHODREF = 22;
-    protected static final int TYPE_SUPERINITMETHODREF = 23;
-    protected static final int TYPE_NEWINITMETHODREF = 24;
-    protected static final int TYPE_NEWCLASSREF = 25;
+public abstract class ByteCodeForm {
 
     protected static final boolean WIDENED = true;
 
@@ -480,13 +448,8 @@ public class ByteCodeForm {
         return (ByteCodeForm) byteCodeArray[opcode];
     }
 
-    public static ByteCodeForm get(String name) {
-        return (ByteCodeForm) byteCodesByName.get(name);
-    }
-
     public String toString() {
-        return this.getClass().getName() + "(" + getName() + ":"
-                + getOperandType() + ")";
+        return this.getClass().getName() + "(" + getName() + ")";
     }
 
     public int getOpcode() {
@@ -497,10 +460,6 @@ public class ByteCodeForm {
         return name;
     }
 
-    public int getOperandType() {
-        return -1;
-    }
-
     public int[] getRewrite() {
         return rewrite;
     }
@@ -523,106 +482,6 @@ public class ByteCodeForm {
         return false;
     }
 
-    public boolean hasByteOperand() {
-        return false;
-    }
-
-    public boolean hasShortOperand() {
-        return false;
-    }
-
-    public boolean hasIntRefOperand() {
-        return false;
-    }
-
-    public boolean hasFloatRefOperand() {
-        return false;
-    }
-
-    public boolean hasStringRefOperand() {
-        return false;
-    }
-
-    public boolean hasClassRefOperand() {
-        return false;
-    }
-
-    public boolean hasLongOperand() {
-        return false;
-    }
-
-    public boolean hasDoubleOperand() {
-        return false;
-    }
-
-    public boolean hasLocalOperand() {
-        return false;
-    }
-
-    public boolean hasLabelOperand() {
-        return false;
-    }
-
-    public boolean hasFieldRefOperand() {
-        return false;
-    }
-
-    public boolean hasMethodRefOperand() {
-        return false;
-    }
-
-    public boolean hasIMethodRefOperand() {
-        return false;
-    }
-
-    public boolean hasWideOperand() {
-        return false;
-    }
-
-    public boolean hasIincOperand() {
-        return false;
-    }
-
-    public boolean hasSwitchOperand() {
-        return false;
-    }
-
-    public boolean hasMultianewarrayOperand() {
-        return false;
-    }
-
-    public boolean hasThisFieldRefOperand() {
-        return false;
-    }
-
-    public boolean hasThisMethodRefOperand() {
-        return false;
-    }
-
-    public boolean hasSuperFieldRefOperand() {
-        return false;
-    }
-
-    public boolean hasSuperMethodRefOperand() {
-        return false;
-    }
-
-    public boolean hasThisInitMethodRefOperand() {
-        return false;
-    }
-
-    public boolean hasSuperInitMethodRefOperand() {
-        return false;
-    }
-
-    public boolean hasNewInitMethodRefOperand() {
-        return false;
-    }
-
-    public boolean hasInitMethodRefOperand() {
-        return false;
-    }
-
     /**
      * This method will answer true if the receiver is a multi-bytecode
      * instruction (such as aload0_putfield_super); otherwise, it will answer
@@ -657,10 +516,8 @@ public class ByteCodeForm {
      *            of the method. Used in calculating padding for some
      *            variable-length bytecodes (such as lookupswitch, tableswitch).
      */
-    public void setByteCodeOperands(ByteCode byteCode,
-            OperandManager operandManager, int codeLength) {
-        throw new Error("My subclass should have implemented this");
-    }
+    public abstract void setByteCodeOperands(ByteCode byteCode,
+            OperandManager operandManager, int codeLength);
 
     /**
      * The ByteCodeForm knows how to fix up a bytecode if it needs to be fixed

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ByteForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ByteForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ByteForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ByteForm.java Tue Sep 14 08:56:45 2010
@@ -28,14 +28,6 @@ public class ByteForm extends ByteCodeFo
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_BYTE;
-    }
-
-    public boolean hasByteOperand() {
-        return true;
-    }
-
     /*
      * (non-Javadoc)
      *

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ClassRefForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ClassRefForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ClassRefForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ClassRefForm.java Tue Sep 14 08:56:45 2010
@@ -61,14 +61,6 @@ public class ClassRefForm extends Refere
         byteCode.setNestedPositions(new int[][] { { 0, 2 } });
     }
 
-    public int getOperandType() {
-        return TYPE_CLASSREF;
-    }
-
-    public boolean hasClassRefOperand() {
-        return true;
-    }
-
     protected int getOffset(OperandManager operandManager) {
         return operandManager.nextClassRef();
     }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/DoubleForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/DoubleForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/DoubleForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/DoubleForm.java Tue Sep 14 08:56:45 2010
@@ -29,14 +29,6 @@ public class DoubleForm extends Referenc
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_DOUBLE;
-    }
-
-    public boolean hasDoubleOperand() {
-        return true;
-    }
-
     protected int getOffset(OperandManager operandManager) {
         return operandManager.nextDoubleRef();
     }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/FieldRefForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/FieldRefForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/FieldRefForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/FieldRefForm.java Tue Sep 14 08:56:45 2010
@@ -29,14 +29,6 @@ public class FieldRefForm extends Refere
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_FIELDREF;
-    }
-
-    public boolean hasFieldRefOperand() {
-        return true;
-    }
-
     protected int getOffset(OperandManager operandManager) {
         return operandManager.nextFieldRef();
     }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/FloatRefForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/FloatRefForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/FloatRefForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/FloatRefForm.java Tue Sep 14 08:56:45 2010
@@ -33,14 +33,6 @@ public class FloatRefForm extends Single
         this.widened = widened;
     }
 
-    public int getOperandType() {
-        return TYPE_FLOATREF;
-    }
-
-    public boolean hasFloatRefOperand() {
-        return true;
-    }
-
     protected int getOffset(OperandManager operandManager) {
         return operandManager.nextFloatRef();
     }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/IMethodRefForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/IMethodRefForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/IMethodRefForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/IMethodRefForm.java Tue Sep 14 08:56:45 2010
@@ -31,14 +31,6 @@ public class IMethodRefForm extends Refe
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_IMETHODREF;
-    }
-
-    public boolean hasIMethodRefOperand() {
-        return true;
-    }
-
     protected int getOffset(OperandManager operandManager) {
         return operandManager.nextIMethodRef();
     }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/IincForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/IincForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/IincForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/IincForm.java Tue Sep 14 08:56:45 2010
@@ -29,14 +29,6 @@ public class IincForm extends ByteCodeFo
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_IINC;
-    }
-
-    public boolean hasIincOperand() {
-        return true;
-    }
-
     /*
      * (non-Javadoc)
      *

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/InitMethodReferenceForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/InitMethodReferenceForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/InitMethodReferenceForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/InitMethodReferenceForm.java Tue Sep 14 08:56:45 2010
@@ -35,10 +35,6 @@ public abstract class InitMethodReferenc
 
     protected abstract String context(OperandManager operandManager);
 
-    public boolean hasInitMethodRefOperand() {
-        return true;
-    }
-
     protected int getPoolID() {
         return SegmentConstantPool.CP_METHOD;
     }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/IntRefForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/IntRefForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/IntRefForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/IntRefForm.java Tue Sep 14 08:56:45 2010
@@ -34,14 +34,6 @@ public class IntRefForm extends SingleBy
         this.widened = widened;
     }
 
-    public int getOperandType() {
-        return TYPE_INTREF;
-    }
-
-    public boolean hasIntRefOperand() {
-        return true;
-    }
-
     protected int getOffset(OperandManager operandManager) {
         return operandManager.nextIntRef();
     }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LabelForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LabelForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LabelForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LabelForm.java Tue Sep 14 08:56:45 2010
@@ -37,14 +37,6 @@ public class LabelForm extends ByteCodeF
         this.widened = widened;
     }
 
-    public int getOperandType() {
-        return TYPE_LABEL;
-    }
-
-    public boolean hasLabelOperand() {
-        return true;
-    }
-
     /*
      * (non-Javadoc)
      *

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LocalForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LocalForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LocalForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LocalForm.java Tue Sep 14 08:56:45 2010
@@ -34,14 +34,6 @@ public class LocalForm extends ByteCodeF
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_LOCAL;
-    }
-
-    public boolean hasLocalOperand() {
-        return true;
-    }
-
     /*
      * (non-Javadoc)
      *

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LongForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LongForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LongForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LongForm.java Tue Sep 14 08:56:45 2010
@@ -29,14 +29,6 @@ public class LongForm extends ReferenceF
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_LONG;
-    }
-
-    public boolean hasLongOperand() {
-        return true;
-    }
-
     protected int getOffset(OperandManager operandManager) {
         return operandManager.nextLongRef();
     }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/MethodRefForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/MethodRefForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/MethodRefForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/MethodRefForm.java Tue Sep 14 08:56:45 2010
@@ -31,14 +31,6 @@ public class MethodRefForm extends Refer
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_METHODREF;
-    }
-
-    public boolean hasMethodRefOperand() {
-        return true;
-    }
-
     protected int getOffset(OperandManager operandManager) {
         return operandManager.nextMethodRef();
     }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/MultiANewArrayForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/MultiANewArrayForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/MultiANewArrayForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/MultiANewArrayForm.java Tue Sep 14 08:56:45 2010
@@ -31,18 +31,6 @@ public class MultiANewArrayForm extends 
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_MULTIANEWARRAY;
-    }
-
-    public boolean hasMultianewarrayOperand() {
-        return true;
-    }
-
-    public boolean hasClassRefOperand() {
-        return false;
-    }
-
     /*
      * (non-Javadoc)
      *

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/NewInitMethodRefForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/NewInitMethodRefForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/NewInitMethodRefForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/NewInitMethodRefForm.java Tue Sep 14 08:56:45 2010
@@ -32,14 +32,6 @@ public class NewInitMethodRefForm extend
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_NEWINITMETHODREF;
-    }
-
-    public boolean hasNewInitMethodRefOperand() {
-        return true;
-    }
-
     protected String context(OperandManager operandManager) {
         final String result = operandManager.getNewClass();
         return result;

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/NoArgumentForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/NoArgumentForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/NoArgumentForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/NoArgumentForm.java Tue Sep 14 08:56:45 2010
@@ -30,14 +30,6 @@ public class NoArgumentForm extends Byte
         super(opcode, name);
     }
 
-    public int getOperandType() {
-        return TYPE_NONE;
-    }
-
-    public boolean hasNoOperand() {
-        return true;
-    }
-
     /*
      * (non-Javadoc)
      *

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ShortForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ShortForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ShortForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ShortForm.java Tue Sep 14 08:56:45 2010
@@ -28,14 +28,6 @@ public class ShortForm extends ByteCodeF
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_SHORT;
-    }
-
-    public boolean hasShortOperand() {
-        return true;
-    }
-
     /*
      * (non-Javadoc)
      *

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/StringRefForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/StringRefForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/StringRefForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/StringRefForm.java Tue Sep 14 08:56:45 2010
@@ -38,14 +38,6 @@ public class StringRefForm extends Singl
         this.widened = widened;
     }
 
-    public int getOperandType() {
-        return TYPE_STRINGREF;
-    }
-
-    public boolean hasStringRefOperand() {
-        return true;
-    }
-
     protected int getOffset(OperandManager operandManager) {
         return operandManager.nextStringRef();
     }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SuperFieldRefForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SuperFieldRefForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SuperFieldRefForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SuperFieldRefForm.java Tue Sep 14 08:56:45 2010
@@ -31,14 +31,6 @@ public class SuperFieldRefForm extends C
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_SUPERFIELDREF;
-    }
-
-    public boolean hasSuperFieldRefOperand() {
-        return true;
-    }
-
     protected int getOffset(OperandManager operandManager) {
         return operandManager.nextSuperFieldRef();
     }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SuperInitMethodRefForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SuperInitMethodRefForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SuperInitMethodRefForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SuperInitMethodRefForm.java Tue Sep 14 08:56:45 2010
@@ -26,14 +26,6 @@ public class SuperInitMethodRefForm exte
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_SUPERINITMETHODREF;
-    }
-
-    public boolean hasSuperInitMethodRefOperand() {
-        return true;
-    }
-
     protected String context(
             org.apache.harmony.unpack200.bytecode.OperandManager operandManager) {
         return operandManager.getSuperClass();

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SuperMethodRefForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SuperMethodRefForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SuperMethodRefForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SuperMethodRefForm.java Tue Sep 14 08:56:45 2010
@@ -31,14 +31,6 @@ public class SuperMethodRefForm extends 
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_SUPERMETHODREF;
-    }
-
-    public boolean hasSuperMethodRefOperand() {
-        return true;
-    }
-
     protected int getOffset(OperandManager operandManager) {
         return operandManager.nextSuperMethodRef();
     }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SwitchForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SwitchForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SwitchForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SwitchForm.java Tue Sep 14 08:56:45 2010
@@ -30,14 +30,6 @@ public abstract class SwitchForm extends
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_SWITCH;
-    }
-
-    public boolean hasSwitchOperand() {
-        return true;
-    }
-
     /*
      * (non-Javadoc)
      *

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ThisFieldRefForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ThisFieldRefForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ThisFieldRefForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ThisFieldRefForm.java Tue Sep 14 08:56:45 2010
@@ -31,14 +31,6 @@ public class ThisFieldRefForm extends Cl
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_THISFIELDREF;
-    }
-
-    public boolean hasThisFieldRefOperand() {
-        return true;
-    }
-
     protected int getOffset(OperandManager operandManager) {
         return operandManager.nextThisFieldRef();
     }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ThisInitMethodRefForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ThisInitMethodRefForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ThisInitMethodRefForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ThisInitMethodRefForm.java Tue Sep 14 08:56:45 2010
@@ -28,14 +28,6 @@ public class ThisInitMethodRefForm exten
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_THISINITMETHODREF;
-    }
-
-    public boolean hasThisInitMethodRefOperand() {
-        return true;
-    }
-
     protected String context(OperandManager operandManager) {
         return operandManager.getCurrentClass();
     }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ThisMethodRefForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ThisMethodRefForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ThisMethodRefForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/ThisMethodRefForm.java Tue Sep 14 08:56:45 2010
@@ -31,14 +31,6 @@ public class ThisMethodRefForm extends C
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_THISMETHODREF;
-    }
-
-    public boolean hasThisMethodRefOperand() {
-        return true;
-    }
-
     protected int getOffset(OperandManager operandManager) {
         return operandManager.nextThisMethodRef();
     }

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/WideForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/WideForm.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/WideForm.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/WideForm.java Tue Sep 14 08:56:45 2010
@@ -34,14 +34,6 @@ public class WideForm extends VariableIn
         super(opcode, name, rewrite);
     }
 
-    public int getOperandType() {
-        return TYPE_WIDE;
-    }
-
-    public boolean hasWideOperand() {
-        return true;
-    }
-
     /*
      * (non-Javadoc)
      *

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java?rev=996799&r1=996798&r2=996799&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java Tue Sep 14 08:56:45 2010
@@ -345,6 +345,36 @@ public class ArchiveTest extends TestCas
         compareFiles(jarFile, jarFile2);
     }
 
+    public void testAnnotations2() throws IOException, Pack200Exception,
+            URISyntaxException {
+        in = new JarFile(new File(Archive.class.getResource(
+                "/org/apache/harmony/pack200/tests/annotations.jar").toURI()));
+        file = File.createTempFile("annotations", ".pack");
+        file.deleteOnExit();
+        out = new FileOutputStream(file);
+        PackingOptions options = new PackingOptions();
+        options.setGzip(false);
+        new Archive(in, out, options).pack();
+        in.close();
+        out.close();
+
+        // now unpack
+        InputStream in2 = new FileInputStream(file);
+        File file2 = File.createTempFile("annotationsout", ".jar");
+        // file2.deleteOnExit();
+        JarOutputStream out2 = new JarOutputStream(new FileOutputStream(file2));
+        org.apache.harmony.unpack200.Archive archive = new org.apache.harmony.unpack200.Archive(
+                in2, out2);
+        archive.unpack();
+
+        // TODO: This isn't quite right - to fix
+//        JarFile jarFile = new JarFile(file2);
+//        JarFile jarFile2 = new JarFile(new File(Archive.class.getResource(
+//                "/org/apache/harmony/pack200/tests/annotations2unpacked.jar")
+//                .toURI()));
+//        compareFiles(jarFile, jarFile2);
+    }
+
     public void testE0() throws Pack200Exception, IOException, URISyntaxException {
         File f1 = new File(Archive.class.getResource(
                 "/org/apache/harmony/pack200/tests/jndi.jar").toURI());



Mime
View raw message