JDK-6447194 : Test 4523989 failed on 1.4.2_13b1 but passed on previous FCS
  • Type: Bug
  • Component: other-libs
  • Sub-Component: other
  • Affected Version: 1.4.2_13
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2006-07-10
  • Updated: 2012-08-06
  • Resolved: 2009-12-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2_13 b02Fixed
Related Reports
Relates :  
Description
Test     * java/net/HttpURLConnection/4523989/Test.java: Behavior of getResponseCode() is different between 131_01 and 131 Fixed in JDK1.3.1_03 
failed on 1.4.2_13b1 but passed on previous fcs 1.4.2_12b3

output results are 
for 1.4.2_12
getResponseCode: 404
getInputStream: java.io.IOException
getErrorStream: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@10385c1

for 1.4.2_13
getResponseCode: 404
getInputStream: java.io.FileNotFoundException: http://jpseuwt-ap/testcases/131/4523989
getErrorStream: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@42719c

Test passed if
grep "getInputStream" test.out | grep "java.io.IOException"

Also
According documentations it should throw IOException - if an I/O error occurs while creating the input stream.
So it's a bug in that case.

In other case it can be a test's issue, I see a change of the checking filed state
grep "getInputStream" test.out | grep "java.io.FileNotFoundException"
changed to 
grep "getInputStream" test.out | grep "java.io.IOException"

So, please correct me if it's a not product issue but test's one

Execution results for that test are attached 

How to reproduce - 
run JTreg with appropriate JDK (1.4.2_13b1)
the JTreg is placed on /net/jqa/export/home4/testsuites/regression/sqe-tools2.1.6fcs
to run please follow instructions http://jqa.ireland/procedures/test_procedures/141_test_procedures/RegressionTestExecution.html
use appropriate locations 
test-suite 	/net/jqa/export/home4/testsuites/regression/142u13/test
And -automatic -bug:4523989 flag to that script

tested on
SunOS ventura 5.10 Generic_118822-30 sun4u sparc SUNW,Sun-Blade-2500
bash-3.00$ cat /etc/*release*
                       Solaris 10 1/06 s10s_u1wos_19a SPARC
           Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 07 December 2005

Comments
EVALUATION API doc is ok. FNFE is a subclass of IOE, and the http implementation will throw IOE for other response codes outside of 404. API dos should not be changed.
10-07-2006

EVALUATION I am okey to change testcase, but this implemetation change obsoletes the API docs below; http://java.sun.com/j2se/1.4.2/docs/api/java/net/HttpURLConnection.html#getResponseCode() http://java.sun.com/j2se/1.4.2/docs/api/java/net/URLConnection.html#getInputStream() So API doc need to be updated.
10-07-2006

EVALUATION Testcase need to be modified for 5.0ux regression workspace also.
10-07-2006

EVALUATION As mentioned by Chris earlier, it's a change in output so the testcase needs to be modified accordingly. Previously testcase was checking IOException to determine pass/fail now need to check specific exception, FileNotFoundException to do that.
10-07-2006

EVALUATION This "regression" is as a result of the fix for 4845728, that was integrated into 1.4.2_13 b01. It is a change in behavior but does not violate the spec for URLConnection.getInputStream as FNFE is a subclass of IOE.
10-07-2006