harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjanu...@apache.org
Subject svn commit: r695462 - in /harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200: ./ bytecode/
Date Mon, 15 Sep 2008 13:08:15 GMT
Author: sjanuary
Date: Mon Sep 15 06:08:14 2008
New Revision: 695462

URL: http://svn.apache.org/viewvc?rev=695462&view=rev
Log:
Fix a pack200 issue found with the testcase from HARMONY-5960

Modified:
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttrDefinitionBands.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/AnnotationDefaultAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CodeAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ConstantValueAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/DeprecatedAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/EnclosingMethodAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ExceptionsAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/InnerClassesAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LineNumberTableAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTableAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTypeTableAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SignatureAttribute.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SourceFileAttribute.java

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttrDefinitionBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttrDefinitionBands.java?rev=695462&r1=695461&r2=695462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttrDefinitionBands.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttrDefinitionBands.java
Mon Sep 15 06:08:14 2008
@@ -21,6 +21,18 @@
 
 import org.apache.harmony.pack200.Codec;
 import org.apache.harmony.pack200.Pack200Exception;
+import org.apache.harmony.unpack200.bytecode.AnnotationDefaultAttribute;
+import org.apache.harmony.unpack200.bytecode.CodeAttribute;
+import org.apache.harmony.unpack200.bytecode.ConstantValueAttribute;
+import org.apache.harmony.unpack200.bytecode.DeprecatedAttribute;
+import org.apache.harmony.unpack200.bytecode.EnclosingMethodAttribute;
+import org.apache.harmony.unpack200.bytecode.ExceptionsAttribute;
+import org.apache.harmony.unpack200.bytecode.InnerClassesAttribute;
+import org.apache.harmony.unpack200.bytecode.LineNumberTableAttribute;
+import org.apache.harmony.unpack200.bytecode.LocalVariableTableAttribute;
+import org.apache.harmony.unpack200.bytecode.LocalVariableTypeTableAttribute;
+import org.apache.harmony.unpack200.bytecode.SignatureAttribute;
+import org.apache.harmony.unpack200.bytecode.SourceFileAttribute;
 
 /**
  * Attribute definition bands are the set of bands used to define extra
@@ -76,12 +88,32 @@
             attributeDefinitionMap.add(layout, newBands);
         }
         attributeDefinitionMap.checkMap();
+        setupDefaultAttributeNames();
     }
 
     public void unpack() throws Pack200Exception, IOException {
 
     }
 
+    private void setupDefaultAttributeNames() {
+        AnnotationDefaultAttribute.setAttributeName(segment.getCpBands().cpUTF8Value("AnnotationDefault"));
//$NON-NLS-1$
+        CodeAttribute.setAttributeName(segment.getCpBands().cpUTF8Value("Code")); //$NON-NLS-1$
+        ConstantValueAttribute.setAttributeName(segment.getCpBands().cpUTF8Value("ConstantValue"));
//$NON-NLS-1$
+        DeprecatedAttribute.setAttributeName(segment.getCpBands().cpUTF8Value("Deprecated"));
//$NON-NLS-1$
+        EnclosingMethodAttribute.setAttributeName(segment.getCpBands().cpUTF8Value("EnclosingMethod"));
//$NON-NLS-1$
+        ExceptionsAttribute.setAttributeName(segment.getCpBands().cpUTF8Value("Exceptions"));
//$NON-NLS-1$
+        InnerClassesAttribute.setAttributeName(segment.getCpBands().cpUTF8Value("InnerClasses"));
//$NON-NLS-1$
+        LineNumberTableAttribute.setAttributeName(segment.getCpBands().cpUTF8Value("LineNumberTable"));
//$NON-NLS-1$
+        LocalVariableTableAttribute.setAttributeName(segment.getCpBands().cpUTF8Value("LocalVariableTable"));
//$NON-NLS-1$
+        LocalVariableTypeTableAttribute.setAttributeName(segment.getCpBands().cpUTF8Value("LocalVariableTypeTable"));
//$NON-NLS-1$
+        SignatureAttribute.setAttributeName(segment.getCpBands().cpUTF8Value("Signature"));
//$NON-NLS-1$
+        SourceFileAttribute.setAttributeName(segment.getCpBands().cpUTF8Value("SourceFile"));
//$NON-NLS-1$
+        MetadataBandGroup.setRvaAttributeName(segment.getCpBands().cpUTF8Value("RuntimeVisibleAnnotations"));
+        MetadataBandGroup.setRiaAttributeName(segment.getCpBands().cpUTF8Value("RuntimeInvisibleAnnotations"));
+        MetadataBandGroup.setRvpaAttributeName(segment.getCpBands().cpUTF8Value("RuntimeVisibleParameterAnnotations"));
+        MetadataBandGroup.setRipaAttributeName(segment.getCpBands().cpUTF8Value("RuntimeInvisibleParameterAnnotations"));
+    }
+
     public AttributeLayoutMap getAttributeDefinitionMap() {
         return attributeDefinitionMap;
     }

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java?rev=695462&r1=695461&r2=695462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/MetadataBandGroup.java
Mon Sep 15 06:08:14 2008
@@ -42,12 +42,26 @@
     private final String type;
     private final CpBands cpBands;
 
-    private final CPUTF8 rvaUTF8 = new CPUTF8("RuntimeVisibleAnnotations");
-    private final CPUTF8 riaUTF8 = new CPUTF8("RuntimeInvisibleAnnotations");
-    private final CPUTF8 rvpaUTF8 = new CPUTF8(
-            "RuntimeVisibleParameterAnnotations");
-    private final CPUTF8 ripaUTF8 = new CPUTF8(
-            "RuntimeInvisibleParameterAnnotations");
+    private static CPUTF8 rvaUTF8;
+    private static CPUTF8 riaUTF8;
+    private static CPUTF8 rvpaUTF8;
+    private static CPUTF8 ripaUTF8;
+
+    public static void setRvaAttributeName(CPUTF8 cpUTF8Value) {
+        rvaUTF8 = cpUTF8Value;
+    }
+
+    public static void setRiaAttributeName(CPUTF8 cpUTF8Value) {
+        riaUTF8 = cpUTF8Value;
+    }
+
+    public static void setRvpaAttributeName(CPUTF8 cpUTF8Value) {
+        rvpaUTF8 = cpUTF8Value;
+    }
+
+    public static void setRipaAttributeName(CPUTF8 cpUTF8Value) {
+        ripaUTF8 = cpUTF8Value;
+    }
 
     public MetadataBandGroup(String type, CpBands cpBands) {
         this.type = type;
@@ -227,7 +241,7 @@
             }
             return nestedArray;
         case '@':
-            CPUTF8 type = (CPUTF8) nesttype_RS[nesttype_RS_Index++];
+            CPUTF8 type = nesttype_RS[nesttype_RS_Index++];
             int numPairs = nestpair_N[nestpair_N_Index++];
 
             return getAnnotation(type, numPairs, nestname_RU_Iterator);

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java?rev=695462&r1=695461&r2=695462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
Mon Sep 15 06:08:14 2008
@@ -112,12 +112,15 @@
 
     private ClassFile buildClassFile(int classNum) throws Pack200Exception {
         ClassFile classFile = new ClassFile();
-        classFile.major = header.getDefaultClassMajorVersion(); // TODO If
-        // classVersionMajor[] use
-        // that instead
-        classFile.minor = header.getDefaultClassMinorVersion(); // TODO if
-        // classVersionMinor[] use
-        // that instead
+        int[] major = classBands.getClassVersionMajor();
+        int[] minor = classBands.getClassVersionMinor();
+        if(major != null) {
+            classFile.major = major[classNum];
+            classFile.minor = minor[classNum];
+        } else {
+            classFile.major = header.getDefaultClassMajorVersion();
+            classFile.minor = header.getDefaultClassMinorVersion();
+        }
         // build constant pool
         ClassConstantPool cp = classFile.pool;
         int fullNameIndexInCpClass = classBands.getClassThisInts()[classNum];

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/AnnotationDefaultAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/AnnotationDefaultAttribute.java?rev=695462&r1=695461&r2=695462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/AnnotationDefaultAttribute.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/AnnotationDefaultAttribute.java
Mon Sep 15 06:08:14 2008
@@ -26,8 +26,11 @@
 
     private final ElementValue element_value;
 
-    private static final CPUTF8 attributeName = new CPUTF8("AnnotationDefault");
+    private static CPUTF8 attributeName;
 
+    public static void setAttributeName(CPUTF8 cpUTF8Value) {
+        attributeName = cpUTF8Value;
+    }
     public AnnotationDefaultAttribute(ElementValue element_value) {
         super(attributeName);
         this.element_value = element_value;

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CodeAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CodeAttribute.java?rev=695462&r1=695461&r2=695462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CodeAttribute.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/CodeAttribute.java
Mon Sep 15 06:08:14 2008
@@ -33,7 +33,7 @@
     public List exceptionTable; // of ExceptionTableEntry
     public int maxLocals;
     public int maxStack;
-    private static final CPUTF8 attributeName = new CPUTF8("Code");
+    private static CPUTF8 attributeName;
 
     public CodeAttribute(int maxStack, int maxLocals, byte codePacked[],
             Segment segment, OperandManager operandManager, List exceptionTable) {
@@ -192,4 +192,8 @@
             entry.renumber(byteCodeOffsets);
         }
     }
+
+    public static void setAttributeName(CPUTF8 attributeName) {
+        CodeAttribute.attributeName = attributeName;
+    }
 }
\ No newline at end of file

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ConstantValueAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ConstantValueAttribute.java?rev=695462&r1=695461&r2=695462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ConstantValueAttribute.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ConstantValueAttribute.java
Mon Sep 15 06:08:14 2008
@@ -28,8 +28,11 @@
 
     private final ClassFileEntry entry;
 
-    private static final CPUTF8 attributeName = new CPUTF8(
-            "ConstantValue"); //$NON-NLS-1$
+    private static CPUTF8 attributeName;
+
+    public static void setAttributeName(CPUTF8 cpUTF8Value) {
+        attributeName = cpUTF8Value;
+    }
 
     public ConstantValueAttribute(ClassFileEntry entry) {
         super(attributeName);

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/DeprecatedAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/DeprecatedAttribute.java?rev=695462&r1=695461&r2=695462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/DeprecatedAttribute.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/DeprecatedAttribute.java
Mon Sep 15 06:08:14 2008
@@ -24,7 +24,11 @@
  */
 public class DeprecatedAttribute extends Attribute {
 
-    private static final CPUTF8 attributeName = new CPUTF8("Deprecated");
+    private static CPUTF8 attributeName;
+
+    public static void setAttributeName(CPUTF8 cpUTF8Value) {
+        attributeName = cpUTF8Value;
+    }
 
     public DeprecatedAttribute() {
         super(attributeName);

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/EnclosingMethodAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/EnclosingMethodAttribute.java?rev=695462&r1=695461&r2=695462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/EnclosingMethodAttribute.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/EnclosingMethodAttribute.java
Mon Sep 15 06:08:14 2008
@@ -28,8 +28,11 @@
     private int method_index;
     private final CPClass cpClass;
     private final CPNameAndType method;
-    private static final CPUTF8 attributeName = new CPUTF8(
-            "EnclosingMethod"); //$NON-NLS-1$
+    private static CPUTF8 attributeName;
+
+    public static void setAttributeName(CPUTF8 cpUTF8Value) {
+        attributeName = cpUTF8Value;
+    }
 
     public EnclosingMethodAttribute(CPClass cpClass, CPNameAndType method) {
         super(attributeName);

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ExceptionsAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ExceptionsAttribute.java?rev=695462&r1=695461&r2=695462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ExceptionsAttribute.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ExceptionsAttribute.java
Mon Sep 15 06:08:14 2008
@@ -25,8 +25,7 @@
  */
 public class ExceptionsAttribute extends Attribute {
 
-    private static final CPUTF8 attributeName = new CPUTF8(
-            "Exceptions"); //$NON-NLS-1$
+    private static CPUTF8 attributeName;
 
     private static int hashCode(Object[] array) {
         final int prime = 31;
@@ -102,4 +101,8 @@
         }
     }
 
+    public static void setAttributeName(CPUTF8 cpUTF8Value) {
+        attributeName = cpUTF8Value;
+    }
+
 }
\ No newline at end of file

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/InnerClassesAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/InnerClassesAttribute.java?rev=695462&r1=695461&r2=695462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/InnerClassesAttribute.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/InnerClassesAttribute.java
Mon Sep 15 06:08:14 2008
@@ -26,8 +26,11 @@
  */
 public class InnerClassesAttribute extends Attribute {
 
-    private static final CPUTF8 attributeName = new CPUTF8(
-            "InnerClasses"); //$NON-NLS-1$
+    private static CPUTF8 attributeName;
+
+    public static void setAttributeName(CPUTF8 cpUTF8Value) {
+        attributeName = cpUTF8Value;
+    }
 
     private static class InnerClassesEntry {
 

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LineNumberTableAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LineNumberTableAttribute.java?rev=695462&r1=695461&r2=695462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LineNumberTableAttribute.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LineNumberTableAttribute.java
Mon Sep 15 06:08:14 2008
@@ -27,8 +27,11 @@
     private final int line_number_table_length;
     private final int[] start_pcs;
     private final int[] line_numbers;
-    private static final CPUTF8 attributeName = new CPUTF8(
-            "LineNumberTable"); //$NON-NLS-1$
+    private static CPUTF8 attributeName;
+
+    public static void setAttributeName(CPUTF8 cpUTF8Value) {
+        attributeName = cpUTF8Value;
+    }
 
     public LineNumberTableAttribute(int line_number_table_length,
             int[] start_pcs, int[] line_numbers) {

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTableAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTableAttribute.java?rev=695462&r1=695461&r2=695462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTableAttribute.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTableAttribute.java
Mon Sep 15 06:08:14 2008
@@ -37,8 +37,11 @@
     private final CPUTF8[] names;
     private final CPUTF8[] descriptors;
     private int codeLength;
-    private static final CPUTF8 attributeName = new CPUTF8(
-            "LocalVariableTable"); //$NON-NLS-1$
+    private static CPUTF8 attributeName;
+
+    public static void setAttributeName(CPUTF8 cpUTF8Value) {
+        attributeName = cpUTF8Value;
+    }
 
     public LocalVariableTableAttribute(int local_variable_table_length,
             int[] start_pcs, int[] lengths, CPUTF8[] names,

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTypeTableAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTypeTableAttribute.java?rev=695462&r1=695461&r2=695462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTypeTableAttribute.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/LocalVariableTypeTableAttribute.java
Mon Sep 15 06:08:14 2008
@@ -37,8 +37,11 @@
     private final CPUTF8[] names;
     private final CPUTF8[] signatures;
     private int codeLength;
-    private static final CPUTF8 attributeName = new CPUTF8(
-            "LocalVariableTypeTable"); //$NON-NLS-1$
+    private static CPUTF8 attributeName;
+
+    public static void setAttributeName(CPUTF8 cpUTF8Value) {
+        attributeName = cpUTF8Value;
+    }
 
     public LocalVariableTypeTableAttribute(
             int local_variable_type_table_length, int[] start_pcs,

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SignatureAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SignatureAttribute.java?rev=695462&r1=695461&r2=695462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SignatureAttribute.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SignatureAttribute.java
Mon Sep 15 06:08:14 2008
@@ -27,7 +27,11 @@
     private int signature_index;
     private final CPUTF8 signature;
 
-    private static final CPUTF8 attributeName = new CPUTF8("Signature");
+    private static CPUTF8 attributeName;
+
+    public static void setAttributeName(CPUTF8 cpUTF8Value) {
+        attributeName = cpUTF8Value;
+    }
 
     public SignatureAttribute(CPUTF8 value) {
         super(attributeName);

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SourceFileAttribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SourceFileAttribute.java?rev=695462&r1=695461&r2=695462&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SourceFileAttribute.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/SourceFileAttribute.java
Mon Sep 15 06:08:14 2008
@@ -26,8 +26,11 @@
 
     private final CPUTF8 name;
     private int nameIndex;
-    private static final CPUTF8 attributeName = new CPUTF8(
-            "SourceFile"); //$NON-NLS-1$
+    private static CPUTF8 attributeName;
+
+    public static void setAttributeName(CPUTF8 cpUTF8Value) {
+        attributeName = cpUTF8Value;
+    }
 
     public SourceFileAttribute(CPUTF8 name) {
         super(attributeName);



Mime
View raw message