harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjanu...@apache.org
Subject svn commit: r763569 - in /harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200: ClassBands.java CpBands.java Segment.java
Date Thu, 09 Apr 2009 09:16:55 GMT
Author: sjanuary
Date: Thu Apr  9 09:16:54 2009
New Revision: 763569

URL: http://svn.apache.org/viewvc?rev=763569&view=rev
Log:
Pack200 - minor bug fixes

Modified:
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java?rev=763569&r1=763568&r2=763569&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java
Thu Apr  9 09:16:54 2009
@@ -947,7 +947,7 @@
 
     public void addAnnotationDefault(List nameRU, List t, List values, List caseArrayN, List
nestTypeRS, List nestNameRU, List nestPairN) {
         method_AD_bands.addAnnotation(null, nameRU, t, values, caseArrayN, nestTypeRS, nestNameRU,
nestPairN);
-        Integer flag = (Integer) tempMethodFlags.remove(tempMethodFlags.size() - 1);
-        tempMethodFlags.add(new Integer(flag.intValue() | (1<<25)));
+        Long flag = (Long) tempMethodFlags.remove(tempMethodFlags.size() - 1);
+        tempMethodFlags.add(new Long(flag.longValue() | (1<<25)));
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java?rev=763569&r1=763568&r2=763569&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
Thu Apr  9 09:16:54 2009
@@ -409,6 +409,9 @@
     }
 
     public CPSignature getCPSignature(String signature) {
+        if(signature == null) {
+            return null;
+        }
         CPSignature cpS = (CPSignature) stringsToCpSignature.get(signature);
         if (cpS == null) {
             List cpClasses = new ArrayList();

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java?rev=763569&r1=763568&r2=763569&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java
Thu Apr  9 09:16:54 2009
@@ -89,7 +89,6 @@
     public void visit(int version, int access, String name, String signature,
             String superName, String[] interfaces) {
         bcBands.setCurrentClass(name);
-        bcBands.setSuperClass(superName);
         segmentHeader.addMajorVersion(version);
         classBands.addClass(version, access, name, signature, superName,
                 interfaces);
@@ -295,6 +294,9 @@
         }
 
         public void visit(String name, Object value) {
+            if (name == null) {
+                name = "";
+            }
             nameRU.add(name);
             values.add(value);
             addTag(value);
@@ -326,6 +328,9 @@
 
         public AnnotationVisitor visitAnnotation(String name, String desc) {
             T.add("@");
+            if (name == null) {
+                name = "";
+            }
             nameRU.add(name);
             nestTypeRS.add(desc);
             nestPairN.add(new Integer(0));
@@ -366,12 +371,18 @@
 
         public AnnotationVisitor visitArray(String name) {
             T.add("[");
+            if (name == null) {
+                name = "";
+            }
             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);
                     values.add(value);
                     addTag(value);
@@ -388,13 +399,15 @@
                 }
 
                 public void visitEnd() {
-                    throw new RuntimeException("Not yet supported");
                 }
 
                 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");
+                    if(name == null) {
+                        name = "";
+                    }
                     nameRU.add(name);
                     values.add(desc);
                     values.add(value);
@@ -414,6 +427,9 @@
 
         public void visitEnum(String name, String desc, String value) {
             T.add("e");
+            if (name == null) {
+                name = "";
+            }
             nameRU.add(name);
             values.add(desc);
             values.add(value);



Mime
View raw message