harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjanu...@apache.org
Subject svn commit: r997336 - in /harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony: pack200/ unpack200/ unpack200/bytecode/ unpack200/bytecode/forms/
Date Wed, 15 Sep 2010 13:54:50 GMT
Author: sjanuary
Date: Wed Sep 15 13:54:49 2010
New Revision: 997336

URL: http://svn.apache.org/viewvc?rev=997336&view=rev
Log:
Pack200 - remove unused code and fix some minor bugs

Modified:
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/CPMethodOrField.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/CPNameAndType.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/IcBands.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttribute.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200ClassReader.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PackingOptions.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentHeader.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/Archive.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttributeLayout.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/BcBands.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/ClassBands.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentHeader.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentUtils.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPRef.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassFileEntry.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CodeAttribute.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/DeprecatedAttribute.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/EnclosingMethodAttribute.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTableAttribute.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTypeTableAttribute.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/OperandManager.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/RuntimeVisibleorInvisibleAnnotationsAttribute.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/RuntimeVisibleorInvisibleParameterAnnotationsAttribute.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SignatureAttribute.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LocalForm.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LookupSwitchForm.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SwitchForm.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/TableSwitchForm.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/VariableInstructionForm.java
    harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/WideForm.java

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/CPMethodOrField.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/CPMethodOrField.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/CPMethodOrField.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/CPMethodOrField.java Wed Sep 15 13:54:49 2010
@@ -31,18 +31,6 @@ public class CPMethodOrField extends Con
         this.nameAndType = nameAndType;
     }
 
-    public boolean equals(Object obj) {
-        if (obj == null || !(obj instanceof CPMethodOrField)) {
-            return false;
-        }
-        return ((CPMethodOrField) obj).className.equals(className)
-                && ((CPMethodOrField) obj).nameAndType.equals(nameAndType);
-    }
-
-    public int hashCode() {
-        return className.hashCode() + nameAndType.hashCode();
-    }
-
     public String toString() {
         return className + ": " + nameAndType;
     }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/CPNameAndType.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/CPNameAndType.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/CPNameAndType.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/CPNameAndType.java Wed Sep 15 13:54:49 2010
@@ -29,18 +29,6 @@ public class CPNameAndType extends Const
         this.signature = signature;
     }
 
-    public boolean equals(Object obj) {
-        if (obj == null || !(obj instanceof CPNameAndType)) {
-            return false;
-        }
-        return ((CPNameAndType) obj).name.equals(name)
-                && ((CPNameAndType) obj).signature.equals(signature);
-    }
-
-    public int hashCode() {
-        return name.hashCode() + signature.hashCode();
-    }
-
     public String toString() {
         return name + ":" + signature;
     }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java Wed Sep 15 13:54:49 2010
@@ -499,14 +499,6 @@ public class CpBands extends BandSet {
         return cpUtf8;
     }
 
