This test seems to be failing on all platforms. Here's an example from JPRT:
--------------------------------------------------
TEST: java/net/ResponseCache/getResponseCode.java
JDK under test: (/tmp/jprt/T1/T/082813.ab23780/testproduct/linux_i586_2.6-product)
java version "1.7.0-internal"
Java(TM) SE Runtime Environment (build 1.7.0-internal-jprtadm_2010_06_01_03_58-b00)
Java HotSpot(TM) Client VM (build 19.0-b01, mixed mode, sharing)
ACTION: build -- Passed. Build successful
REASON: Named class compiled on demand
TIME: 0.021 seconds
messages:
command: build getResponseCode
reason: Named class compiled on demand
elapsed time (seconds): 0.021
ACTION: compile -- Passed. Compilation successful
REASON: .class file out of date or does not exist
TIME: 0.021 seconds
messages:
command: compile /tmp/jprt/T1/T/082813.ab23780/source/jdk/test/java/net/ResponseCache/getResponseCode.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.021
direct:
Note: /tmp/jprt/T1/T/082813.ab23780/source/jdk/test/java/net/ResponseCache/getResponseCode.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: java.lang.RuntimeException: invalid stream header: ACED0573
REASON: Assumed action based on file name: run main getResponseCode
TIME: 0.006 seconds
messages:
command: main getResponseCode
reason: Assumed action based on file name: run main getResponseCode
elapsed time (seconds): 0.006
STDOUT:
STDERR:
java.lang.RuntimeException: java.lang.RuntimeException: invalid stream header: ACED0573
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1106)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2491)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at getResponseCode.<init>(getResponseCode.java:46)
at getResponseCode.main(getResponseCode.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:613)
at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:680)
at java.lang.Thread.run(Thread.java:717)
Caused by: java.lang.RuntimeException: invalid stream header: ACED0573
at getResponseCode$MyResponse.<init>(getResponseCode.java:82)
at getResponseCode$MyResponseCache.get(getResponseCode.java:67)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:754)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:727)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1164)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:459)
... 8 more
JavaTest Message: Test threw exception: java.lang.RuntimeException
JavaTest Message: shutting down test
TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: java.lang.RuntimeException: invalid stream header: ACED0573
java/net/ResponseCache/ResponseCacheTest.java also fails with:
>: java ResponseCacheTest
request headers: {}
responsecode is :-1
responsecode2 is :200
headers1{}
headers2={null=[HTTP/1.1 200 OK], Content-Length=[5225], Content-Type=[text/html; charset=iso-8859-1], Connection=[close]}
Exception in thread "main" java.lang.RuntimeException: test failed
at ResponseCacheTest.<init>(ResponseCacheTest.java:149)
at ResponseCacheTest.main(ResponseCacheTest.java:157)