### Eclipse Workspace Patch 1.0 #P Harmony-pack200 Index: src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java =================================================================== --- src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java (revision 689774) +++ src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java (working copy) @@ -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; - } - } Index: src/main/java/org/apache/harmony/unpack200/CpBands.java =================================================================== --- src/main/java/org/apache/harmony/unpack200/CpBands.java (revision 689774) +++ src/main/java/org/apache/harmony/unpack200/CpBands.java (working copy) @@ -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); Index: src/main/java/org/apache/harmony/unpack200/ClassBands.java =================================================================== --- src/main/java/org/apache/harmony/unpack200/ClassBands.java (revision 689774) +++ src/main/java/org/apache/harmony/unpack200/ClassBands.java (working copy) @@ -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( Index: src/main/java/org/apache/harmony/unpack200/Segment.java =================================================================== --- src/main/java/org/apache/harmony/unpack200/Segment.java (revision 689774) +++ src/main/java/org/apache/harmony/unpack200/Segment.java (working copy) @@ -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;