-    public void addCPNameAndType(String name, String signature) {
-        getCPNameAndType(name, signature);
-    }
-
-    public void addCPSignature(String signature) {
-        getCPSignature(signature);
-    }
-
     public CPSignature getCPSignature(String signature) {
         if(signature == null) {
             return null;

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/IcBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/IcBands.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/IcBands.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/IcBands.java Wed Sep 15 13:54:49 2010
@@ -170,10 +170,6 @@ public class IcBands extends BandSet {
             return false;
         }
 
-        public int hashCode() {
-            return (C.hashCode() * 37) + F;
-        }
-
         public String toString() {
             return C.toString();
         }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttribute.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttribute.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/NewAttribute.java Wed Sep 15 13:54:49 2010
@@ -112,13 +112,13 @@ public class NewAttribute extends Attrib
     public boolean isUnknown(int context) {
         switch(context) {
         case AttributeDefinitionBands.CONTEXT_CLASS:
-            return contextClass;
+            return !contextClass;
         case AttributeDefinitionBands.CONTEXT_METHOD:
-            return contextMethod;
+            return !contextMethod;
         case AttributeDefinitionBands.CONTEXT_FIELD:
-            return contextField;
+            return !contextField;
         case AttributeDefinitionBands.CONTEXT_CODE:
-            return contextCode;
+            return !contextCode;
         }
         return false;
     }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200ClassReader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200ClassReader.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200ClassReader.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/Pack200ClassReader.java Wed Sep 15 13:54:49 2010
@@ -16,9 +16,6 @@
  */
 package org.apache.harmony.pack200;
 
-import java.io.IOException;
-import java.io.InputStream;
-
 import org.objectweb.asm.ClassReader;
 
 /**
@@ -40,32 +37,6 @@ public class Pack200ClassReader extends 
         super(b);
     }
 
-    /**
-     * @param is
-     *            the input stream of class file
-     * @throws IOException
-     */
-    public Pack200ClassReader(InputStream is) throws IOException {
-        super(is);
-    }
-
-    /**
-     * @param name
-     * @throws IOException
-     */
-    public Pack200ClassReader(String name) throws IOException {
-        super(name);
-    }
-
-    /**
-     * @param b
-     * @param off
-     * @param len
-     */
-    public Pack200ClassReader(byte[] b, int off, int len) {
-        super(b, off, len);
-    }
-
     public int readUnsignedShort(int index) {
         // Doing this to check whether last load-constant instruction was ldc (18) or ldc_w (19)
         // TODO:  Assess whether this impacts on performance

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PackingOptions.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PackingOptions.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PackingOptions.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PackingOptions.java Wed Sep 15 13:54:49 2010
@@ -185,10 +185,6 @@ public class PackingOptions {
         passFiles.add(passFileName);
     }
 
-    public void removePassFile(String passFileName) {
-        passFiles.remove(passFileName);
-    }
-
     public String getUnknownAttributeAction() {
         return unknownAttributeAction;
     }
@@ -317,6 +313,9 @@ public class PackingOptions {
     }
 
     public String getUnknownClassAttributeAction(String type) {
+        if (classAttributeActions == null) {
+            return unknownAttributeAction;
+        }
         String action = (String) classAttributeActions.get(type);
         if(action == null) {
             action = unknownAttributeAction;
@@ -325,6 +324,9 @@ public class PackingOptions {
     }
 
     public String getUnknownMethodAttributeAction(String type) {
+        if (methodAttributeActions == null) {
+            return unknownAttributeAction;
+        }
         String action = (String) methodAttributeActions.get(type);
         if(action == null) {
             action = unknownAttributeAction;
@@ -333,6 +335,9 @@ public class PackingOptions {
     }
 
     public String getUnknownFieldAttributeAction(String type) {
+        if (fieldAttributeActions == null) {
+            return unknownAttributeAction;
+        }
         String action = (String) fieldAttributeActions.get(type);
         if(action == null) {
             action = unknownAttributeAction;
@@ -341,6 +346,9 @@ public class PackingOptions {
     }
 
     public String getUnknownCodeAttributeAction(String type) {
+        if (codeAttributeActions == null) {
+            return unknownAttributeAction;
+        }
         String action = (String) codeAttributeActions.get(type);
         if(action == null) {
             action = unknownAttributeAction;

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java Wed Sep 15 13:54:49 2010
@@ -167,8 +167,4 @@ public class PopulationCodec extends Cod
     public Codec getTokenCodec() {
         return tokenCodec;
     }
-
-    public int getL() {
-        return l;
-    }
 }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java Wed Sep 15 13:54:49 2010
@@ -464,43 +464,8 @@ public class Segment implements ClassVis
                 name = "";
             }
             nameRU.add(name);
-            addValueAndTag(value);
+            addValueAndTag(value, T, values);
         }
-
-        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());
-            }
-        }
-
         public AnnotationVisitor visitAnnotation(String name, String desc) {
             T.add("@");
             if (name == null) {
@@ -514,7 +479,7 @@ public class Segment implements ClassVis
                     Integer numPairs = (Integer) nestPairN.remove(nestPairN.size() - 1);
                     nestPairN.add(new Integer(numPairs.intValue() + 1));
                     nestNameRU.add(name);
-                    addValueAndTag(value);
+                    addValueAndTag(value, T, values);
                 }
 
                 public AnnotationVisitor visitAnnotation(String arg0,
@@ -549,38 +514,7 @@ public class Segment implements ClassVis
             }
             nameRU.add(name);
             caseArrayN.add(new Integer(0));
-            return new AnnotationVisitor() {
-                public void visit(String name, Object value) {
-                    Integer numCases = (Integer) caseArrayN.remove(caseArrayN.size() - 1);
-                    caseArrayN.add(new Integer(numCases.intValue() + 1));
-                    if (name == null) {
-                        name = "";
-                    }
-                    nameRU.add(name);
-                    addValueAndTag(value);
-                }
-
-                public AnnotationVisitor visitAnnotation(String arg0,
-                        String arg1) {
-                    throw new RuntimeException("Not yet supported");
-                }
-
-                public AnnotationVisitor visitArray(String arg0) {
-                    throw new RuntimeException("Not yet supported");
-//                    return null;
-                }
-
-                public void visitEnd() {
-                }
-
-                public void visitEnum(String name, String desc, String value) {
-                    Integer numCases = (Integer) caseArrayN.remove(caseArrayN.size() - 1);
-                    caseArrayN.add(new Integer(numCases.intValue() + 1));
-                    T.add("e");
-                    values.add(desc);
-                    values.add(value);
-                }
-            };
+            return new ArrayVisitor(caseArrayN, T, nameRU, values);
         }
 
         public void visitEnd() {
@@ -603,6 +537,58 @@ public class Segment implements ClassVis
             values.add(value);
         }
     }
+    
+    public class ArrayVisitor implements AnnotationVisitor  {
+        
+        private int indexInCaseArrayN;
+        private List caseArrayN;
+        private List values;
+        private List nameRU;
+        private List T;
+
+        public ArrayVisitor(List caseArrayN, List T, List nameRU, List values) {
+            this.caseArrayN = caseArrayN;
+            this.T = T;
+            this.nameRU = nameRU;
+            this.values = values;
+            this.indexInCaseArrayN = caseArrayN.size() - 1;
+        }
+        
+        public void visit(String name, Object value) {
+            Integer numCases = (Integer) caseArrayN.remove(indexInCaseArrayN);
+            caseArrayN.add(indexInCaseArrayN, new Integer(numCases.intValue() + 1));
+            if (name == null) {
+                name = "";
+            }
+            addValueAndTag(value, T, values);
+        }
+
+        public AnnotationVisitor visitAnnotation(String arg0,
+                String arg1) {
+            throw new RuntimeException("Not yet supported");
+        }
+
+        public AnnotationVisitor visitArray(String name) {
+            T.add("[");
+            if (name == null) {
+                name = "";
+            }
+            nameRU.add(name);
+            caseArrayN.add(new Integer(0));
+            return new ArrayVisitor(caseArrayN, T, nameRU, values);
+        }
+
+        public void visitEnd() {
+        }
+
+        public void visitEnum(String name, String desc, String value) {
+            Integer numCases = (Integer) caseArrayN.remove(caseArrayN.size() - 1);
+            caseArrayN.add(new Integer(numCases.intValue() + 1));
+            T.add("e");
+            values.add(desc);
+            values.add(value);
+        }
+    }
 
     /**
      * SegmentFieldVisitor implements <code>FieldVisitor</code> to visit the
@@ -645,6 +631,42 @@ public class Segment implements ClassVis
         }
     }
 
+    // helper method for annotation visitors
+    private void addValueAndTag(Object value, List T, List values) {
+        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());
+        }
+    }
+
+
     public boolean lastConstantHadWideIndex() {
         return currentClassReader.lastConstantHadWideIndex();
     }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentHeader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentHeader.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentHeader.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentHeader.java Wed Sep 15 13:54:49 2010
@@ -64,8 +64,8 @@ public class SegmentHeader extends BandS
     private int file_count;
 
     private boolean deflate_hint;
-    private boolean have_file_modtime = true;
-    private boolean have_file_options = true;
+    private final boolean have_file_modtime = true;
+    private final boolean have_file_options = true;
     private boolean have_file_size_hi;
     private boolean have_class_flags_hi;
     private boolean have_field_flags_hi;
@@ -190,22 +190,6 @@ public class SegmentHeader extends BandS
         this.have_all_code_flags = have_all_code_flags;
     }
 
-    public void setArchive_size_hi(int archive_size_hi) {
-        this.archive_size_hi = archive_size_hi;
-    }
-
-    public void setArchive_size_lo(int archive_size_lo) {
-        this.archive_size_lo = archive_size_lo;
-    }
-
-    public void setArchive_next_count(int archive_next_count) {
-        this.archive_next_count = archive_next_count;
-    }
-
-    public void setArchive_modtime(int archive_modtime) {
-        this.archive_modtime = archive_modtime;
-    }
-
     public int getArchive_modtime() {
         return archive_modtime;
     }
@@ -218,18 +202,6 @@ public class SegmentHeader extends BandS
         this.deflate_hint = deflate_hint;
     }
 
-    public void setHave_file_modtime(boolean have_file_modtime) {
-        this.have_file_modtime = have_file_modtime;
-    }
-
-    public void setHave_file_options(boolean have_file_options) {
-        this.have_file_options = have_file_options;
-    }
-
-    public void setHave_file_size_hi(boolean have_file_size_hi) {
-        this.have_file_size_hi = have_file_size_hi;
-    }
-
     public void setHave_class_flags_hi(boolean have_class_flags_hi) {
         this.have_class_flags_hi = have_class_flags_hi;
     }
@@ -361,10 +333,6 @@ public class SegmentHeader extends BandS
         }
     }
 
-    public int getDefaultMinorVersion() {
-        return 0;
-    }
-
     public int getDefaultMajorVersion() {
         return majverCounter.getMostCommon();
     }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/Archive.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/Archive.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/Archive.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/Archive.java Wed Sep 15 13:54:49 2010
@@ -187,8 +187,11 @@ public class Archive {
             }
         }
         if (removePackFile) {
-            File file = new File(inputFileName);
-            boolean deleted = file.delete();
+            boolean deleted = false;
+            if(inputFileName != null) {
+                File file = new File(inputFileName);
+                deleted = file.delete();
+            }
             if (!deleted) {
                 throw new Pack200Exception("Failed to delete the input file.");
             }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttributeLayout.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttributeLayout.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttributeLayout.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttributeLayout.java Wed Sep 15 13:54:49 2010
@@ -145,31 +145,6 @@ public class AttributeLayout implements 
         this.isDefault = isDefault;
     }
 
-    public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
-            return false;
-        final AttributeLayout other = (AttributeLayout) obj;
-        if (layout == null) {
-            if (other.layout != null)
-                return false;
-        } else if (!layout.equals(other.layout))
-            return false;
-        if (index != other.index)
-            return false;
-        if (context != other.context)
-            return false;
-        if (name == null) {
-            if (other.name != null)
-                return false;
-        } else if (!name.equals(other.name))
-            return false;
-        return true;
-    }
-
     public Codec getCodec() {
         if (layout.indexOf('O') >= 0) {
             return Codec.BRANCH5;
@@ -226,22 +201,6 @@ public class AttributeLayout implements 
         return r;
     }
 
-    public boolean isClass() {
-        return context == CONTEXT_CLASS;
-    }
-
-    public boolean isCode() {
-        return context == CONTEXT_CODE;
-    }
-
-    public boolean isField() {
-        return context == CONTEXT_FIELD;
-    }
-
-    public boolean isMethod() {
-        return context == CONTEXT_METHOD;
-    }
-
     /*
      * (non-Javadoc)
      *

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/BcBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/BcBands.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/BcBands.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/BcBands.java Wed Sep 15 13:54:49 2010
@@ -586,21 +586,4 @@ public class BcBands extends BandSet {
     public int[] getBcThisMethod() {
         return bcThisMethod;
     }
-
-    public int[] getBcEscRef() {
-        return bcEscRef;
-    }
-
-    public int[] getBcEscRefSize() {
-        return bcEscRefSize;
-    }
-
-    public int[] getBcEscSize() {
-        return bcEscSize;
-    }
-
-    public int[][] getBcEscByte() {
-        return bcEscByte;
-    }
-
 }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/ClassBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/ClassBands.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/ClassBands.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/ClassBands.java Wed Sep 15 13:54:49 2010
@@ -1037,6 +1037,8 @@ public class ClassBands extends BandSet 
                 mbg[i].name_RU = parseCPUTF8References(contextName
                         + "_" + rxa + "_name_RU", in, Codec.UNSIGNED5,
                         pairCount);
+            } else {
+                pairCount = RxACount[i];
             }
             mbg[i].T = decodeBandInt(contextName + "_" + rxa + "_T", in,
                     Codec.BYTE1, pairCount + backwardsCallCounts[i]);
@@ -1116,17 +1118,7 @@ public class ClassBands extends BandSet 
         int backwardsCallsUsed = 0;
         String[] RxA = new String[] { "RVA", "RIA", "RVPA", "RIPA", "AD" };
         int[] rxaCounts = new int[] { 0, 0, 0, 0, 0 };
-        int[] backwardsCalls = new int[5];
-        int methodAttrIndex = 0;
-        for (int i = 0; i < backwardsCalls.length; i++) {
-            if (rxaCounts[i] > 0) {
-                backwardsCallsUsed++;
-                backwardsCalls[i] = methodAttrCalls[methodAttrIndex];
-                methodAttrIndex++;
-            } else {
-                backwardsCalls[i] = 0;
-            }
-        }
+        
         AttributeLayout rvaLayout = attrMap.getAttributeLayout(
                 AttributeLayout.ATTRIBUTE_RUNTIME_VISIBLE_ANNOTATIONS,
                 AttributeLayout.CONTEXT_METHOD);
@@ -1151,6 +1143,17 @@ public class ClassBands extends BandSet 
             rxaCounts[i] = SegmentUtils
                     .countMatches(methodFlags, rxaLayouts[i]);
         }
+        int[] backwardsCalls = new int[5];
+        int methodAttrIndex = 0;
+        for (int i = 0; i < backwardsCalls.length; i++) {
+            if (rxaCounts[i] > 0) {
+                backwardsCallsUsed++;
+                backwardsCalls[i] = methodAttrCalls[methodAttrIndex];
+                methodAttrIndex++;
+            } else {
+                backwardsCalls[i] = 0;
+            }
+        }
         MetadataBandGroup[] mbgs = parseMetadata(in, RxA, rxaCounts,
                 backwardsCalls, "method");
         List[] attributeLists = new List[RxA.length];

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java Wed Sep 15 13:54:49 2010
@@ -477,30 +477,14 @@ public class CpBands extends BandSet {
         return cpDescriptor;
     }
 
-    public double[] getCpDouble() {
-        return cpDouble;
-    }
-
     public String[] getCpFieldClass() {
         return cpFieldClass;
     }
 
-    public String[] getCpFieldDescriptor() {
-        return cpFieldDescriptor;
-    }
-
-    public float[] getCpFloat() {
-        return cpFloat;
-    }
-
     public String[] getCpIMethodClass() {
         return cpIMethodClass;
     }
 
-    public String[] getCpIMethodDescriptor() {
-        return cpIMethodDescriptor;
-    }
-
     public int[] getCpInt() {
         return cpInt;
     }
@@ -521,10 +505,6 @@ public class CpBands extends BandSet {
         return cpSignature;
     }
 
-    public String[] getCpString() {
-        return cpString;
-    }
-
     public String[] getCpUTF8() {
         return cpUTF8;
     }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/IcTuple.java Wed Sep 15 13:54:49 2010
@@ -61,10 +61,6 @@ public class IcTuple {
         initializeClassStrings();
     }
 
-    public IcTuple(String C, int F, int cIndex) {
-        this(C, F, null, null, cIndex, -1, -1, -1);
-    }
-
     public static final int NESTED_CLASS_FLAG = 0x00010000;
     protected String C; // this class
     protected int F; // flags
@@ -344,14 +340,6 @@ public class IcTuple {
     	return tIndex;
     }
 
-    public String realOuterClassString() {
-        int firstDollarPosition = cachedOuterClassString.indexOf('$');
-        if (firstDollarPosition <= 0) {
-            return cachedOuterClassString;
-        }
-        return cachedOuterClassString.substring(0, firstDollarPosition);
-    }
-
     public int thisClassIndex() {
         if(predicted()) {
             return cIndex;

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java Wed Sep 15 13:54:49 2010
@@ -152,11 +152,11 @@ public class MetadataBandGroup {
                         attributes.add(getParameterAttribute(param_NB[i],
                                 name_RU_Iterator));
                     }
-                } else { // type.equals("AD")
-                    for (int i = 0; i < T.length; i++) {
-                        attributes.add(new AnnotationDefaultAttribute(
-                                new ElementValue(T[i], getNextValue(T[i]))));
-                    }
+                }
+            } else if(type.equals("AD")){
+                for (int i = 0; i < T.length; i++) {
+                    attributes.add(new AnnotationDefaultAttribute(
+                            new ElementValue(T[i], getNextValue(T[i]))));
                 }
             }
         }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java Wed Sep 15 13:54:49 2010
@@ -150,7 +150,12 @@ public class Segment {
                             AttributeLayout.ATTRIBUTE_SOURCE_FILE,
                             AttributeLayout.CONTEXT_CLASS);
             if (SOURCE_FILE.matches(classBands.getRawClassFlags()[classNum])) {
-                int firstDollar = SegmentUtils.indexOfFirstDollar(fullName);
+                int firstDollar = -1;
+                for (int index = 0; index < fullName.length(); index++) {
+                    if (fullName.charAt(index) <= '$') {
+                        firstDollar = index;
+                    }
+                }
                 String fileName = null;
 
                 if (firstDollar > -1 && (i <= firstDollar)) {
@@ -225,7 +230,6 @@ public class Segment {
         // methodDescr and methodFlags used to create this
         for (i = 0; i < cfMethods.length; i++) {
             int descriptorIndex = classBands.getMethodDescrInts()[classNum][i];
-//            int colon = descriptorStr.indexOf(':');
             int nameIndex = cpBands.getCpDescriptorNameInts()[descriptorIndex];
             int typeIndex = cpBands.getCpDescriptorTypeInts()[descriptorIndex];
             CPUTF8 name = cpBands.cpUTF8Value(nameIndex);

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentHeader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentHeader.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentHeader.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentHeader.java Wed Sep 15 13:54:49 2010
@@ -165,14 +165,6 @@ public class SegmentHeader {
         return archiveModtime;
     }
 
-    public int getArchiveMajor() {
-        return archiveMajor;
-    }
-
-    public int getArchiveMinor() {
-        return archiveMinor;
-    }
-
     public int getAttributeDefinitionCount() {
         return attributeDefinitionCount;
     }
@@ -241,10 +233,6 @@ public class SegmentHeader {
         return innerClassCount;
     }
 
-    public void setNumberOfFiles(int numberOfFiles) {
-        this.numberOfFiles = numberOfFiles;
-    }
-
     public long getArchiveSize() {
         return archiveSize;
     }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentUtils.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentUtils.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentUtils.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/SegmentUtils.java Wed Sep 15 13:54:49 2010
@@ -124,41 +124,4 @@ public final class SegmentUtils {
         return count;
     }
 
-    /**
-     * Answer the index of the first character <= '$' in the parameter. This is
-     * used instead of indexOf('$') because inner classes may be separated by
-     * any character <= '$' (in other words, Foo#Bar is as valid as Foo$Bar). If
-     * no $ character is found, answer -1.
-     *
-     * @param string
-     *            String to search for $
-     * @return first index of $ character, or -1 if not found
-     */
-    public static int indexOfFirstDollar(String string) {
-        for (int index = 0; index < string.length(); index++) {
-            if (string.charAt(index) <= '$') {
-                return index;
-            }
-        }
-        return -1;
-    }
-
-    private SegmentUtils() {
-        // Intended to be a helper class
-    }
-
-    /**
-     * This is a debugging message to aid the developer in writing this class.
-     * If the property 'debug.unpack200' is set, this will generate messages to
-     * stderr; otherwise, it will be silent.
-     *
-     * @param message
-     * @deprecated this may be removed from production code
-     */
-    public static void debug(String message) {
-        if (System.getProperty("debug.unpack200") != null) {
-            System.err.println(message);
-        }
-    }
-
 }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ByteCode.java Wed Sep 15 13:54:49 2010
@@ -100,17 +100,8 @@ public class ByteCode extends ClassFileE
         return getByteCodeForm().getOpcode();
     }
 
-    private boolean hashcodeComputed;
-    private int cachedHashCode;
-
-    private void generateHashCode() {
-        cachedHashCode = objectHashCode();
-    }
-
     public int hashCode() {
-        if (!hashcodeComputed)
-            generateHashCode();
-        return cachedHashCode;
+        return objectHashCode();
     }
 
     /*

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPRef.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPRef.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPRef.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CPRef.java Wed Sep 15 13:54:49 2010
@@ -76,11 +76,6 @@ public abstract class CPRef extends Cons
         return entries;
     }
 
-    public int hashCode() {
-        final int PRIME = 37;
-        return (PRIME * className.hashCode()) + nameAndType.hashCode();
-    }
-
     protected void resolve(ClassConstantPool pool) {
         super.resolve(pool);
         nameAndTypeIndex = pool.indexOf(nameAndType);

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java Wed Sep 15 13:54:49 2010
@@ -39,10 +39,6 @@ public class ClassConstantPool {
 
     protected Map indexCache;
 
-    public String toString() {
-        return entries.toString();
-    }
-
     private final List others = new ArrayList(500);
     private final List entries = new ArrayList(500);
 

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassFileEntry.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassFileEntry.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassFileEntry.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassFileEntry.java Wed Sep 15 13:54:49 2010
@@ -46,10 +46,6 @@ public abstract class ClassFileEntry {
         resolved = true;
     }
 
-    protected boolean isResolved() {
-        return resolved;
-    }
-
     protected int objectHashCode() {
         return super.hashCode();
     }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CodeAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CodeAttribute.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CodeAttribute.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CodeAttribute.java Wed Sep 15 13:54:49 2010
@@ -173,14 +173,6 @@ public class CodeAttribute extends BCIRe
         }
     }
 
-    public List attributes() {
-        return attributes;
-    }
-
-    public boolean equals(Object obj) {
-        return this == obj;
-    }
-
     protected int[] getStartPCs() {
         // Do nothing here as we've overriden renumber
         return null;

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/DeprecatedAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/DeprecatedAttribute.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/DeprecatedAttribute.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/DeprecatedAttribute.java Wed Sep 15 13:54:49 2010
@@ -61,8 +61,4 @@ public class DeprecatedAttribute extends
         return "Deprecated Attribute";
     }
 
-    public boolean equals(Object obj) {
-        return this == obj;
-    }
-
 }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/EnclosingMethodAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/EnclosingMethodAttribute.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/EnclosingMethodAttribute.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/EnclosingMethodAttribute.java Wed Sep 15 13:54:49 2010
@@ -88,8 +88,4 @@ public class EnclosingMethodAttribute ex
         return "EnclosingMethod";
     }
 
-    public boolean equals(Object obj) {
-        return this == obj;
-    }
-
 }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTableAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTableAttribute.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTableAttribute.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTableAttribute.java Wed Sep 15 13:54:49 2010
@@ -28,7 +28,7 @@ import org.apache.harmony.pack200.Pack20
  */
 public class LocalVariableTableAttribute extends BCIRenumberedAttribute {
 
-    private int local_variable_table_length;
+    private final int local_variable_table_length;
     private final int[] start_pcs;
     private final int[] lengths;
     private int[] name_indexes;
@@ -164,8 +164,4 @@ public class LocalVariableTableAttribute
             lengths[index] = revisedLength;
         }
     }
-
-    public boolean equals(Object obj) {
-        return this == obj;
-    }
 }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTypeTableAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTypeTableAttribute.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTypeTableAttribute.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTypeTableAttribute.java Wed Sep 15 13:54:49 2010
