You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2010/07/14 22:23:38 UTC
svn commit: r964181 - in /harmony/enhanced/java/branches/mrh: ./ classlib/
classlib/modules/archive/make/
classlib/modules/archive/src/main/java/java/util/zip/
classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/
class...
Author: hindessm
Date: Wed Jul 14 20:23:37 2010
New Revision: 964181
URL: http://svn.apache.org/viewvc?rev=964181&view=rev
Log:
Merge changes from trunk@964042.
Added:
harmony/enhanced/java/branches/mrh/classlib/support/src/test/java/tests/resources/hyts_flushed.jar
- copied unchanged from r964042, harmony/enhanced/java/trunk/classlib/support/src/test/java/tests/resources/hyts_flushed.jar
harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/jdb/
- copied from r964042, harmony/enhanced/java/trunk/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/jdb/
harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/jdb/Main.java
- copied unchanged from r964042, harmony/enhanced/java/trunk/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/jdb/Main.java
Modified:
harmony/enhanced/java/branches/mrh/ (props changed)
harmony/enhanced/java/branches/mrh/build.xml
harmony/enhanced/java/branches/mrh/classlib/ (props changed)
harmony/enhanced/java/branches/mrh/classlib/modules/archive/make/run-test.xml
harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/main/java/java/util/zip/ZipFile.java
harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java
harmony/enhanced/java/branches/mrh/classlib/modules/crypto/make/run-test.xml
harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/main/java/javax/imageio/ImageTypeSpecifier.java
harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/main/java/javax/imageio/spi/ServiceRegistry.java
harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/main/java/javax/imageio/stream/ImageOutputStreamImpl.java
harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/test/java/javax/imageio/ImageTypeSpecifierTest.java
harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/test/java/javax/imageio/stream/ImageOutputStreamImplTest.java
harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/make/run-test.xml
harmony/enhanced/java/branches/mrh/classlib/modules/luni/make/run-test.xml
harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/io/BufferedOutputStream.java
harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/net/InetSocketAddress.java
harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/net/URLConnection.java
harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedOutputStreamTest.java
harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/DatagramPacketTest.java
harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/InetSocketAddressTest.java
harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java
harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/SocketChannelImpl.java
harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/SocketChannelTest.java
harmony/enhanced/java/branches/mrh/classlib/modules/security/make/run-test.xml
harmony/enhanced/java/branches/mrh/classlib/modules/x-net/make/run-test.xml
harmony/enhanced/java/branches/mrh/common_resources/ (props changed)
harmony/enhanced/java/branches/mrh/common_resources/make/depends.xml
harmony/enhanced/java/branches/mrh/common_resources/make/properties.xml
harmony/enhanced/java/branches/mrh/drlvm/ (props changed)
harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/build.xml
harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/build.xml
Propchange: harmony/enhanced/java/branches/mrh/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 14 20:23:37 2010
@@ -1,2 +1,2 @@
/harmony/enhanced/java/branches/mrh:935751
-/harmony/enhanced/java/trunk:935751-961350
+/harmony/enhanced/java/trunk:935751-964042
Modified: harmony/enhanced/java/branches/mrh/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/build.xml?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/build.xml (original)
+++ harmony/enhanced/java/branches/mrh/build.xml Wed Jul 14 20:23:37 2010
@@ -65,7 +65,7 @@ Usage:
ant build
Compiles the java and native code to produce a jdk in
- "target/hdk".
+ "${hy.target}/hdk".
ant clean
Removes all the files generated by a build.
Propchange: harmony/enhanced/java/branches/mrh/classlib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 14 20:23:37 2010
@@ -1,4 +1,4 @@
/harmony/enhanced/classlib/trunk:926318-926838
/harmony/enhanced/java/branches/mrh/classlib:935751
-/harmony/enhanced/java/trunk/classlib:935751-961350
+/harmony/enhanced/java/trunk/classlib:935751-964042
/harmony/enhanced/trunk/classlib:476395-926317
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/archive/make/run-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/archive/make/run-test.xml?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/archive/make/run-test.xml (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/archive/make/run-test.xml Wed Jul 14 20:23:37 2010
@@ -33,14 +33,15 @@
<target name="test" depends="test-module" />
- <target name="test-module" depends="test-jre-vm-info">
+ <target name="test-module"
+ depends="test-jre-vm-info,-test-module,-test-module-impl" />
+ <target name="-test-module">
<convert-test-as-class from="test.case" to="converted.tc.class" />
- <run-hdk-tests module="archive" jar="archive_internal_tests.jar">
- <junit-elements>
- <jvmarg value="-Xbootclasspath/a:archive_internal_tests.jar${path.separator}../junit.jar" />
- </junit-elements>
- </run-hdk-tests>
<run-hdk-tests module="archive" jar="archive_tests.jar" />
</target>
+
+ <target name="-test-module-impl" if="hy.run.impl.tests">
+ <run-hdk-tests module="archive" jar="archive_internal_tests.jar" />
+ </target>
</project>
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/main/java/java/util/zip/ZipFile.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/main/java/java/util/zip/ZipFile.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/main/java/java/util/zip/ZipFile.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/main/java/java/util/zip/ZipFile.java Wed Jul 14 20:23:37 2010
@@ -347,8 +347,28 @@ public class ZipFile implements ZipConst
/*
* Seek to the first CDE and read all entries.
+ * However, when Z_SYNC_FLUSH is used the offset may not point directly
+ * to the CDE so skip over until we find it.
+ * At most it will be 6 bytes away (one or two bytes for empty block, 4 bytes for
+ * empty block signature).
*/
- rafs = new RAFStream(mRaf, centralDirOffset);
+ scanOffset = centralDirOffset;
+ stopOffset = scanOffset + 6;
+
+ while (true) {
+ mRaf.seek(scanOffset);
+ if (ZipEntry.readIntLE(mRaf) == CENSIG) {
+ break;
+ }
+
+ scanOffset++;
+ if (scanOffset > stopOffset) {
+ throw new ZipException(Messages.getString("archive.3A"));
+ }
+ }
+
+ // If CDE is found then go and read all the entries
+ rafs = new RAFStream(mRaf, scanOffset);
bin = new BufferedInputStream(rafs, 4096);
for (int i = 0; i < numEntries; i++) {
ZipEntry newEntry = new ZipEntry(ler, bin);
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java Wed Jul 14 20:23:37 2010
@@ -661,4 +661,12 @@ public class JarFileTest extends TestCas
res = jarFile.getInputStream(zipEntry).read();
assertEquals("Wrong length of empty jar entry", -1, res);
}
+
+ public void testJarWrittenWithFlush() throws IOException {
+ File f = new File(resources, "hyts_flushed.jar");
+ Support_Resources.copyFile(resources, null, "hyts_flushed.jar");
+
+ // Harmony crashes with ZipException: Central Directory Entry not found
+ new JarFile(f);
+ }
}
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/crypto/make/run-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/crypto/make/run-test.xml?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/crypto/make/run-test.xml (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/crypto/make/run-test.xml Wed Jul 14 20:23:37 2010
@@ -55,7 +55,7 @@
</run-hdk-tests>
</target>
- <target name="-test-module-impl" if="hy.test.impl">
+ <target name="-test-module-impl" if="hy.run.impl.tests">
<run-hdk-tests module="crypto" jar="crypto_impl_tests.jar">
<junit-elements>
<classpath>
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/main/java/javax/imageio/ImageTypeSpecifier.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/main/java/javax/imageio/ImageTypeSpecifier.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/main/java/javax/imageio/ImageTypeSpecifier.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/main/java/javax/imageio/ImageTypeSpecifier.java Wed Jul 14 20:23:37 2010
@@ -34,7 +34,6 @@ import java.awt.image.SampleModel;
import java.awt.image.WritableRaster;
import java.util.Hashtable;
-import org.apache.harmony.luni.util.NotImplementedException;
import org.apache.harmony.x.imageio.internal.nls.Messages;
public class ImageTypeSpecifier {
@@ -284,9 +283,130 @@ public class ImageTypeSpecifier {
return new ImageTypeSpecifier(model, model.createCompatibleSampleModel(1, 1));
}
- public static ImageTypeSpecifier createFromBufferedImageType(int bufferedImageType) throws NotImplementedException {
- // TODO: implement
- throw new NotImplementedException();
+ public static ImageTypeSpecifier createFromBufferedImageType(int bufferedImageType) {
+ switch (bufferedImageType) {
+ case BufferedImage.TYPE_INT_RGB :
+ return createPacked(ColorSpace.getInstance(ColorSpace.CS_sRGB),
+ 0x00ff0000,
+ 0x0000ff00,
+ 0x000000ff,
+ 0x0,
+ DataBuffer.TYPE_INT,
+ false);
+
+ case BufferedImage.TYPE_INT_ARGB:
+ return createPacked(ColorSpace.getInstance(ColorSpace.CS_sRGB),
+ 0x00ff0000,
+ 0x0000ff00,
+ 0x000000ff,
+ 0xff000000,
+ DataBuffer.TYPE_INT,
+ false);
+
+ case BufferedImage.TYPE_INT_ARGB_PRE:
+ return createPacked(ColorSpace.getInstance(ColorSpace.CS_sRGB),
+ 0x00ff0000,
+ 0x0000ff00,
+ 0x000000ff,
+ 0xff000000,
+ DataBuffer.TYPE_INT,
+ true);
+
+ case BufferedImage.TYPE_INT_BGR:
+ return createPacked(ColorSpace.getInstance(ColorSpace.CS_sRGB),
+ 0x00ff0000,
+ 0x0000ff00,
+ 0x000000ff,
+ 0x0,
+ DataBuffer.TYPE_INT,
+ false);
+
+ case BufferedImage.TYPE_3BYTE_BGR:
+ return createInterleaved(ColorSpace.getInstance(ColorSpace.CS_sRGB),
+ new int[]{2, 1, 0},
+ DataBuffer.TYPE_BYTE,
+ false,
+ false);
+
+ case BufferedImage.TYPE_4BYTE_ABGR:
+ return createInterleaved(ColorSpace.getInstance(ColorSpace.CS_sRGB),
+ new int[]{3, 2, 1, 0},
+ DataBuffer.TYPE_BYTE,
+ true,
+ false);
+
+ case BufferedImage.TYPE_4BYTE_ABGR_PRE:
+ return createInterleaved(ColorSpace.getInstance(ColorSpace.CS_sRGB),
+ new int[]{3, 2, 1, 0},
+ DataBuffer.TYPE_BYTE,
+ true,
+ true);
+
+ case BufferedImage.TYPE_USHORT_565_RGB:
+ return createPacked(ColorSpace.getInstance(ColorSpace.CS_sRGB),
+ 0xf800,
+ 0x07e0,
+ 0x001f,
+ 0,
+ DataBuffer.TYPE_USHORT,
+ false);
+
+ case BufferedImage.TYPE_USHORT_555_RGB:
+ return createPacked(ColorSpace.getInstance(ColorSpace.CS_sRGB),
+ 0x7c00,
+ 0x03e0,
+ 0x001f,
+ 0,
+ DataBuffer.TYPE_USHORT,
+ false);
+
+ case BufferedImage.TYPE_BYTE_GRAY:
+ return createGrayscale(8,
+ DataBuffer.TYPE_BYTE,
+ false);
+
+ case BufferedImage.TYPE_USHORT_GRAY:
+ return createGrayscale(16,
+ DataBuffer.TYPE_USHORT,
+ false);
+
+ case BufferedImage.TYPE_BYTE_BINARY: {
+ byte[] redLUT = new byte[]{0, (byte)255};
+ byte[] greenLUT = new byte[]{0, (byte)255};
+ byte[] blueLUT = new byte[]{0, (byte)255};
+
+ return createIndexed(redLUT,
+ greenLUT,
+ blueLUT,
+ null,
+ 1,
+ DataBuffer.TYPE_BYTE);
+ }
+
+ case BufferedImage.TYPE_BYTE_INDEXED: {
+ BufferedImage bufferedImage = new BufferedImage(1, 1, BufferedImage.TYPE_BYTE_INDEXED);
+ IndexColorModel colorModel = (IndexColorModel) bufferedImage.getColorModel();
+ byte[] redLUT = new byte[256];
+ byte[] greenLUT = new byte[256];
+ byte[] blueLUT = new byte[256];
+ byte[] alphaLUT = new byte[256];
+
+ colorModel.getReds(redLUT);
+ colorModel.getGreens(greenLUT);
+ colorModel.getBlues(blueLUT);
+ colorModel.getAlphas(alphaLUT);
+
+ return createIndexed(redLUT,
+ greenLUT,
+ blueLUT,
+ alphaLUT,
+ 8,
+ DataBuffer.TYPE_BYTE);
+ }
+
+ default:
+ throw new IllegalArgumentException();
+ }
}
public static ImageTypeSpecifier createFromRenderedImage(RenderedImage image) {
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/main/java/javax/imageio/spi/ServiceRegistry.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/main/java/javax/imageio/spi/ServiceRegistry.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/main/java/javax/imageio/spi/ServiceRegistry.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/main/java/javax/imageio/spi/ServiceRegistry.java Wed Jul 14 20:23:37 2010
@@ -106,8 +106,7 @@ public class ServiceRegistry {
@Override
public void finalize() throws Throwable {
- //TODO uncomment when deregisterAll is implemented
- //deregisterAll();
+ deregisterAll();
}
public boolean contains(Object provider) {
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/main/java/javax/imageio/stream/ImageOutputStreamImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/main/java/javax/imageio/stream/ImageOutputStreamImpl.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/main/java/javax/imageio/stream/ImageOutputStreamImpl.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/main/java/javax/imageio/stream/ImageOutputStreamImpl.java Wed Jul 14 20:23:37 2010
@@ -190,22 +190,71 @@ public abstract class ImageOutputStreamI
}
}
- public void writeBit(int bit) throws IOException, NotImplementedException {
- // TODO: implement
- throw new NotImplementedException();
+ public void writeBit(int bit) throws IOException {
+ writeBits((long) bit, 1);
}
- public void writeBits(long bits, int numBits) throws IOException, NotImplementedException {
- // TODO: implement
- throw new NotImplementedException();
+ public void writeBits(long bits, int numBits) throws IOException {
+ checkClosed();
+
+ if (bitOffset > 0) {
+ int oldBitOffset = bitOffset;
+ int currentByte = read();
+ if (currentByte == -1) {
+ currentByte = 0;
+ } else {
+ seek(getStreamPosition() - 1);
+ }
+
+ int num = 8 - oldBitOffset;
+ if (numBits >= num) {
+ int mask = -1 >>> (32 - num);
+ currentByte &= ~mask;
+ numBits -= num;
+ currentByte |= ((bits >> numBits) & mask);
+ write(currentByte);
+ } else {
+ int offset = oldBitOffset + numBits;
+ int mask = -1 >>> numBits;
+ currentByte &= ~(mask << (8 - offset));
+ currentByte |= ((bits & mask) << (8 - offset));
+ write(currentByte);
+ seek(getStreamPosition() - 1);
+ bitOffset = offset;
+ numBits = 0;
+ }
+ }
+
+ while (numBits > 7) {
+ int mask = -1 >>> 24;
+ int currentByte = (int) ((bits >> (numBits - 8)) & mask);
+ write(currentByte);
+ numBits -= 8;
+ }
+
+ if (numBits > 0) {
+ int mask = -1 >>> 24;
+ int currentByte = (int) ((bits << (8 - numBits)) & mask);
+ write(currentByte);
+ seek(getStreamPosition() - 1);
+ bitOffset = numBits;
+ }
}
- protected final void flushBits() throws IOException, NotImplementedException {
- if (bitOffset == 0) {
- return;
- }
-
- // TODO: implement
- throw new NotImplementedException();
+ protected final void flushBits() throws IOException {
+ checkClosed();
+ if (bitOffset == 0) {
+ return;
+ }
+ int offset = bitOffset;
+ int currentByte = read();
+ if (currentByte == -1) {
+ currentByte = 0;
+ bitOffset = 0;
+ } else {
+ seek(getStreamPosition() - 1);
+ currentByte &= -1 << (8 - offset);
+ }
+ write(currentByte);
}
}
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/test/java/javax/imageio/ImageTypeSpecifierTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/test/java/javax/imageio/ImageTypeSpecifierTest.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/test/java/javax/imageio/ImageTypeSpecifierTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/test/java/javax/imageio/ImageTypeSpecifierTest.java Wed Jul 14 20:23:37 2010
@@ -30,6 +30,21 @@ import java.awt.image.PixelInterleavedSa
import junit.framework.TestCase;
public class ImageTypeSpecifierTest extends TestCase {
+ public void testCreateFromBufferedImageType() {
+ for (int i = BufferedImage.TYPE_INT_RGB; i <= BufferedImage.TYPE_BYTE_INDEXED; i ++ ) {
+ BufferedImage bi = new BufferedImage(1, 1, i);
+ ColorModel expected = bi.getColorModel();
+
+ ImageTypeSpecifier typeSpecifier = ImageTypeSpecifier.createFromBufferedImageType(i);
+ ColorModel actual = typeSpecifier.getColorModel();
+ String msg = "Failed to create correct ImageTypeSpecifier, bufferedImageType = " + Integer.toString(i);
+ assertEquals(msg, expected.getClass(), actual.getClass());
+ assertEquals(msg, expected.getColorSpace(), actual.getColorSpace());
+ assertEquals(msg, expected.getTransferType(), actual.getTransferType());
+ assertEquals(msg, expected.getTransparency(), actual.getTransparency());
+ }
+ }
+
public void testCreateBanded() {
int[] bankIndices = new int[]{0, 1, 2};
int[] bandOffsets = new int[]{1, 1, 1};
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/test/java/javax/imageio/stream/ImageOutputStreamImplTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/test/java/javax/imageio/stream/ImageOutputStreamImplTest.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/test/java/javax/imageio/stream/ImageOutputStreamImplTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/test/java/javax/imageio/stream/ImageOutputStreamImplTest.java Wed Jul 14 20:23:37 2010
@@ -17,7 +17,9 @@
package javax.imageio.stream;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.io.OutputStream;
import java.nio.ByteOrder;
import java.util.Arrays;
@@ -176,6 +178,19 @@ public class ImageOutputStreamImplTest e
in.readFully(dest, 0, 3);
assertTrue(Arrays.equals(src, dest));
}
+
+ public void testWriteBits() throws IOException {
+ final BasicImageOutputStreamImpl out = new BasicImageOutputStreamImpl(8);
+ final ImageInputStream in = new BasicImageInputStreamImpl(out.buff);
+
+ out.writeBits(0xff, 7);
+ out.writeBit(0);
+ out.writeBits(0xabcdef, 24);
+ assertEquals("writeBits failed", 0xfe, in.read());
+ assertEquals("writeBits failed", 0xab, in.read());
+ assertEquals("writeBits failed", 0xcd, in.read());
+ assertEquals("writeBits failed", 0xef, in.read());
+ }
// FIXME: it looks like there is a bug in Double.doubleToLongBits
public void _testWriteDoubles() throws IOException {
@@ -249,12 +264,22 @@ public class ImageOutputStreamImplTest e
@Override
public int read() throws IOException {
- throw new RuntimeException("Write only");
+ bitOffset = 0;
+ return (streamPos >= buff.length) ? -1
+ : (buff[(int) streamPos++] & 0xff);
}
@Override
public int read(byte[] b, int off, int len) throws IOException {
- throw new RuntimeException("Write only");
+ int i = 0;
+ int curByte = -1;
+
+ for (; (i < len) && ((curByte = read()) != -1); i++) {
+ b[off] = (byte) curByte;
+ off++;
+ }
+
+ return (i == 0) && (curByte == -1) ? -1 : i;
}
}
}
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/make/run-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/make/run-test.xml?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/make/run-test.xml (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/make/run-test.xml Wed Jul 14 20:23:37 2010
@@ -41,7 +41,7 @@
jar="lang-management_tests.jar" />
</target>
- <target name="-test-module-impl" if="hy.test.impl">
+ <target name="-test-module-impl" if="hy.run.impl.tests">
<run-hdk-tests module="lang-management"
jar="lang-management_impl_tests.jar" />
</target>
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/make/run-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/make/run-test.xml?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/make/run-test.xml (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/make/run-test.xml Wed Jul 14 20:23:37 2010
@@ -51,7 +51,7 @@
</run-hdk-tests>
</target>
- <target name="-test-module-impl" if="hy.test.impl">
+ <target name="-test-module-impl" if="hy.run.impl.tests">
<run-hdk-tests module="luni" jar="luni_tests_impl.jar">
<junit-elements>
<!-- Required by various tests that set security manager etc -->
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/io/BufferedOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/io/BufferedOutputStream.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/io/BufferedOutputStream.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/io/BufferedOutputStream.java Wed Jul 14 20:23:37 2010
@@ -121,8 +121,11 @@ public class BufferedOutputStream extend
public synchronized void write(byte[] buffer, int offset, int length)
throws IOException {
byte[] internalBuffer = buf;
- if (internalBuffer == null) {
- throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
+
+ if (internalBuffer != null && length >= internalBuffer.length) {
+ flushInternal();
+ out.write(buffer, offset, length);
+ return;
}
if (buffer == null) {
@@ -130,12 +133,6 @@ public class BufferedOutputStream extend
throw new NullPointerException(Messages.getString("luni.11")); //$NON-NLS-1$
}
- if (length >= internalBuffer.length) {
- flushInternal();
- out.write(buffer, offset, length);
- return;
- }
-
if (offset < 0 || offset > buffer.length - length) {
// luni.12=Offset out of bounds \: {0}
throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset)); //$NON-NLS-1$
@@ -146,6 +143,10 @@ public class BufferedOutputStream extend
throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", length)); //$NON-NLS-1$
}
+ if (internalBuffer == null) {
+ throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
+ }
+
// flush the internal buffer first if we have not enough space left
if (length >= (internalBuffer.length - count)) {
flushInternal();
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/net/InetSocketAddress.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/net/InetSocketAddress.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/net/InetSocketAddress.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/net/InetSocketAddress.java Wed Jul 14 20:23:37 2010
@@ -34,6 +34,8 @@ public class InetSocketAddress extends S
private int port;
+ private transient boolean gotHostname = false;
+
/**
* Creates a socket endpoint with the given port number {@code port} and the
* wildcard address {@code InetAddress.ANY}. The range for valid port numbers
@@ -102,7 +104,6 @@ public class InetSocketAddress extends S
if (needResolved) {
try {
addr = InetAddress.getByName(hostname);
- hostname = null;
} catch (UnknownHostException e) {
// Ignored
}
@@ -153,7 +154,11 @@ public class InetSocketAddress extends S
* @return the socket endpoint hostname.
*/
public final String getHostName() {
- return (null != addr) ? addr.getHostName() : hostname;
+ if (addr != null && !gotHostname) {
+ gotHostname = true;
+ hostname = addr.getHostName();
+ }
+ return hostname;
}
/**
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/net/URLConnection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/net/URLConnection.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/net/URLConnection.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/main/java/java/net/URLConnection.java Wed Jul 14 20:23:37 2010
@@ -22,8 +22,10 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.security.AccessController;
import java.security.PrivilegedAction;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
+import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
@@ -103,6 +105,11 @@ public abstract class URLConnection {
static Hashtable<String, Object> contentHandlers = new Hashtable<String, Object>();
/**
+ * HashMap for storing request property key-valuelist pairs
+ */
+ private HashMap<String, List<String>> requestProperties = new HashMap<String, List<String>>();
+
+ /**
* A hashtable that maps the filename extension (key) to a MIME-type
* (element)
*/
@@ -441,7 +448,12 @@ public abstract class URLConnection {
if (connected) {
throw new IllegalStateException(Messages.getString("luni.5E")); //$NON-NLS-1$
}
- return Collections.emptyMap();
+
+ HashMap<String, List<String>> map = new HashMap<String, List<String>>();
+ for (String key : requestProperties.keySet()) {
+ map.put(key, Collections.unmodifiableList(requestProperties.get(key)));
+ }
+ return Collections.unmodifiableMap(map);
}
/**
@@ -465,6 +477,15 @@ public abstract class URLConnection {
if (field == null) {
throw new NullPointerException(Messages.getString("luni.95")); //$NON-NLS-1$
}
+
+ List<String> valuesList = requestProperties.get(field);
+ if (valuesList == null) {
+ valuesList = new ArrayList<String>();
+ valuesList.add(0, newValue);
+ requestProperties.put(field, valuesList);
+ } else {
+ valuesList.add(0, newValue);
+ }
}
/**
@@ -607,8 +628,7 @@ public abstract class URLConnection {
/**
* Gets the value of the request header property specified by {code field}
- * or {@code null} if there is no field with this name. The current
- * implementation of this method returns always {@code null}.
+ * or {@code null} if there is no field with this name.
*
* @param field
* the name of the request header property.
@@ -620,7 +640,11 @@ public abstract class URLConnection {
if (connected) {
throw new IllegalStateException(Messages.getString("luni.5E")); //$NON-NLS-1$
}
- return null;
+ List<String> valuesList = requestProperties.get(field);
+ if (valuesList == null) {
+ return null;
+ }
+ return valuesList.get(0);
}
/**
@@ -955,6 +979,10 @@ public abstract class URLConnection {
if (field == null) {
throw new NullPointerException(Messages.getString("luni.95")); //$NON-NLS-1$
}
+
+ List<String> valuesList = new ArrayList<String>();
+ valuesList.add(newValue);
+ requestProperties.put(field, valuesList);
}
/**
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedOutputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedOutputStreamTest.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedOutputStreamTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedOutputStreamTest.java Wed Jul 14 20:23:37 2010
@@ -329,8 +329,22 @@ public class BufferedOutputStreamTest ex
try {
bos.write(byteArray, -1, -1);
fail();
- } catch (Exception e) {
- // expected IOException. RI throws IndexOutOfBoundsException
+ } catch (IndexOutOfBoundsException e) {
+ // expected IndexOutOfBoundsException
+ }
+
+ try {
+ bos.write(null, -1, -1);
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e) {
+ // expected NullPointerException.
+ }
+
+ try {
+ bos.write(null, 0, 1);
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e) {
+ // expected NullPointerException.
}
}
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/DatagramPacketTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/DatagramPacketTest.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/DatagramPacketTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/DatagramPacketTest.java Wed Jul 14 20:23:37 2010
@@ -134,43 +134,9 @@ public class DatagramPacketTest extends
DatagramSocket socket = new DatagramSocket(0, localhost);
final int port = socket.getLocalPort();
- final Object lock = new Object();
-
- Thread thread = new Thread(new Runnable() {
- public void run() {
- DatagramSocket socket = null;
- try {
- socket = new DatagramSocket(0, localhost);
- synchronized (lock) {
- started = true;
- lock.notifyAll();
- }
- socket.setSoTimeout(3000);
- DatagramPacket packet = new DatagramPacket(new byte[256],
- 256);
- socket.receive(packet);
- socket.send(packet);
- socket.close();
- } catch (IOException e) {
- System.out.println("thread exception: " + e);
- if (socket != null)
- socket.close();
- }
- }
- });
- thread.start();
-
socket.setSoTimeout(3000);
DatagramPacket packet = new DatagramPacket(new byte[] { 1, 2, 3, 4, 5,
6 }, 6, localhost, port);
- synchronized (lock) {
- while (!started) {
- try {
- lock.wait();
- } catch (InterruptedException e) {
- }
- }
- }
socket.send(packet);
socket.receive(packet);
socket.close();
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/InetSocketAddressTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/InetSocketAddressTest.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/InetSocketAddressTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/InetSocketAddressTest.java Wed Jul 14 20:23:37 2010
@@ -31,7 +31,10 @@ public class InetSocketAddressTest exten
public void test_ConstructorLjava_lang_StringI() throws Exception {
// regression test for Harmony-1042
InetSocketAddress address = new InetSocketAddress("127.0.0.1", 0);
- assertNotNull(address.getHostName());
+ assertEquals("/127.0.0.1:0", address.toString());
+ String localhostName = address.getHostName();
+ assertNotNull(localhostName);
+ assertEquals(localhostName+"/127.0.0.1:0", address.toString());
}
/**
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/URLConnectionTest.java Wed Jul 14 20:23:37 2010
@@ -38,7 +38,9 @@ import java.net.URLConnection;
import java.net.URLStreamHandler;
import java.security.Permission;
import java.util.Arrays;
+import java.util.ArrayList;
import java.util.Calendar;
+import java.util.Collections;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.Map;
@@ -129,6 +131,32 @@ public class URLConnectionTest extends j
// expected
}
+ u.addRequestProperty("key", "value");
+ u.addRequestProperty("key", "value2");
+ assertEquals("value2", u.getRequestProperty("key"));
+ ArrayList list = new ArrayList();
+ list.add("value2");
+ list.add("value");
+
+ Map<String,List<String>> propertyMap = u.getRequestProperties();
+ // Check this map is unmodifiable
+ try {
+ propertyMap.put("test", null);
+ fail("Map returned by URLConnection.getRequestProperties() should be unmodifiable");
+ } catch (UnsupportedOperationException e) {
+ // Expected
+ }
+
+ List<String> valuesList = propertyMap.get("key");
+ // Check this list is also unmodifiable
+ try {
+ valuesList.add("test");
+ fail("List entries in the map returned by URLConnection.getRequestProperties() should be unmodifiable");
+ } catch (UnsupportedOperationException e) {
+ // Expected
+ }
+ assertEquals(list, valuesList);
+
u.connect();
try {
// state of connection is checked first
@@ -1020,7 +1048,7 @@ public class URLConnectionTest extends j
URL url = new URL("http", "test", 80, "index.html", new NewHandler());
URLConnection urlCon = url.openConnection();
urlCon.setRequestProperty("test", "testProperty");
- assertNull(urlCon.getRequestProperty("test"));
+ assertEquals("testProperty", urlCon.getRequestProperty("test"));
urlCon.connect();
try {
@@ -1293,8 +1321,16 @@ public class URLConnectionTest extends j
* @tests java.net.URLConnection#setRequestProperty(java.lang.String,
* java.lang.String)
*/
- public void test_setRequestPropertyLjava_lang_StringLjava_lang_String() {
- assertTrue("Used to test", true);
+ public void test_setRequestPropertyLjava_lang_StringLjava_lang_String()
+ throws MalformedURLException{
+ MockURLConnection u = new MockURLConnection(new URL(
+ "http://www.apache.org"));
+
+ u.setRequestProperty("", "");
+ assertEquals("", u.getRequestProperty(""));
+
+ u.setRequestProperty("key", "value");
+ assertEquals("value", u.getRequestProperty("key"));
}
/**
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/SocketChannelImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/SocketChannelImpl.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/SocketChannelImpl.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/main/java/common/org/apache/harmony/nio/internal/SocketChannelImpl.java Wed Jul 14 20:23:37 2010
@@ -524,8 +524,8 @@ class SocketChannelImpl extends SocketCh
for (int i = offset; i < length + offset; i++) {
if (bytesRemaining > sources[i].remaining()) {
int pos = sources[i].limit();
- sources[i].position(pos);
bytesRemaining -= sources[i].remaining();
+ sources[i].position(pos);
} else {
int pos = sources[i].position() + (int) bytesRemaining;
sources[i].position(pos);
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/SocketChannelTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/SocketChannelTest.java?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/SocketChannelTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/SocketChannelTest.java Wed Jul 14 20:23:37 2010
@@ -2772,6 +2772,40 @@ public class SocketChannelTest extends T
/**
* @tests java.nio.channels.SocketChannel#write(ByteBuffer[])
*/
+ public void test_writev2() throws Exception {
+ ServerSocketChannel ssc = ServerSocketChannel.open();
+ ssc.configureBlocking(false);
+ ssc.socket().bind(null);
+ SocketChannel sc = SocketChannel.open();
+ sc.configureBlocking(false);
+ boolean connected = sc.connect(ssc.socket().getLocalSocketAddress());
+ SocketChannel sock = ssc.accept();
+ if (!connected) {
+ sc.finishConnect();
+ }
+
+ ByteBuffer buf1 = ByteBuffer.allocate(10);
+ sc.socket().setSendBufferSize(512);
+ int bufSize = sc.socket().getSendBufferSize();
+ ByteBuffer buf2 = ByteBuffer.allocate(bufSize * 10);
+
+ ByteBuffer[] sent = new ByteBuffer[2];
+ sent[0] = buf1;
+ sent[1] = buf2;
+
+ long whole = buf1.remaining() + buf2.remaining();
+
+ long write = sc.write(sent);
+ ssc.close();
+ sc.close();
+ sock.close();
+
+ assertTrue(whole == (write + buf1.remaining() + buf2.remaining()));
+ }
+
+ /**
+ * @tests java.nio.channels.SocketChannel#write(ByteBuffer[])
+ */
public void test_write$LByteBuffer2() throws IOException {
// Set-up
ServerSocketChannel server = ServerSocketChannel.open();
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/security/make/run-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/security/make/run-test.xml?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/security/make/run-test.xml (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/security/make/run-test.xml Wed Jul 14 20:23:37 2010
@@ -51,7 +51,7 @@
</run-hdk-tests>
</target>
- <target name="-test-module-impl" if="hy.test.impl">
+ <target name="-test-module-impl" if="hy.run.impl.tests">
<run-hdk-tests module="security" jar="security_tests_impl.jar">
<junit-elements>
<classpath>
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/x-net/make/run-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/x-net/make/run-test.xml?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/x-net/make/run-test.xml (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/x-net/make/run-test.xml Wed Jul 14 20:23:37 2010
@@ -47,7 +47,7 @@
</run-hdk-tests>
</target>
- <target name="-test-module-impl" if="hy.test.impl">
+ <target name="-test-module-impl" if="hy.run.impl.tests">
<run-hdk-tests module="x-net" jar="x-net_impl_tests.jar">
<junit-elements>
<classpath>
Propchange: harmony/enhanced/java/branches/mrh/common_resources/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 14 20:23:37 2010
@@ -1,4 +1,4 @@
/harmony/enhanced/java/branches/mrh/common_resources:935751
-/harmony/enhanced/java/trunk/common_resources:935751-961350
+/harmony/enhanced/java/trunk/common_resources:935751-964042
/harmony/enhanced/trunk/common_resources:476395-921782
/incubator/harmony/enhanced/trunk/common_resources:292550-476394
Modified: harmony/enhanced/java/branches/mrh/common_resources/make/depends.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/common_resources/make/depends.xml?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/common_resources/make/depends.xml (original)
+++ harmony/enhanced/java/branches/mrh/common_resources/make/depends.xml Wed Jul 14 20:23:37 2010
@@ -72,10 +72,11 @@
<antcall target="-remove-file-if-bad">
<param name="jar" value="@{dest}" />
</antcall>
- <fail unless="@{dest}.md5.verified">
+ <property name="@{dest}.fullpath" location="@{dest}" />
+ <fail unless="@{dest}.md5.verified">
...
-File @{dest} has incorrect md5 checksum.
+File ${@{dest}.fullpath} has incorrect md5 checksum.
Expected: @{md5} (or @{md5-deprecated})
Found: ${@{dest}.md5}
Modified: harmony/enhanced/java/branches/mrh/common_resources/make/properties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/common_resources/make/properties.xml?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/common_resources/make/properties.xml (original)
+++ harmony/enhanced/java/branches/mrh/common_resources/make/properties.xml Wed Jul 14 20:23:37 2010
@@ -93,7 +93,9 @@
<property name="hy.test.forkmode" value="once" />
<property name="hy.test.timeout" value="900000" />
<property name="hy.test.vmargs" value="" />
- <property name="hy.test.impl" value="true" />
+ <condition property="hy.run.impl.tests" value="true">
+ <istrue value="${hy.test.impl}" />
+ </condition>
<condition property="png.home" value="/usr/local">
<isset property="is.freebsd"/>
@@ -473,7 +475,7 @@ HY_LINKLIB_SUFFIX=${linklib.suffix}
</and>
</condition>
The Eclipse compiler class for Ant could not be found. Please place the ECJ JAR in ANT_HOME/lib.
-The JAR can be downloaded directly from eclipse.org or copied from COMMON_RESOURCES/depends/jars/ecj_3.x folder after the fetch-depends target for JDKTOOLS has been run.
+The JAR can be downloaded directly from eclipse.org or copied from common_resources/depends/jars/ecj_3.x folder after the fetch-depends target for jdktools has been run.
Alternatively, you can switch to another compiler, e.g. specify '-Dhy.javac.compiler=modern' for classic javac.
</fail>
</sequential>
Propchange: harmony/enhanced/java/branches/mrh/drlvm/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 14 20:23:37 2010
@@ -1,5 +1,5 @@
/harmony/enhanced/java/branches/mrh/drlvm:935751
-/harmony/enhanced/java/trunk/drlvm:935751-961350
+/harmony/enhanced/java/trunk/drlvm:935751-964042
/harmony/enhanced/trunk/drlvm:476395-926313
/harmony/enhanced/trunk/working_vm:476396-920147
/incubator/harmony/enhanced/trunk/working_vm:423974-476394
Modified: harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/build.xml?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/build.xml (original)
+++ harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/build.xml Wed Jul 14 20:23:37 2010
@@ -111,6 +111,7 @@
<classpath>
<pathelement path="${jdt.jdi.jar}"/>
+ <pathelement path="${jdt.jdimodel.jar}"/>
<pathelement path="${ecj.jar}" />
<pathelement path="${ant.library.dir}/ant.jar" />
<pathelement path="${ant.library.dir}/ant-launcher.jar" />
Modified: harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/build.xml?rev=964181&r1=964180&r2=964181&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/build.xml (original)
+++ harmony/enhanced/java/branches/mrh/jdktools/modules/samsa/build.xml Wed Jul 14 20:23:37 2010
@@ -79,6 +79,9 @@
<copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/jar${exe.suffix}" />
<chmod file="${hy.jdk}/bin/jar${exe.suffix}" perm="ugo+x" />
+ <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/jdb${exe.suffix}" />
+ <chmod file="${hy.jdk}/bin/jdb${exe.suffix}" perm="ugo+x" />
+
<copy file="${hy.samsa.exe}" tofile="${hy.jre}/bin/keytool${exe.suffix}" />
<chmod file="${hy.jre}/bin/keytool${exe.suffix}" perm="ugo+x" />