# HG changeset patch # User asaha # Date 1277755643 25200 # Node ID 192093b11c673966b2eaab2d771225167d328cbe # Parent e169f270518ec64de4e7386128703f406398a22a# Parent 2d5303114f44afb69275049bc2c5d24ec1b06c4d Merge diff -r e169f270518e -r 192093b11c67 jdk/make/common/Release.gmk --- a/jdk/make/common/Release.gmk Thu Jun 24 10:56:00 2010 -0700 +++ b/jdk/make/common/Release.gmk Mon Jun 28 13:07:23 2010 -0700 @@ -549,7 +549,6 @@ ###################################################### # List of directories in classes directory that should NOT be in rt.jar -# sun/nio/cs/ext/ will go into charsets.jar ###################################################### NOT_RT_JAR_LIST = $(ABS_TEMPDIR)/not_rt_jar.list @@ -572,7 +571,6 @@ $(ECHO) "META-INF/services/com.sun.tools.xjc.Plugin" >> $@ $(ECHO) "com/sun/tools/" >> $@ $(ECHO) "sun/jvmstat/" >> $@ - $(ECHO) "sun/nio/cs/ext/" >> $@ $(ECHO) "sun/rmi/rmic/" >> $@ $(ECHO) "sun/tools/asm/" >> $@ $(ECHO) "sun/tools/java/" >> $@ diff -r e169f270518e -r 192093b11c67 jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java --- a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Thu Jun 24 10:56:00 2010 -0700 +++ b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Mon Jun 28 13:07:23 2010 -0700 @@ -2331,7 +2331,7 @@ * closed the connection to the web server. */ private void disconnectWeb() throws IOException { - if (usingProxy()) { + if (usingProxy() && http.isKeepingAlive()) { responseCode = -1; // clean up, particularly, skip the content part // of a 401 error response diff -r e169f270518e -r 192093b11c67 jdk/test/ProblemList.txt --- a/jdk/test/ProblemList.txt Thu Jun 24 10:56:00 2010 -0700 +++ b/jdk/test/ProblemList.txt Mon Jun 28 13:07:23 2010 -0700 @@ -379,9 +379,6 @@ # Interrupted or IO exception, maybe writing to non-unique named file? com/sun/net/httpserver/bugs/B6373555.java generic-all -# Fails on OpenSolaris, BindException unexpected -java/net/BindException/Test.java generic-all - # Fails on OpenSolaris, times out java/net/MulticastSocket/SetOutgoingIf.java generic-all diff -r e169f270518e -r 192093b11c67 jdk/test/java/net/Authenticator/B4769350.java --- a/jdk/test/java/net/Authenticator/B4769350.java Thu Jun 24 10:56:00 2010 -0700 +++ b/jdk/test/java/net/Authenticator/B4769350.java Mon Jun 28 13:07:23 2010 -0700 @@ -54,6 +54,7 @@ boolean allowerror; Client (String authority, String path, boolean allowerror) { + super("Thread-" + path); this.authority = authority; this.path = path; this.allowerror = allowerror; @@ -72,7 +73,8 @@ error = true; } catch (IOException e) { if (!allowerror) { - System.out.println (e); + System.out.println (Thread.currentThread().getName() + " " + e); + e.printStackTrace(); error = true; } } @@ -94,6 +96,7 @@ } void okReply (HttpTransaction req) throws IOException { + req.addResponseHeader ("Connection", "close"); req.setResponseEntityBody ("Hello ."); req.sendResponse (200, "Ok"); req.orderlyClose(); diff -r e169f270518e -r 192093b11c67 jdk/test/java/net/BindException/Test.java --- a/jdk/test/java/net/BindException/Test.java Thu Jun 24 10:56:00 2010 -0700 +++ b/jdk/test/java/net/BindException/Test.java Mon Jun 28 13:07:23 2010 -0700 @@ -180,7 +180,7 @@ while (addrs.hasMoreElements()) { InetAddress ia = (InetAddress)addrs.nextElement(); - if (ia.isLoopbackAddress()) { + if (ia.isLoopbackAddress() || ia.isAnyLocalAddress()) { continue; } diff -r e169f270518e -r 192093b11c67 jdk/test/java/net/ipv6tests/Tests.java --- a/jdk/test/java/net/ipv6tests/Tests.java Thu Jun 24 10:56:00 2010 -0700 +++ b/jdk/test/java/net/ipv6tests/Tests.java Mon Jun 28 13:07:23 2010 -0700 @@ -248,7 +248,8 @@ } while (addrs.hasMoreElements()) { InetAddress addr = (InetAddress) addrs.nextElement(); - if (filter.isInstance (addr) && !addr.isLoopbackAddress()) { + if (filter.isInstance (addr) && !addr.isLoopbackAddress() + && !addr.isAnyLocalAddress()) { if (Arrays.equals (addr.getAddress(), fe80_loopback)) { continue; } diff -r e169f270518e -r 192093b11c67 jdk/test/java/nio/channels/FileChannel/Transfer.java --- a/jdk/test/java/nio/channels/FileChannel/Transfer.java Thu Jun 24 10:56:00 2010 -0700 +++ b/jdk/test/java/nio/channels/FileChannel/Transfer.java Mon Jun 28 13:07:23 2010 -0700 @@ -25,7 +25,6 @@ * @bug 4434723 4482726 4559072 4638365 4795550 5081340 5103988 6253145 * @summary Test FileChannel.transferFrom and transferTo * @library .. - * @run main/timeout=240 Transfer */ import java.io.*; @@ -33,6 +32,8 @@ import java.nio.*; import java.nio.channels.*; import java.nio.channels.spi.SelectorProvider; +import java.nio.file.StandardOpenOption; +import java.nio.file.FileAlreadyExistsException; import java.util.Random; @@ -262,23 +263,30 @@ // Test transferFrom with large file public static void xferTest05() throws Exception { - // Linux can't handle the really large file sizes for a - // truncate or a positional write - String osName = System.getProperty("os.name"); - if (osName.startsWith("Linux")) - return; - // Create a source file & large sink file for the test File source = File.createTempFile("blech", null); source.deleteOnExit(); initTestFile(source, 100); - File sink = File.createTempFile("sink", null); + // Create the sink file as a sparse file if possible + File sink = null; + FileChannel fc = null; + while (fc == null) { + sink = File.createTempFile("sink", null); + // re-create as a sparse file + sink.toPath().delete(); + try { + fc = FileChannel.open(sink.toPath(), + StandardOpenOption.CREATE_NEW, + StandardOpenOption.WRITE, + StandardOpenOption.SPARSE); + } catch (FileAlreadyExistsException ignore) { + // someone else got it + } + } sink.deleteOnExit(); long testSize = ((long)Integer.MAX_VALUE) * 2; - RandomAccessFile raf = new RandomAccessFile(sink, "rw"); - FileChannel fc = raf.getChannel(); try { fc.write(ByteBuffer.wrap("Use the source!".getBytes()), testSize - 40); @@ -288,24 +296,26 @@ return; } finally { fc.close(); - raf.close(); } // Get new channels for the source and sink and attempt transfer - FileInputStream fis = new FileInputStream(source); - FileChannel sourceChannel = fis.getChannel(); - - raf = new RandomAccessFile(sink, "rw"); - FileChannel sinkChannel = raf.getChannel(); + FileChannel sourceChannel = new FileInputStream(source).getChannel(); + try { + FileChannel sinkChannel = new RandomAccessFile(sink, "rw").getChannel(); + try { + long bytesWritten = sinkChannel.transferFrom(sourceChannel, + testSize - 40, 10); + if (bytesWritten != 10) { + throw new RuntimeException("Transfer test 5 failed " + + bytesWritten); + } + } finally { + sinkChannel.close(); + } + } finally { + sourceChannel.close(); + } - long bytesWritten = sinkChannel.transferFrom(sourceChannel, - testSize - 40, 10); - if (bytesWritten != 10) { - throw new RuntimeException("Transfer test 5 failed " + - bytesWritten); - } - sourceChannel.close(); - sinkChannel.close(); source.delete(); sink.delete(); }