@@ -28,7 +28,7 @@ import org.apache.harmony.pack200.Pack20
  */
 public class LocalVariableTypeTableAttribute extends BCIRenumberedAttribute {
 
-    private int local_variable_type_table_length;
+    private final int local_variable_type_table_length;
     private final int[] start_pcs;
     private final int[] lengths;
     private int[] name_indexes;
@@ -165,8 +165,4 @@ public class LocalVariableTypeTableAttri
                 + " varaibles";
     }
 
-    public boolean equals(Object obj) {
-        return this == obj;
-    }
-
 }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/OperandManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/OperandManager.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/OperandManager.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/OperandManager.java Wed Sep 15 13:54:49 2010
@@ -196,10 +196,6 @@ public class OperandManager {
         this.segment = segment;
     }
 
-    public Segment getSegment() {
-        return segment;
-    }
-
     public SegmentConstantPool globalConstantPool() {
         return segment.getConstantPool();
     }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/RuntimeVisibleorInvisibleAnnotationsAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/RuntimeVisibleorInvisibleAnnotationsAttribute.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/RuntimeVisibleorInvisibleAnnotationsAttribute.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/RuntimeVisibleorInvisibleAnnotationsAttribute.java Wed Sep 15 13:54:49 2010
@@ -69,10 +69,6 @@ public class RuntimeVisibleorInvisibleAn
                 + " annotations";
     }
 
