Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 18746 invoked from network); 11 Jun 2009 16:05:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Jun 2009 16:05:36 -0000 Received: (qmail 77541 invoked by uid 500); 11 Jun 2009 16:05:47 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 77505 invoked by uid 500); 11 Jun 2009 16:05: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 77496 invoked by uid 99); 11 Jun 2009 16:05:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2009 16:05:47 +0000 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, 11 Jun 2009 16:05:44 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 823B823888D4; Thu, 11 Jun 2009 16:05:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r783825 [2/2] - in /harmony/enhanced/classlib/branches/java6: ./ depends/build/platform/ depends/files/ make/ modules/archive/src/main/native/archive/shared/ modules/auth/src/main/native/auth/shared/ modules/auth/src/main/native/auth/window... Date: Thu, 11 Jun 2009 16:05:20 -0000 To: commits@harmony.apache.org From: hindessm@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090611160524.823B823888D4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/SelectorImpl.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/SelectorImpl.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/SelectorImpl.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/SelectorImpl.java Thu Jun 11 16:05:16 2009 @@ -153,7 +153,7 @@ } } - private void ensureCapacity(int c) { + private void ensureCommonCapacity(int c) { // TODO: rewrite array handling as some internal class if (c >= keys.length) { SelectionKey[] newKeys = new SelectionKey[(keys.length + 1) << 1]; @@ -175,13 +175,6 @@ keysToWritableFDs = newKeysToWritableFDs; } - if (readableKeysCount >= readableFDs.length) { - FileDescriptor[] newReadableFDs = new FileDescriptor[(readableFDs.length + 1) << 1]; - System.arraycopy(readableFDs, 0, newReadableFDs, 0, - readableFDs.length); - readableFDs = newReadableFDs; - } - if (readableKeysCount >= readableFDsToKeys.length) { int[] newReadableFDsToKeys = new int[(readableFDsToKeys.length + 1) << 1]; System.arraycopy(readableFDsToKeys, 0, newReadableFDsToKeys, 0, @@ -189,19 +182,33 @@ readableFDsToKeys = newReadableFDsToKeys; } - if (writableKeysCount >= writableFDs.length) { - FileDescriptor[] newWriteableFDs = new FileDescriptor[(writableFDs.length + 1) << 1]; - System.arraycopy(writableFDs, 0, newWriteableFDs, 0, - writableFDs.length); - writableFDs = newWriteableFDs; - } - if (writableKeysCount >= writableFDsToKeys.length) { int[] newWritableFDsToKeys = new int[(writableFDsToKeys.length + 1) << 1]; System.arraycopy(writableFDsToKeys, 0, newWritableFDsToKeys, 0, writableFDsToKeys.length); writableFDsToKeys = newWritableFDsToKeys; } + + } + + // prepare the space specified for the READ ops + private void ensureReadCapacity(int c) { + if (readableKeysCount >= readableFDs.length) { + FileDescriptor[] newReadableFDs = new FileDescriptor[(readableFDs.length + 1) << 1]; + System.arraycopy(readableFDs, 0, newReadableFDs, 0, + readableFDs.length); + readableFDs = newReadableFDs; + } + } + + // prepare the space specified for the WRITE ops + private void ensureWriteCapacity(int c) { + if (writableKeysCount >= writableFDs.length) { + FileDescriptor[] newWriteableFDs = new FileDescriptor[(writableFDs.length + 1) << 1]; + System.arraycopy(writableFDs, 0, newWriteableFDs, 0, + writableFDs.length); + writableFDs = newWriteableFDs; + } } private void limitCapacity() { @@ -221,7 +228,7 @@ int c = lastKeyIndex; // make sure that enough space is available - ensureCapacity(c); + ensureCommonCapacity(c); // add to keys storage keys[c] = sk; @@ -236,6 +243,7 @@ // if readable operations requested if (((SelectionKey.OP_ACCEPT | SelectionKey.OP_READ) & ops) != 0) { + ensureReadCapacity(c); // save as readable FD readableFDs[readableKeysCount] = fd; @@ -248,6 +256,7 @@ // if writable operations requested if (((SelectionKey.OP_CONNECT | SelectionKey.OP_WRITE) & ops) != 0) { + ensureWriteCapacity(c); // save as writable FD writableFDs[writableKeysCount] = fd; @@ -363,7 +372,8 @@ synchronized (keysSet) { synchronized (selectedKeys) { delKey(sk); - addKey(sk); + int newIndex = addKey(sk); + ((SelectionKeyImpl)sk).setIndex(newIndex); } } } Modified: harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java Thu Jun 11 16:05:16 2009 @@ -32,7 +32,7 @@ import java.nio.channels.spi.SelectorProvider; import org.apache.harmony.luni.net.NetUtil; -import org.apache.harmony.luni.net.PlainSocketImpl; +import org.apache.harmony.luni.net.PlainServerSocketImpl; import org.apache.harmony.luni.platform.FileDescriptorHandler; import org.apache.harmony.luni.platform.Platform; @@ -77,7 +77,7 @@ fd = new FileDescriptor(); Platform.getNetworkSystem().createStreamSocket(fd, NetUtil.preferIPv4Stack()); - impl = new PlainSocketImpl(fd); + impl = new PlainServerSocketImpl(fd); socket = new ServerSocketAdapter(impl, this); } @@ -87,7 +87,7 @@ super(SelectorProvider.provider()); status = SERVER_STATUS_OPEN; fd = new FileDescriptor(); - impl = new PlainSocketImpl(fd); + impl = new PlainServerSocketImpl(fd); socket = new ServerSocketAdapter(impl, this); isBound = false; } Modified: harmony/enhanced/classlib/branches/java6/modules/nio/src/main/native/nio/windows/makefile URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio/src/main/native/nio/windows/makefile?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/nio/src/main/native/nio/windows/makefile (original) +++ harmony/enhanced/classlib/branches/java6/modules/nio/src/main/native/nio/windows/makefile Thu Jun 11 16:05:16 2009 @@ -41,6 +41,6 @@ $(LIBPATH)hythr$(HY_LINKLIB_SUFFIX) $(LIBPATH)vmi$(HY_LINKLIB_SUFFIX) DLLBASE=0x13200000 -COMMENT=/comment:"nio component native code. (c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable." +COMMENT=/comment:"nio component native code. (c) Copyright 1991, 2007 The Apache Software Foundation or its licensors, as applicable." !include <$(HY_HDK)\build\make\rules.mak> Modified: harmony/enhanced/classlib/branches/java6/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/CharBufferTest.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/CharBufferTest.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/CharBufferTest.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/CharBufferTest.java Thu Jun 11 16:05:16 2009 @@ -1039,6 +1039,30 @@ } } + public void testRead_scenario1() throws Exception { + char[] charArray = new char[] { 'a', 'b' }; + CharBuffer charBuffer = CharBuffer.wrap(charArray); + try { + charBuffer.read(charBuffer); + fail("should throw IllegalArgumentException"); + } catch (IllegalArgumentException e) { + // expected + } + charBuffer.put(charArray); + assertEquals(-1, charBuffer.read(charBuffer)); + } + + public void testRead_scenario2() throws Exception { + CharBuffer charBufferA = CharBuffer.allocate(0); + CharBuffer allocateBuffer = CharBuffer.allocate(1); + CharBuffer charBufferB = CharBuffer.wrap(allocateBuffer); + assertEquals(-1, charBufferA.read(charBufferB)); + + allocateBuffer.append(allocateBuffer); + charBufferB = CharBuffer.wrap(allocateBuffer); + assertEquals(-1, charBufferA.read(charBufferB)); + } + public void testIsDirect() { assertFalse(buf.isDirect()); } Modified: harmony/enhanced/classlib/branches/java6/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java Thu Jun 11 16:05:16 2009 @@ -59,9 +59,15 @@ private static final byte[] TEST_BYTES; + private static final byte[] CONTENT_AS_BYTES; + + private static final int CONTENT_AS_BYTES_LENGTH; + static { try { TEST_BYTES = "test".getBytes("iso8859-1"); + CONTENT_AS_BYTES = CONTENT.getBytes("iso8859-1"); + CONTENT_AS_BYTES_LENGTH = CONTENT_AS_BYTES.length; } catch (UnsupportedEncodingException e) { throw new Error(e); } @@ -69,10 +75,6 @@ private static final int CONTENT_LENGTH = CONTENT.length(); - private static final byte[] CONTENT_AS_BYTES = CONTENT.getBytes(); - - private static final int CONTENT_AS_BYTES_LENGTH = CONTENT_AS_BYTES.length; - private FileChannel readOnlyFileChannel; private FileChannel writeOnlyFileChannel; Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetDecoderTest.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetDecoderTest.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetDecoderTest.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetDecoderTest.java Thu Jun 11 16:05:16 2009 @@ -795,7 +795,12 @@ int inPosition = in.position(); byte[] input = new byte[in.remaining()]; in.get(input); - String result = new String(input); + String result; + try { + result = new String(input, "UTF-8"); + } catch (UnsupportedEncodingException e) { + throw new AssertionError(e); + } if (result.startsWith("malform")) { // reset the cursor to the error position in.position(inPosition); Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetTest.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetTest.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetTest.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/tests/api/java/nio/charset/CharsetTest.java Thu Jun 11 16:05:16 2009 @@ -665,7 +665,7 @@ CharBuffer cb = c1.decode(ByteBuffer.wrap("abcd\u5D14efg" .getBytes("iso8859-1"))); byte[] replacement = c1.newEncoder().replacement(); - assertEquals(new String(cb.array()).trim(), "abcd" + new String(replacement) + assertEquals(new String(cb.array()).trim(), "abcd" + new String(replacement, "iso8859-1") + "efg"); } Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java Thu Jun 11 16:05:16 2009 @@ -300,7 +300,11 @@ } else { if (z < 0) { // Need to use integer overflow here to represent negatives. - z += 4294967296L; // this value is equal to (1 << 32). + if(cardinality < 4294967296L) { + z+= cardinality; + } else { + z += 4294967296L; // this value is equal to (1 << 32). + } } } List byteList = new ArrayList(); Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java Thu Jun 11 16:05:16 2009 @@ -58,10 +58,12 @@ private List bcThisField = new ArrayList(); private final List bcSuperField = new ArrayList(); private List bcThisMethod = new ArrayList(); - private final List bcSuperMethod = new ArrayList(); - private final List bcInitRef = new ArrayList(); + private List bcSuperMethod = new ArrayList(); + private List bcInitRef = new ArrayList(); private String currentClass; + private String superClass; + private String currentNewClass; private static final int MULTIANEWARRAY = 197; private static final int ALOAD_0 = 42; @@ -78,13 +80,16 @@ private int renumberedOffset; private final IntList bcLabelRelativeOffsets = new IntList(); - public void setCurrentClass(String name) { + public void setCurrentClass(String name, String superName) { currentClass = name; + superClass = superName; } public void finaliseBands() { bcThisField = getIndexInClass(bcThisField); bcThisMethod = getIndexInClass(bcThisMethod); + bcSuperMethod = getIndexInClass(bcSuperMethod); + bcInitRef = getIndexInClassForConstructor(bcInitRef); } public void pack(OutputStream out) throws IOException, Pack200Exception { @@ -144,6 +149,15 @@ return indices; } + private List getIndexInClassForConstructor(List cPMethodList) { + List indices = new ArrayList(cPMethodList.size()); + for (int i = 0; i < cPMethodList.size(); i++) { + CPMethodOrField cpMF = (CPMethodOrField) cPMethodList.get(i); + indices.add(new Integer(cpMF.getIndexInClassForConstructor())); + } + return indices; + } + public void visitEnd() { for (int i = 0; i < bciRenumbering.size(); i++) { if (bciRenumbering.get(i) == -1) { @@ -351,23 +365,25 @@ aload_0 = true; opcode += 7; } - -// if (opcode == 183 && name.equals("") && !aload_0 -// && owner.equals(currentClass)) { -// opcode = 230; -// } else if (opcode == 183 && name.equals("") && !aload_0 -// && owner.equals(superClass)) { -// opcode = 231; -// // TODO: 232 -// } else if (owner.equals(currentClass)) { opcode += 24; // change to invokevirtual_this, // invokespecial_this etc. - bcThisMethod.add(cpBands.getCPMethod(owner, name, desc)); -// } else if (owner.equals(superClass)) { // TODO -// opcode += 38; // change to invokevirtual_super, -// // invokespecial_super etc. -// bcSuperMethod.add(cpBands.getCPMethod(owner, name, desc)); + + if(name.equals("") && opcode == 207) { + opcode = 230; // invokespecial_this_init + bcInitRef.add(cpBands.getCPMethod(owner, name, desc)); + } else { + bcThisMethod.add(cpBands.getCPMethod(owner, name, desc)); + } + } else if (owner.equals(superClass)) { // TODO + opcode += 38; // change to invokevirtual_super, + // invokespecial_super etc. + if(name.equals("") && opcode == 221) { + opcode = 231; // invokespecial_super_init + bcInitRef.add(cpBands.getCPMethod(owner, name, desc)); + } else { + bcSuperMethod.add(cpBands.getCPMethod(owner, name, desc)); + } } else { if (aload_0) { opcode -= 7; @@ -376,7 +392,12 @@ // special rewrite in this // case. } - bcMethodRef.add(cpBands.getCPMethod(owner, name, desc)); + if(name.equals("") && opcode == 183 && owner.equals(currentNewClass)) { + opcode = 232; // invokespecial_new_init + bcInitRef.add(cpBands.getCPMethod(owner, name, desc)); + } else { + bcMethodRef.add(cpBands.getCPMethod(owner, name, desc)); + } } bcCodes.add(opcode); break; @@ -419,6 +440,9 @@ updateRenumbering(); bcCodes.add(opcode); bcClassRef.add(cpBands.getCPClass(type)); + if(opcode == 187) { // NEW + currentNewClass = type; + } } public void visitVarInsn(int opcode, int var) { Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CPMethodOrField.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CPMethodOrField.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CPMethodOrField.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CPMethodOrField.java Thu Jun 11 16:05:16 2009 @@ -20,7 +20,8 @@ private final CPClass className; private final CPNameAndType nameAndType; - private int indexInClass; + private int indexInClass = -1; + private int indexInClassForConstructor = -1; public CPMethodOrField(CPClass className, CPNameAndType nameAndType) { this.className = className; @@ -79,4 +80,13 @@ public void setIndexInClass(int index) { indexInClass = index; } + + public int getIndexInClassForConstructor() { + return indexInClassForConstructor; + } + + public void setIndexInClassForConstructor(int index) { + indexInClassForConstructor = index; + } + } \ No newline at end of file Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CPNameAndType.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CPNameAndType.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CPNameAndType.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CPNameAndType.java Thu Jun 11 16:05:16 2009 @@ -59,6 +59,10 @@ return name.getIndex(); } + public String getName() { + return name.getUnderlyingString(); + } + public int getTypeIndex() { return signature.getIndex(); } Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java Thu Jun 11 16:05:16 2009 @@ -212,9 +212,7 @@ public void addField(int flags, String name, String desc, String signature, Object value) { flags = flags & 0xFFFF; - CPMethodOrField field = cpBands.addCPField(class_this[index], name, - desc); - tempFieldDesc.add(field.getDesc()); + tempFieldDesc.add(cpBands.getCPNameAndType(name, desc)); if (signature != null) { fieldSignature.add(cpBands.getCPSignature(signature)); flags |= (1 << 19); @@ -569,9 +567,8 @@ public void addMethod(int flags, String name, String desc, String signature, String[] exceptions) { - CPMethodOrField method = cpBands.addCPMethod(class_this[index], name, - desc); - tempMethodDesc.add(method.getDesc()); + CPNameAndType nt = cpBands.getCPNameAndType(name, desc); + tempMethodDesc.add(nt); if (signature != null) { methodSignature.add(cpBands.getCPSignature(signature)); flags |= (1 << 19); Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java Thu Jun 11 16:05:16 2009 @@ -125,7 +125,7 @@ cpUtf8Prefix[i - 2] = prefix; currentStr = currentStr.substring(prefix); char[] suffix = currentStr.toCharArray(); - if (suffix.length > 100) { // big suffix (100 is arbitrary - can we + if (suffix.length > 1000) { // big suffix (1000 is arbitrary - can we // do better?) cpUtf8Suffix[i - 1] = 0; bigSuffix.add(new Integer(suffix.length)); @@ -356,6 +356,7 @@ } } classNameToIndex.clear(); + Map classNameToConstructorIndex = new HashMap(); for (Iterator iterator = cp_Method.iterator(); iterator.hasNext();) { CPMethodOrField mOrF = (CPMethodOrField) iterator.next(); CPClass className = mOrF.getClassName(); @@ -368,6 +369,17 @@ mOrF.setIndexInClass(theIndex); classNameToIndex.put(className, new Integer(theIndex + 1)); } + if(mOrF.getDesc().getName().equals("")) { + Integer constructorIndex = (Integer) classNameToConstructorIndex.get(className); + if (constructorIndex == null) { + classNameToConstructorIndex.put(className, new Integer(1)); + mOrF.setIndexInClassForConstructor(0); + } else { + int theIndex = constructorIndex.intValue(); + mOrF.setIndexInClassForConstructor(theIndex); + classNameToConstructorIndex.put(className, new Integer(theIndex + 1)); + } + } } } @@ -585,30 +597,9 @@ return getCPIMethod(getCPClass(owner), name, desc); } - public CPMethodOrField addCPMethod(CPClass cpClass, String name, String desc) { - String key = cpClass.toString() + ":" + name + ":" + desc; - CPMethodOrField cpM = (CPMethodOrField) stringsToCpMethod - .get(key); - if (cpM == null) { - CPNameAndType nAndT = getCPNameAndType(name, desc); - cpM = new CPMethodOrField(cpClass, nAndT); - stringsToCpMethod.put(key, cpM); - cp_Method.add(cpM); - } - return cpM; - } - - public CPMethodOrField addCPField(CPClass cpClass, String name, String desc) { - String key = cpClass.toString() + ":" + name + ":" + desc; - CPMethodOrField cpF = (CPMethodOrField) stringsToCpField - .get(key); - if (cpF == null) { - CPNameAndType nAndT = getCPNameAndType(name, desc); - cpF = new CPMethodOrField(cpClass, nAndT); - stringsToCpField.put(key, cpF); - cp_Field.add(cpF); - } - return cpF; + public boolean existsCpClass(String className) { + CPClass cpClass = (CPClass) stringsToCpClass.get(className); + return cpClass != null; } } Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/FileBands.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/FileBands.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/FileBands.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/FileBands.java Thu Jun 11 16:05:16 2009 @@ -18,44 +18,58 @@ import java.io.IOException; import java.io.OutputStream; +import java.util.HashSet; +import java.util.Iterator; import java.util.List; +import java.util.Set; import org.apache.harmony.pack200.Archive.File; +import org.objectweb.asm.ClassReader; public class FileBands extends BandSet { private final CPUTF8[] fileName; private int[] file_name; - private final long[] file_modtime; + private final int[] file_modtime; private final long[] file_size; private final int[] file_options; private final byte[][] file_bits; public FileBands(CpBands cpBands, SegmentHeader segmentHeader, - List files, int effort) { + List files, List classes, int effort) { super(effort, segmentHeader); int size = files.size(); fileName = new CPUTF8[size]; - file_modtime = new long[size]; + file_modtime = new int[size]; file_size = new long[size]; file_options = new int[size]; - CPUTF8 emptyString = cpBands.getCPUtf8(""); int totalSize = 0; file_bits = new byte[files.size()][]; - for (int i = 0; i < files.size(); i++) { + int archiveModtime = segmentHeader.getArchive_modtime(); + + Set classNames = new HashSet(); + for (Iterator iterator = classes.iterator(); iterator.hasNext();) { + ClassReader reader = (ClassReader) iterator.next(); + classNames.add(reader.getClassName()); + } + CPUTF8 emptyString = cpBands.getCPUtf8(""); + for (int i = 0; i < files.size(); i++) { File file = (File)files.get(i); String name = file.getName(); - fileName[i] = cpBands.getCPUtf8(name); // TODO: sometimes this can be the empty string if(name.endsWith(".class")) { -// fileName[i] = emptyString; file_options[i] |= (1 << 1); -// } else { -// fileName[i] = cpBands.getCPUtf8(name); + if(classNames.contains(name.substring(0, name.length() - 6))) { + fileName[i] = emptyString; + } else { + fileName[i] = cpBands.getCPUtf8(name); + } + } else { + fileName[i] = cpBands.getCPUtf8(name); } byte[] bytes = file.getContents(); file_size[i] = bytes.length; totalSize += file_size[i]; - file_modtime[i] = file.getModtime(); + file_modtime[i] = (int)(file.getModtime() - archiveModtime); file_bits[i] = file.getContents(); } } @@ -72,7 +86,7 @@ out.write(encodeFlags("file_size", file_size, Codec.UNSIGNED5, Codec.UNSIGNED5, segmentHeader.have_file_size_hi())); if (segmentHeader.have_file_modtime()) { - out.write(encodeBandInt("file_modtime", file_name, Codec.DELTA5)); + out.write(encodeBandInt("file_modtime", file_modtime, Codec.DELTA5)); } if (segmentHeader.have_file_options()) { out.write(encodeBandInt("file_options", file_options, Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java Thu Jun 11 16:05:16 2009 @@ -24,6 +24,7 @@ import org.objectweb.asm.AnnotationVisitor; import org.objectweb.asm.Attribute; +import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.FieldVisitor; import org.objectweb.asm.Label; @@ -58,7 +59,7 @@ icBands = new IcBands(segmentHeader, cpBands, effort); classBands = new ClassBands(this, classes.size(), effort); bcBands = new BcBands(cpBands, this, effort); - fileBands = new FileBands(cpBands, segmentHeader, files, effort); + fileBands = new FileBands(cpBands, segmentHeader, files, classes, effort); processClasses(classes); @@ -84,13 +85,17 @@ Pack200ClassReader classReader = (Pack200ClassReader) iterator .next(); currentClassReader = classReader; - classReader.accept(this, 0); + int flags = ClassReader.SKIP_FRAMES; + if(stripDebug) { + flags |= ClassReader.SKIP_DEBUG; + } + classReader.accept(this, flags); } } public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { - bcBands.setCurrentClass(name); + bcBands.setCurrentClass(name, superName); segmentHeader.addMajorVersion(version); classBands.addClass(version, access, name, signature, superName, interfaces); Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentHeader.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentHeader.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentHeader.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentHeader.java Thu Jun 11 16:05:16 2009 @@ -59,7 +59,7 @@ private int file_count; private boolean deflate_hint; - private boolean have_file_modtime; + private boolean have_file_modtime = true; private boolean have_file_options = true; private boolean have_file_size_hi; private boolean have_class_flags_hi; @@ -201,6 +201,10 @@ this.archive_modtime = archive_modtime; } + public int getArchive_modtime() { + return archive_modtime; + } + public void setFile_count(int file_count) { this.file_count = file_count; } Modified: harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/port/shared/port_copyright.c URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/port/shared/port_copyright.c?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/port/shared/port_copyright.c (original) +++ harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/port/shared/port_copyright.c Thu Jun 11 16:05:16 2009 @@ -18,4 +18,4 @@ /* A copyright string included in each DLL and executable */ const char hyCopyright[] = - "(c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable."; + "(c) Copyright 1991, 2009 The Apache Software Foundation or its licensors, as applicable."; Modified: harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/port/unix/hysock.c URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/port/unix/hysock.c?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/port/unix/hysock.c (original) +++ harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/port/unix/hysock.c Thu Jun 11 16:05:16 2009 @@ -119,9 +119,6 @@ struct netlinkContext_struct *netlinkContext, struct nlmsghdr **nextMessage); -static I_32 copy_hostent (struct HyPortLibrary *portLibrary, - OSHOSTENT * source, PortlibPTBuffers_t * ptBuffers); - I_32 platformSocketLevel (I_32 portableSocketLevel); static I_32 findError (I_32 errorCode); @@ -136,13 +133,16 @@ #undef CDEV_CURRENT_FUNCTION +#if NO_R +static I_32 copy_hostent (struct HyPortLibrary *portLibrary, + OSHOSTENT * source, PortlibPTBuffers_t * ptBuffers); + #define CDEV_CURRENT_FUNCTION copy_hostent static I_32 copy_hostent (struct HyPortLibrary *portLibrary, OSHOSTENT * source, PortlibPTBuffers_t * ptBuffers) { -#if NO_R int h_len = strlen (source->h_name); int total = 0; int i = 0; @@ -184,12 +184,11 @@ } dest->h_addr_list[i] = NULL; -#endif - return 0; } #undef CDEV_CURRENT_FUNCTION +#endif #define CDEV_CURRENT_FUNCTION findError Modified: harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/port/windows/makefile URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/port/windows/makefile?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/port/windows/makefile (original) +++ harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/port/windows/makefile Thu Jun 11 16:05:16 2009 @@ -44,6 +44,6 @@ ws2_32.lib Iphlpapi.lib shell32.lib DLLBASE=0x11100000 -COMMENT=/comment:"Platform port library. (c) Copyright 1993, 2005 The Apache Software Foundation or its licensors, as applicable." +COMMENT=/comment:"Platform port library. (c) Copyright 1993, 2009 The Apache Software Foundation or its licensors, as applicable." !include <$(HY_HDK)\build\make\rules.mak> Modified: harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thread/shared/thread_copyright.c URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thread/shared/thread_copyright.c?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thread/shared/thread_copyright.c (original) +++ harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thread/shared/thread_copyright.c Thu Jun 11 16:05:16 2009 @@ -18,4 +18,4 @@ /* A copyright string included in each DLL and executable */ const char hyCopyright[] = - "(c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable."; + "(c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable."; Modified: harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thread/unix/thrdsup.h URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thread/unix/thrdsup.h?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thread/unix/thrdsup.h (original) +++ harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thread/unix/thrdsup.h Thu Jun 11 16:05:16 2009 @@ -26,7 +26,7 @@ #include #include "hycomp.h" -#if (defined(LINUX)) +#if defined(LINUX) || defined(MACOSX) #include #endif @@ -38,7 +38,7 @@ #define WRAPPER_TYPE void* typedef void *WRAPPER_ARG; #define WRAPPER_RETURN() return NULL -#if defined(LINUX) || defined(FREEBSD) +#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) #include typedef sem_t OSSEMAPHORE; #else @@ -73,9 +73,7 @@ #define HYDIV div /* do we really need nanosecond clock accuracy even on platforms which support gettime? */ -#define TIMEOUT_CLOCK CLOCK_REALTIME - -#if (defined(LINUX)) +#if defined(LINUX) || defined(MACOSX) #define SETUP_TIMEOUT(ts_, millis, nanos) { \ struct timeval tv_; \ HYDIV_T secs_ = HYDIV(millis, 1000); \ @@ -107,7 +105,7 @@ #define SETUP_TIMEOUT(ts_, millis, nanos) { \ HYDIV_T secs_ = HYDIV(millis, 1000); \ int nanos_ = secs_.rem * 1000000 + nanos; \ - clock_gettime(TIMEOUT_CLOCK, &ts_); \ + clock_gettime(CLOCK_REALTIME, &ts_); \ nanos_ += ts_.tv_nsec; \ if (nanos_ >= 1000000000) { \ ts_.tv_sec += secs_.quot + 1; \ @@ -142,7 +140,7 @@ #define THREAD_SELF() (pthread_self()) /* THREAD_YIELD */ -#if defined(LINUX) || defined(FREEBSD) +#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) #define THREAD_YIELD() (sched_yield()) #endif @@ -202,54 +200,54 @@ #define THREAD_SET_PRIORITY(thread, priority) set_pthread_priority((thread), (priority)) /* SEM_CREATE */ -#if defined(LINUX) || defined(FREEBSD) +#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) #define SEM_CREATE(initValue) thread_malloc(NULL, sizeof(OSSEMAPHORE)) #else #define SEM_CREATE(initValue) #endif /* SEM_INIT */ -#if defined(LINUX) || defined(FREEBSD) +#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) #define SEM_INIT(sm, pshrd, inval) (sem_init((sem_t*)sm, pshrd, inval)) #else #define SEM_INIT(sm,pshrd,inval) #endif /* SEM_DESTROY */ -#if defined(LINUX) || defined(FREEBSD) +#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) #define SEM_DESTROY(sm) (sem_destroy((sem_t*)sm)) #else #define SEM_DESTROY(sm) #endif /* SEM_FREE */ -#if defined(LINUX) || defined(FREEBSD) +#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) #define SEM_FREE(s) thread_free(NULL, (sem_t*)s); #endif /* SEM_POST */ -#if defined(LINUX) || defined(FREEBSD) +#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) #define SEM_POST(smP) (sem_post((sem_t*)smP)) #else #define SEM_POST(sm) #endif /* SEM_WAIT */ -#if defined(LINUX) || defined(FREEBSD) +#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) #define SEM_WAIT(smP) (sem_wait((sem_t*)smP)) #else #define SEM_WAIT(sm) #endif /* SEM_TRYWAIT */ -#if defined(LINUX) || defined(FREEBSD) +#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) #define SEM_TRYWAIT(smP) (sem_trywait(smP)) #else #define SEM_TRYWAIT(sm) #endif /* SEM_GETVALUE */ -#if defined(LINUX) || defined(FREEBSD) +#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) #define SEM_GETVALUE(smP, intP) (sem_getvalue(smP, intP)) #else #define SEM_GETVALUE(sm) Modified: harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thread/windows/makefile URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thread/windows/makefile?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thread/windows/makefile (original) +++ harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thread/windows/makefile Thu Jun 11 16:05:16 2009 @@ -36,6 +36,6 @@ MDLLIBFILES = $(LIBPATH)hypool$(HY_LINKLIB_SUFFIX) $(LIBPATH)hycommon$(HY_LINKLIB_SUFFIX) DLLBASE=0x11500000 -COMMENT=/comment:"Thread support library. (c) Copyright 1993, 2005 The Apache Software Foundation or its licensors, as applicable." +COMMENT=/comment:"Thread support library. (c) Copyright 1993, 2006 The Apache Software Foundation or its licensors, as applicable." !include <$(HY_HDK)\build\make\rules.mak> Modified: harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thrstub/windows/makefile URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thrstub/windows/makefile?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thrstub/windows/makefile (original) +++ harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thrstub/windows/makefile Thu Jun 11 16:05:16 2009 @@ -31,6 +31,6 @@ HYLDFLAGS = $(HYLDFLAGS) -def:$(LIBBASE).def DLLBASE=0x11500000 -COMMENT=/comment:"Thread support library. (c) Copyright 1993, 2005 The Apache Software Foundation or its licensors, as applicable." +COMMENT=/comment:"Thread support library. (c) Copyright 1993, 2007 The Apache Software Foundation or its licensors, as applicable." !include <$(HY_HDK)\build\make\rules.mak> Modified: harmony/enhanced/classlib/branches/java6/modules/prefs/src/main/native/prefs/windows/makefile URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/prefs/src/main/native/prefs/windows/makefile?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/prefs/src/main/native/prefs/windows/makefile (original) +++ harmony/enhanced/classlib/branches/java6/modules/prefs/src/main/native/prefs/windows/makefile Thu Jun 11 16:05:16 2009 @@ -39,6 +39,6 @@ MDLLIBFILES = $(MDLLIBFILES) \ $(LIBPATH)hypool$(HY_LINKLIB_SUFFIX) $(LIBPATH)vmi$(HY_LINKLIB_SUFFIX) DLLBASE=0x13300000 -COMMENT=/comment:"Preferences component native code. (c) Copyright 1993, 2005 The Apache Software Foundation or its licensors, as applicable." +COMMENT=/comment:"Preferences component native code. (c) Copyright 1993, 2007 The Apache Software Foundation or its licensors, as applicable." !include <$(HY_HDK)\build\make\rules.mak> Modified: harmony/enhanced/classlib/branches/java6/modules/prefs/src/main/native/prefs/windows/prefs_copyright.c URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/prefs/src/main/native/prefs/windows/prefs_copyright.c?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/prefs/src/main/native/prefs/windows/prefs_copyright.c (original) +++ harmony/enhanced/classlib/branches/java6/modules/prefs/src/main/native/prefs/windows/prefs_copyright.c Thu Jun 11 16:05:16 2009 @@ -18,4 +18,4 @@ /* A copyright string included in each DLL and executable */ const char hyCopyright[] = - "(c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable."; + "(c) Copyright 1991, 2007 The Apache Software Foundation or its licensors, as applicable."; Modified: harmony/enhanced/classlib/branches/java6/modules/print/src/main/native/print/windows/makefile URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/print/src/main/native/print/windows/makefile?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/print/src/main/native/print/windows/makefile (original) +++ harmony/enhanced/classlib/branches/java6/modules/print/src/main/native/print/windows/makefile Thu Jun 11 16:05:16 2009 @@ -42,7 +42,7 @@ # $(LIBPATH)hythr.lib $(LIBPATH)vmi.lib $(JPEG_DIR)libjpeg.lib DLLBASE=0x13300000 -COMMENT=/comment:"Print native code. (c) Copyright 2005 - 2006 The Apache Software Foundation or its licensors, as applicable." +COMMENT=/comment:"Print native code. (c) Copyright 2005, 2007 The Apache Software Foundation or its licensors, as applicable." !include <$(HY_HDK)\build\make\rules.mak> Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/shared/security_copyright.c URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/shared/security_copyright.c?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/shared/security_copyright.c (original) +++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/shared/security_copyright.c Thu Jun 11 16:05:16 2009 @@ -18,4 +18,4 @@ /* A copyright string included in each DLL and executable */ const char hyCopyright[] = - "(c) Copyright 2006, 2007 The Apache Software Foundation or its licensors, as applicable."; + "(c) Copyright 2006, 2008 The Apache Software Foundation or its licensors, as applicable."; Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/windows/makefile URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/windows/makefile?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/windows/makefile (original) +++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/windows/makefile Thu Jun 11 16:05:16 2009 @@ -30,6 +30,6 @@ MDLLIBFILES = $(LIBPATH)hycommon$(HY_LINKLIB_SUFFIX) $(LIBPATH)hypool$(HY_LINKLIB_SUFFIX) DLLBASE=0x1300000 -COMMENT=/comment:"Security component native code. (c) Copyright 2006,2007 The Apache Software Foundation or its licensors, as applicable." +COMMENT=/comment:"Security component native code. (c) Copyright 2006 The Apache Software Foundation or its licensors, as applicable." !include <$(HY_HDK)\build\make\rules.mak> Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/crypto/SHA1ImplTest.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/crypto/SHA1ImplTest.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/crypto/SHA1ImplTest.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/provider/crypto/SHA1ImplTest.java Thu Jun 11 16:05:16 2009 @@ -19,6 +19,8 @@ package org.apache.harmony.security.tests.provider.crypto; +import java.io.UnsupportedEncodingException; + import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; @@ -99,13 +101,13 @@ * The test checks out that SHA1Impl computes correct value * if data supplied takes exactly fourteen words of sixteen word buffer. */ - public final void testMultiBlockMessage() { + public final void testMultiBlockMessage() throws UnsupportedEncodingException { // values defined in examples in Secure Hash Standard int[] hash = {0x84983e44, 0x1c3bd26e, 0xbaae4aa1, 0xf95129e5, 0xe54670f1 }; // string defined in examples in Secure Hash Standard - md.update("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".getBytes()); + md.update("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq".getBytes("UTF-8")); byte[] dgst = md.digest(); for ( int k = 0; k < 5; k++ ) { Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/provider/cert/CertFactoryTestData.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/provider/cert/CertFactoryTestData.java?rev=783825&r1=783824&r2=783825&view=diff ============================================================================== --- harmony/enhanced/classlib/branches/java6/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/provider/cert/CertFactoryTestData.java (original) +++ harmony/enhanced/classlib/branches/java6/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/provider/cert/CertFactoryTestData.java Thu Jun 11 16:05:16 2009 @@ -22,6 +22,8 @@ package org.apache.harmony.security.tests.support.provider.cert; +import java.io.UnsupportedEncodingException; + import org.apache.harmony.luni.util.Base64; /** @@ -293,28 +295,28 @@ "-----END X509 CRL-----\n"; - public static byte[] getCertPathPKCS7Encoding() { - return Base64.decode(certPathPKCS7Base64.getBytes()); + public static byte[] getCertPathPKCS7Encoding() throws UnsupportedEncodingException { + return Base64.decode(certPathPKCS7Base64.getBytes("UTF-8")); } - public static byte[] getCertPathPkiPathEncoding() { - return Base64.decode(certPathPkiPathBase64.getBytes()); + public static byte[] getCertPathPkiPathEncoding() throws UnsupportedEncodingException { + return Base64.decode(certPathPkiPathBase64.getBytes("UTF-8")); } - public static byte[] getCertEncoding() { - return Base64.decode(certEncodingBase64.getBytes()); + public static byte[] getCertEncoding() throws UnsupportedEncodingException { + return Base64.decode(certEncodingBase64.getBytes("UTF-8")); } - public static byte[] getBase64CertEncoding() { - return base64certEncoding.getBytes(); + public static byte[] getBase64CertEncoding() throws UnsupportedEncodingException { + return base64certEncoding.getBytes("UTF-8"); } - public static byte[] getBase64CRLEncoding() { - return crlEncodingPEM.getBytes(); + public static byte[] getBase64CRLEncoding() throws UnsupportedEncodingException { + return crlEncodingPEM.getBytes("UTF-8"); } - public static byte[] getCRLEncoding() { - return Base64.decode(crlEncodingBase64.getBytes()); + public static byte[] getCRLEncoding() throws UnsupportedEncodingException { + return Base64.decode(crlEncodingBase64.getBytes("UTF-8")); } } Propchange: harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jun 11 16:05:16 2009 @@ -1 +1 @@ -/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java:768152-772828 +/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java:768152-782693 Propchange: harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jun 11 16:05:16 2009 @@ -1 +1 @@ -/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java:768152-772828 +/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java:768152-782693 Propchange: harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/text/parser/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jun 11 16:05:16 2009 @@ -1 +1 @@ -/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/parser:768152-772828 +/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/parser:768152-782693