-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
1.3
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2098638 | 5.0 | Jeff Suttor | P3 | Resolved | Fixed | b55 |
Name: erR10175 Date: 05/19/2004
The following method of the class javax.xml.datatype.Duration
public abstract QName getXMLSchemaType()
throws UnsupportedOperationException.
The javadoc of the method specifies only IllegalStateException which to be thrown if
the combination of set fields of the Duration instance does not match one of
the XML Schema date/time datatypes.
In the test (see below) the Duration instance corresponds to DatatypeConstants.DURATION,
so neither IllegalStateException nor UnsupportedOperationException is expected.
This bug affects new test in JCK 1.5
api/javax_xml/datatype/Duration/index.html#GetXMLSchemaType[GetXMLSchemaType001]
The bug is found in jdk1.5.0/beta/b51.
To reproduce the bug compile and run test.java as shown in the log below:
------------------------------------------ test.java
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.Duration;
public class test {
public static void main(String [] args) throws Exception {
DatatypeFactory df = DatatypeFactory.newInstance();
Duration d = df.newDuration("P1Y1M1DT1H1M1S");
System.out.println("Passed: " + d.getXMLSchemaType());
}
}
----------------------------------------------------
------------------------------------------------ log
$javac test.java && java -cp . -showversion test
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode)
Exception in thread "main" java.lang.UnsupportedOperationException: com.sun.org.apache.xerces.internal.jaxp.datatype.DurationImpl#getXMLSchemaType() not implemented.
at com.sun.org.apache.xerces.internal.jaxp.datatype.DurationImpl.getXMLSchemaType(DurationImpl.java:227)
at test.main(test.java:8)
----------------------------------------------------
======================================================================
The following method of the class javax.xml.datatype.Duration
public abstract QName getXMLSchemaType()
throws UnsupportedOperationException.
The javadoc of the method specifies only IllegalStateException which to be thrown if
the combination of set fields of the Duration instance does not match one of
the XML Schema date/time datatypes.
In the test (see below) the Duration instance corresponds to DatatypeConstants.DURATION,
so neither IllegalStateException nor UnsupportedOperationException is expected.
This bug affects new test in JCK 1.5
api/javax_xml/datatype/Duration/index.html#GetXMLSchemaType[GetXMLSchemaType001]
The bug is found in jdk1.5.0/beta/b51.
To reproduce the bug compile and run test.java as shown in the log below:
------------------------------------------ test.java
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.Duration;
public class test {
public static void main(String [] args) throws Exception {
DatatypeFactory df = DatatypeFactory.newInstance();
Duration d = df.newDuration("P1Y1M1DT1H1M1S");
System.out.println("Passed: " + d.getXMLSchemaType());
}
}
----------------------------------------------------
------------------------------------------------ log
$javac test.java && java -cp . -showversion test
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode)
Exception in thread "main" java.lang.UnsupportedOperationException: com.sun.org.apache.xerces.internal.jaxp.datatype.DurationImpl#getXMLSchemaType() not implemented.
at com.sun.org.apache.xerces.internal.jaxp.datatype.DurationImpl.getXMLSchemaType(DurationImpl.java:227)
at test.main(test.java:8)
----------------------------------------------------
======================================================================
- backported by
-
JDK-2098638 Duration.getXMLSchemaType throws UnsupportedOperationException
- Resolved
-
JDK-2098639 Duration.getXMLSchemaType throws UnsupportedOperationException
- Resolved