United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-5026610 TEST_BUG: test java/nio/charset/coders/IsSupported.java fails,1.4.2_05b01
JDK-5026610 : TEST_BUG: test java/nio/charset/coders/IsSupported.java fails,1.4.2_05b01

Details
Type:
Bug
Submit Date:
2004-04-05
Status:
Closed
Updated Date:
2004-05-20
Project Name:
JDK
Resolved Date:
2004-05-10
Component:
core-libs
OS:
generic
Sub-Component:
java.nio.charsets
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.2_05
Fixed Versions:
1.4.2_05 (05)

Related Reports

Sub Tasks

Description
testcase below fails for 1.4.2_05b01.
Testbase :
/net/latte/deployment1/regtests/142/test/

File :
java/nio/charset/coders/IsSupported.java fails for 1.4.2_05b01

Platforms tested include Solaris Sparc and Linux.

tester@xpsc3:/tmp/coders> java -version
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
tester@xpsc3:/tmp/coders> java  -Dsun.nio.cs.map=Windows-31J/Shift_JIS IsSupported Shift_JIS false
<PASS>

tester@xpsc3:/tmp/coders> export PATH=/usr/java/j2sdk1.4.2_05/bin:${PATH}
tester@xpsc3:/tmp/coders> java  -Dsun.nio.cs.map=Windows-31J/Shift_JIS IsSupported Shift_JIS false
Exception in thread "main" java.lang.Exception: Support for Shift_JIS is contrary to expectation
        at IsSupported.main(IsSupported.java:20)
tester@xpsc3:/tmp/coders> java -version
java version "1.4.2_05-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-ea-b01)
Java HotSpot(TM) Client VM (build 1.4.2_05-ea-b01, mixed mode)

###@###.### 2004-04-05

                                    

Comments
EVALUATION

This issue is caused by BugId 4838512. In fact the fix for BugId 4838512 just 
exposes that the testcase has a problem.

Even with the property -Dsun.nio.cs.map=Windows-31J/Shift_JIS set the test 
should be returning true for Charset.isSupported(). This is because the 
property only maps Shift_JIS to Windows-31J. The only way to test it is to try
mapping characters that will 2 different results depending on which charset
is used.

This testcase ( java/nio/charset/coders/IsSupported.java ) is incorrect has been 
removed in the 1.5 source base and been replaced by:
  java/nio/charset/coders/CheckSJISMappingProp.sh     
  java/nio/charset/coders/SJISPropTest.java

We also need to update the regresion testcase in 1.4.2_05

###@###.### 2004-04-06
                                     
2004-04-06
SUGGESTED FIX

rename from: test/java/nio/charset/coders/IsSupported.java
  to: deleted_files/test/java/nio/charset/coders/.del-IsSupported.java-Apr-06-04
create: test/java/nio/charset/coders/CheckSJISMappingProp.sh
create: test/java/nio/charset/coders/SJISPropTest.java

###@###.### 2004-04-07
---------------------------------------
                                     
2004-04-07
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
1.4.2_05
generic

FIXED IN:
1.4.2_05

INTEGRATED IN:
1.4.2_05

VERIFIED IN:
1.4.2_05


                                     
2004-06-14



Hardware and Software, Engineered to Work Together