JDK-4253490 : kestrel I fails: api/java_text/SimpleDateFormat/index.html#Parse
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 1.3.0,1.3.1
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,linux,solaris_2.5,solaris_7
  • CPU: generic,x86,sparc
  • Submitted: 1999-07-13
  • Updated: 1999-09-27
  • Resolved: 1999-09-27
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.3.0 kestrelFixed
Related Reports
Duplicate :  
Duplicate :  
Description
tao.zhang@eng 1999-06-29

In order to reproduce this bug, please run the attached shell script file. 
Please keep this file for future reference.
Test case can be found in:
/net/tapas/export1/testexec/JCK-122a/tests/api/java_text/SimpleDateFormat
JDK version: Kestrel I
JCK version: 1.2.2

Test:api/java_text/SimpleDateFormat/index.html#Parse

Output from the jtr file:
#Test Results
#Wed Jun 23 17:12:26 PDT 1999
description=file:/net/tapas/export1/testexec/JCK-122a/tests/api/java_text/SimpleDateFormat/index.html#Parse
testsuite=/net/tapas/export1/testexec/JCK-122a/tests
execStatus=Failed. tests: 28; passed: 27; failed: 1; first test case failure: SimpleDateFormat0122
end=Wed Jun 23 17:12:26 PDT 1999
work=/export0/results/13i/i3pupkin122anative/api/java_text/SimpleDateFormat
executeClass=javasoft.sqe.tests.api.java.text.SimpleDateFormat.ParseTests
status=Failed. tests: 28; passed: 27; failed: 1; first test case failure: SimpleDateFormat0122
keywords=positive runtime text
start=Wed Jun 23 17:12:21 PDT 1999
title=SimpleDateFormat Parse method tests
javatestVersion=JT_2.0_zn
id=Parse
file=/net/tapas/export1/testexec/JCK-122a/tests/api/java_text/SimpleDateFormat/index.html
sections=testExecute testExecute
environment=jck-runtime-solaris
source=ParseTests.java

test: api/java_text/SimpleDateFormat/index.html#Parse
script: javasoft.sqe.javatest.lib.JCKScript -runtime
Executing test class...
command: javasoft.sqe.javatest.lib.ExecJCKTestOtherJVMCmd CLASSPATH=/export0/results/13i/i3pupkin122anative/classes:/net/tapas/export1/testexec/JCK-122a/tests/../classes:/net/tapas/export1/testexec/JCK-122a/javatest.jar:/net/tapas/export0/jdk13i/solaris/lib/tools.jar:/net/tapas/export0/jdk13i/solaris/jre/lib/rt.jar:/net/tapas/export0/jdk13i/solaris/jre/lib/i18n.jar DISPLAY=pupkin:0.0 HOME=/home/smitha LD_LIBRARY_PATH=/net/tapas/export1/testexec/JCK-122a/tests/../lib:/net/tapas/export1/testexec/JCK-122a/tests/../lib_solaris: /net/tapas/export0/jdk13i/solaris/bin/java -native -Xfuture javasoft.sqe.tests.api.java.text.SimpleDateFormat.ParseTests
----------ref:testExecute(8/256)----------
method parse(String, ParsePosition) should set MILLISECOND field to 1
  it sets this field to 100
  String:  "1"
  pattern: "S"
method parse(String, ParsePosition) should set MILLISECOND field to 2
  it sets this field to 200
  String:  "2"
  pattern: "S"
----------log:testExecute(29/1119)----------
SimpleDateFormat0105: Passed. OKAY
SimpleDateFormat0106: Passed. OKAY
SimpleDateFormat0107: Passed. OKAY
SimpleDateFormat0108: Passed. OKAY
SimpleDateFormat0109: Passed. OKAY
SimpleDateFormat0110: Passed. OKAY
SimpleDateFormat0111: Passed. OKAY
SimpleDateFormat0112: Passed. OKAY
SimpleDateFormat0113: Passed. OKAY
SimpleDateFormat0114: Passed. OKAY
SimpleDateFormat0115: Passed. OKAY
SimpleDateFormat0116: Passed. OKAY
SimpleDateFormat0117: Passed. OKAY
SimpleDateFormat0118: Passed. OKAY
SimpleDateFormat0119: Passed. OKAY
SimpleDateFormat0120: Passed. OKAY
SimpleDateFormat0121: Passed. OKAY
SimpleDateFormat0122: Failed. public Date parse(String text, ParsePosition pp)
SimpleDateFormat0123: Passed. OKAY
SimpleDateFormat0124: Passed. OKAY
SimpleDateFormat0125: Passed. OKAY
SimpleDateFormat0126: Passed. OKAY
SimpleDateFormat0127: Passed. OKAY
SimpleDateFormat0128: Passed. OKAY
SimpleDateFormat0129: Passed. OKAY
SimpleDateFormat0130: Passed. OKAY
SimpleDateFormat0131: Passed. OKAY
SimpleDateFormat0132: Passed. OKAY
STATUS:Failed. tests: 28; passed: 27; failed: 1; first test case failure: SimpleDateFormat0122
command result: Failed. tests: 28; passed: 27; failed: 1; first test case failure: SimpleDateFormat0122
test result: Failed. tests: 28; passed: 27; failed: 1; first test case failure: SimpleDateFormat0122

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: kestrel FIXED IN: kestrel INTEGRATED IN: kestrel
14-06-2004

PUBLIC COMMENTS Kestrel Beta, SimpleDateFormat.parse("s") parsed "1" as 100 millisecs by changes introduced at beta development. The change has been backed out and now works as specification.
10-06-2004

EVALUATION This is a real bug in the millisecond handling in which the parse method of the SimpleDateFormat returns "100" when the string being read is "1" and the parse pattern is S. stuart.gill@eng 1999-07-12 This is due to the fix from #4148168. "1" on pattern "S" is now parsed as 100ms. See the evaluation of #4148168 for detail. We need further investigation on referred spec there, whether old or new JDK do right thing. koushi.takahashi@japan 1999-09-02 We are going to backout the speical "S" handling case, that was introduced by 4148168. koushi.takahashi@japan 1999-09-14
02-09-1999