JDK-6317072 : REGR: 4 tests from api/java_text/DateFormat/ and api/java_text/SimpleDateFormat/ fails with -esa key
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-08-29
  • Updated: 2012-03-23
  • Resolved: 2005-09-12
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.
JDK 6
6 b52Fixed
Related Reports
Relates :  
Description
REGRESSION:

OS: Solaris9 (sparc), linux(i586) 
JAVA: 6.0 b48, b49 FAILS,  b47 PASS
Options: -esa
JCK: 6.0 b06

4 tests failed:

api/java_text/DateFormat/index.html#GetInstance[DateFormat0031]
api/java_text/DateFormat/index.html#GetInstance[DateFormat0034]
api/java_text/DateFormat/index.html#GetInstance[DateFormat0037]
api/java_text/SimpleDateFormat/index.html#Ctor[SimpleDateFormat0008]

java source of SimpleDateFormat:
	......
	private void initializeCalendar(Locale loc) {
		if (calendar == null) {
			assert loc != null;
	......

When system assertions is enabled (-enablesystemassertions) and locale (loc) is null method should throw NullPointer or Illegal argument exception (according to JCK test expectation, API spec doesnt specify exception), but java.lang.AssertionError exception is thrown.

Comments
EVALUATION The assertion in question was introduced due to the fix for 4833268. Null argument check at the beginning of the method call and clarification of the javadoc is needed.
29-08-2005