Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 12889 invoked from network); 28 Aug 2008 11:20:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Aug 2008 11:20:49 -0000 Received: (qmail 56970 invoked by uid 500); 28 Aug 2008 11:20:48 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 56875 invoked by uid 500); 28 Aug 2008 11:20:47 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 56866 invoked by uid 99); 28 Aug 2008 11:20:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Aug 2008 04:20:47 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Aug 2008 11:19:58 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7201323889C0; Thu, 28 Aug 2008 04:20:28 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@harmony.apache.org From: sjanuary@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080828112028.7201323889C0@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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; - } - }