harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjanu...@apache.org
Subject svn commit: r689784 - in /harmony/enhanced/classlib/trunk/modules/pack200/src: main/java/org/apache/harmony/unpack200/ test/java/org/apache/harmony/unpack200/tests/
Date Thu, 28 Aug 2008 11:20:27 GMT
Author: sjanuary
Date: Thu Aug 28 04:20:27 2008
New Revision: 689784

URL: http://svn.apache.org/viewvc?rev=689784&view=rev
Log:
Apply v2 patch for HARMONY-5956 ([classlib][pack200] Fix warnings)

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

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/ClassBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/ClassBands.java?rev=689784&r1=689783&r2=689784&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/ClassBands.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/ClassBands.java
Thu Aug 28 04:20:27 2008
@@ -841,23 +841,6 @@
                 "code_LocalVariableTable_slot", in, Codec.UNSIGNED5,
                 localVariableTableN);
 
-        // Fix up localVariableTableTypeRS - for some reason,
-        // native signatures end up in DOMAINNORMALASCIIZ
-        // while nonnatives end up in DOMAINSIGNATUREASCIIZ.
-        // TODO: is this the right thing to do?
-        for (int x = 0; x < localVariableTableTypeRS.length; x++) {
-            for (int y = 0; y < localVariableTableTypeRS[x].length; y++) {
-                CPUTF8 element = localVariableTableTypeRS[x][y];
-                // TODO: come up with a better test for native vs nonnative
-                // signatures?
-//                if (element.underlyingString().length() > 2) {
-//                    element.setDomain(ClassConstantPool.DOMAIN_SIGNATUREASCIIZ);
-//                } else {
-//                    element.setDomain(ClassConstantPool.DOMAIN_NORMALASCIIZ);
-//                }
-            }
-        }
-
         int lengthLocalVariableTypeTableNBand = SegmentUtils.countMatches(
                 codeFlags, localVariableTypeTableLayout);
         int[] localVariableTypeTableN = decodeBandInt(

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java?rev=689784&r1=689783&r2=689784&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/CpBands.java
Thu Aug 28 04:20:27 2008
@@ -650,22 +650,7 @@
         if (cpNameAndType == null) {
             int nameIndex = cpDescriptorNameInts[index];
             int descriptorIndex = cpDescriptorTypeInts[index];
-            String descriptorString = cpSignature[descriptorIndex];
 
-            // For some reason, descriptors which have just plain
-            // native types are stored in DOMAIN_NORMALASCIIZ rather
-            // than in DOMAIN_SIGNATUREASCIIZ. This might indicate
-            // that DOMAIN_SIGNATUREASCIIZ is poorly named.
-            boolean nativeDescriptor = true;
-            for (int i = 0; i < descriptorString.length(); i++) {
-                char currentChar = descriptorString.charAt(i);
-                if (Character.isLetter(currentChar)) {
-                    if (currentChar == 'L') {
-                        nativeDescriptor = false;
-                    }
-                    break;
-                }
-            }
             CPUTF8 name = cpUTF8Value(nameIndex);
             CPUTF8 descriptorU = cpSignatureValue(descriptorIndex);
             cpNameAndType = new CPNameAndType(name, descriptorU, index + descrOffset);
@@ -719,20 +704,7 @@
             int colon = descriptor.indexOf(':');
             String nameString = descriptor.substring(0, colon);
             String descriptorString = descriptor.substring(colon + 1);
-            // For some reason, descriptors which have just plain
-            // native types are stored in DOMAIN_NORMALASCIIZ rather
-            // than in DOMAIN_SIGNATUREASCIIZ. This might indicate
-            // that DOMAIN_SIGNATUREASCIIZ is poorly named.
-            boolean nativeDescriptor = true;
-            for (int i = 0; i < descriptorString.length(); i++) {
-                char currentChar = descriptorString.charAt(i);
-                if (Character.isLetter(currentChar)) {
-                    if (currentChar == 'L') {
-                        nativeDescriptor = false;
-                    }
-                    break;
-                }
-            }
+
             CPUTF8 name = cpUTF8Value(nameString, true);
             CPUTF8 descriptorU = cpUTF8Value(descriptorString, true);
             cpNameAndType = new CPNameAndType(name, descriptorU, -1 + descrOffset);

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=689784&r1=689783&r2=689784&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/Segment.java
Thu Aug 28 04:20:27 2008
@@ -26,7 +26,6 @@
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 import java.util.jar.JarEntry;

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java?rev=689784&r1=689783&r2=689784&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java
Thu Aug 28 04:20:27 2008
@@ -116,12 +116,4 @@
         reader2.close();
     }
 
-    private String readNextLine(BufferedReader reader) throws IOException {
-        String line = reader.readLine();
-        while ("".equals(line)) {
-            line = reader.readLine();
-        }
-        return line;
-    }
-
 }



Mime
View raw message