JDK-5026610 : TEST_BUG: test java/nio/charset/coders/IsSupported.java fails,1.4.2_05b01
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio.charsets
  • Affected Version: 1.4.2_05
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-04-05
  • Updated: 2004-05-20
  • Resolved: 2004-05-10
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_05 05Fixed
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
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

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

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