JDK-4402765 : (cs) api/java_lang/String/i18n.html#i18nCtorEncodings, Merlin, Sparc, B46
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 1.4.0
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: x86,sparc
  • Submitted: 2001-01-08
  • Updated: 2001-07-19
  • Resolved: 2001-07-19
Related Reports
Duplicate :  
Description
The following test failed on merlin build 46 and passed on build 44. 

Failing Test:
=============

api/java_lang/String/i18n.html#i18nCtorEncodings

Test source location:
=====================

/net/jdk/export/disk8/local.java/jck1.3/JCK-runtime-13fcs/tests/api/java_lang/String/i18nCtorEncodingsTests.java

Platforms:
=============
Failed only on sparc 5.7 and passed on x86 5.6. 
Haven't checked on other OSs.

JDK, switches Info:
===================
jdk1.4.0/bin/java -version
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b46)
Java HotSpot(TM) Client VM (build 1.4beta-B45, mixed mode)

Failed for -client.

jtr file location:
==================

file:/net/jtg-s117/export/home/jtg-test/JH_jdk14_b46_jck13/workDir/api/java_lang/String/index_i18nCtorEncodingsTests.jtr

(This jtr file is also in the attachment.)

How to reproduce:
=================
Run the attached script:

1) Stringi18nCtorEncodings.ksh


ERROR MESSAGE:
==============
----------log:(31/1286)----------
String2200: Passed. OKAY
String2201: Passed. OKAY
String2202: Passed. OKAY
String2203: Passed. OKAY
String2204: Passed. OKAY
String2205: Passed. OKAY
String2206: Passed. OKAY
String2207: Passed. OKAY
String2208: Passed. OKAY
String2209: Passed. OKAY
String2210: Passed. OKAY
java.lang.StringIndexOutOfBoundsException: String index out of range: 9
        at java.lang.String.checkBounds(String.java:300)
        at java.lang.String.<init>(String.java:362)
        at javasoft.sqe.tests.api.java.lang.String.i18nCtorEncodingsTests.String2211(i18nCtorEncodingsTests.java:423)
        at java.lang.reflect.Method.invoke(Native Method)
        at javasoft.sqe.jck.lib.MultiTest.runTests(MultiTest.java:139)
        at javasoft.sqe.jck.lib.MultiTest.run(MultiTest.java:101)
        at javasoft.sqe.tests.api.java.lang.String.i18nCtorEncodingsTests.main(i18nCtorEncodingsTests.java:35)
String2211: Failed. Test case throws exception: java.lang.StringIndexOutOfBoundsException: String index out of range: 9
String2212: Passed. OKAY
String2213: Passed. OKAY
String2214: Passed. OKAY
String2215: Passed. OKAY
String2216: Passed. OKAY
String2217: Passed. OKAY
String2218: Passed. OKAY
String2219: Passed. OKAY
String2220: Passed. OKAY
String2221: Passed. OKAY
STATUS:Failed. tests: 22; passed: 21; failed: 1; first test case failure: String2211
result: Failed. tests: 22; passed: 21; failed: 1; first test case failure: String2211


System Info:
============

SPARC:
-------
jtg-s117% uname -a
SunOS jtg-s117 5.7 Generic_106541-12 sun4u sparc SUNW,Ultra-60
jtg-s117% psrinfo -v
Status of processor 0 as of: 12/21/00 16:16:07
  Processor has been on-line since 12/20/00 10:44:13.
  The sparcv9 processor operates at 296 MHz,
        and has a sparcv9 floating point processor.
Status of processor 2 as of: 12/21/00 16:16:07
  Processor has been on-line since 12/20/00 10:44:14.
  The sparcv9 processor operates at 296 MHz,
        and has a sparcv9 floating point processor.


Additional JCK related info:
============================
URL to find JCK test owners: http://javaweb.eng/jck/usr/owners.jto




srilakshmi.chappidi@Eng 2001-01-08

Comments
EVALUATION This is a duplicate of bug 4457851. The problem described by that bug is that java.nio.charset.CharsetEncoding skips characters when substitution is required for an unmapped character. In this test, String(byte bytes[], int offset, int length) is throws an exception because the passed byte array byte[] byte = "str\u00EA\u00FF\u00DD\u00BF\u00C1\u00A0".getBytes(); contains six unmapped characters (three of which are skipped). The test calls String(byte, 0, 9), where 9 is the number of bytes to decode. Because there is an insufficient number of bytes available, the test fails. Information about this jck failure has been included in 4457851. iris.garcia@eng 2001-07-19
19-07-2001