-    public boolean equals(Object obj) {
-        return this == obj;
-    }
-
     protected ClassFileEntry[] getNestedClassFileEntries() {
         List nested = new ArrayList();
         nested.add(attributeName);

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/RuntimeVisibleorInvisibleParameterAnnotationsAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/RuntimeVisibleorInvisibleParameterAnnotationsAttribute.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/RuntimeVisibleorInvisibleParameterAnnotationsAttribute.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/RuntimeVisibleorInvisibleParameterAnnotationsAttribute.java Wed Sep 15 13:54:49 2010
@@ -110,10 +110,6 @@ public class RuntimeVisibleorInvisiblePa
 
     }
 
-    public boolean equals(Object obj) {
-        return this == obj;
-    }
-
     protected ClassFileEntry[] getNestedClassFileEntries() {
         List nested = new ArrayList();
         nested.add(attributeName);

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SignatureAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SignatureAttribute.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SignatureAttribute.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SignatureAttribute.java Wed Sep 15 13:54:49 2010
@@ -76,8 +76,4 @@ public class SignatureAttribute extends 
         return "Signature: " + signature;
     }
 
-
-    public boolean equals(Object obj) {
-        return this == obj;
-    }
 }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LocalForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LocalForm.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LocalForm.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LocalForm.java Wed Sep 15 13:54:49 2010
@@ -26,10 +26,6 @@ import org.apache.harmony.unpack200.byte
  */
 public class LocalForm extends ByteCodeForm {
 
-    public LocalForm(int opcode, String name) {
-        super(opcode, name);
-    }
-
     public LocalForm(int opcode, String name, int[] rewrite) {
         super(opcode, name, rewrite);
     }

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LookupSwitchForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LookupSwitchForm.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LookupSwitchForm.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/LookupSwitchForm.java Wed Sep 15 13:54:49 2010
@@ -25,10 +25,6 @@ public class LookupSwitchForm extends Sw
         super(opcode, name);
     }
 
-    public LookupSwitchForm(int opcode, String name, int[] rewrite) {
-        super(opcode, name, rewrite);
-    }
-
     /*
      * (non-Javadoc)
      *

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SwitchForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SwitchForm.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SwitchForm.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/SwitchForm.java Wed Sep 15 13:54:49 2010
@@ -18,7 +18,6 @@ package org.apache.harmony.unpack200.byt
 
 import org.apache.harmony.unpack200.bytecode.ByteCode;
 import org.apache.harmony.unpack200.bytecode.CodeAttribute;
-import org.apache.harmony.unpack200.bytecode.OperandManager;
 
 public abstract class SwitchForm extends VariableInstructionForm {
 
@@ -26,21 +25,6 @@ public abstract class SwitchForm extends
         super(opcode, name);
     }
 
-    public SwitchForm(int opcode, String name, int[] rewrite) {
-        super(opcode, name, rewrite);
-    }
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.apache.harmony.unpack200.bytecode.forms.ByteCodeForm#setByteCodeOperands(org.apache.harmony.unpack200.bytecode.ByteCode,
-     *      org.apache.harmony.unpack200.bytecode.OperandTable,
-     *      org.apache.harmony.unpack200.SegmentConstantPool)
-     */
-    public void setByteCodeOperands(ByteCode byteCode,
-            OperandManager operandManager, int codeLength) {
-    }
-
     /*
      * (non-Javadoc)
      *

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/TableSwitchForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/TableSwitchForm.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/TableSwitchForm.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/TableSwitchForm.java Wed Sep 15 13:54:49 2010
@@ -25,10 +25,6 @@ public class TableSwitchForm extends Swi
         super(opcode, name);
     }
 
-    public TableSwitchForm(int opcode, String name, int[] rewrite) {
-        super(opcode, name, rewrite);
-    }
-
     /*
      * (non-Javadoc)
      *

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/VariableInstructionForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/VariableInstructionForm.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/VariableInstructionForm.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/VariableInstructionForm.java Wed Sep 15 13:54:49 2010
@@ -27,10 +27,6 @@ public abstract class VariableInstructio
         super(opcode, name);
     }
 
-    public VariableInstructionForm(int opcode, String name, int[] rewrite) {
-        super(opcode, name, rewrite);
-    }
-
     /**
      * Given an int operand, set the rewrite bytes for the next available
      * operand position and the three immediately following it to a
@@ -65,38 +61,6 @@ public abstract class VariableInstructio
     }
 
     /**
-     * Given an int operand, set the rewrite bytes for the next available
-     * operand position and the byte immediately following it to a high-byte,
-     * low-byte encoding of the operand.
-     *
-     * Note that unlike the ByteCode setOperand* operations, this starts with an
-     * actual bytecode rewrite array (rather than a ByteCodeForm prototype
-     * rewrite array). Also, this method overwrites -1 values in the rewrite
-     * array - so if you start with an array that looks like: {100, -1, -1, -1,
-     * -1, 200, -1, -1, -1, -1} then calling setRewrite2Bytes(0, rewrite) the
-     * first time will convert it to: {100, 0, 0, -1, -1, 200, -1, -1, -1, -1}
-     * Calling setRewrite2Bytes(0, rewrite) a second time will convert it to:
-     * {100, 0, 0, 0, 0, 200, -1, -1, -1, -1}
-     *
-     * @param operand
-     *            int to set the rewrite bytes to
-     * @param rewrite
-     *            int[] bytes to rewrite
-     */
-    public void setRewrite2Bytes(int operand, int[] rewrite) {
-        int firstOperandPosition = -1;
-
-        // Find the first -1 in the rewrite array
-        for (int index = 0; index < rewrite.length - 3; index++) {
-            if ((rewrite[index] == -1) && (rewrite[index + 1] == -1)) {
-                firstOperandPosition = index;
-                break;
-            }
-        }
-        setRewrite2Bytes(operand, firstOperandPosition, rewrite);
-    }
-
-    /**
      * This method writes operand directly into the rewrite array at index
      * position specified.
      *

Modified: harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/WideForm.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/WideForm.java?rev=997336&r1=997335&r2=997336&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/WideForm.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/forms/WideForm.java Wed Sep 15 13:54:49 2010
@@ -30,10 +30,6 @@ public class WideForm extends VariableIn
         super(opcode, name);
     }
 
-    public WideForm(int opcode, String name, int[] rewrite) {
-        super(opcode, name, rewrite);
-    }
-
     /*
      * (non-Javadoc)
      *



Mime
View raw message