[
https://issues.apache.org/jira/browse/WODEN-137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512422
]
John Kaputin commented on WODEN-137:
------------------------------------
Background:
According to the Java 5 javadoc for the QName class, the prefix field must be
non-null. It must be specified on the 3 arg ctor and it should default to the
empty space "" when using the 2 arg or 1 arg ctors. However, when a serialized
QName object is deserialized the namespace, local name and prefix fields are
set from the values in the serialized object. Before Java 5 the QName class
did not have the prefix field. If an older (pre-Java 5) serialized QName object
is deserialized by Java 5, the deserialization should detect that there is no
prefix value and initialize the prefix field to the empty string.
The Woden QName class does this by overriding the readObject method to check
the deserialized object for a null prefix and set it to the empty string. The
IBM Java 5 JRE also initializes the prefix to empty string when deserializing
an older (pre-Java5) QName object. However, the Sun 1.5.0 JRE does not - it
leaves the prefix field in the deserialized object as null, which contradicts
non-null invariant implied by Sun's QName javadoc.
Our attempts to get this fixed in the Sun JRE have been unsuccessful. So
instead, we will extract the test method in question ,
QNameTest.testGoodDeserializeQNameWithoutPrefix(), into a separate test class
called QNameDeserializeTest and exclude this from the Maven continuum build.
That way the remaining QName tests can be included with the Maven build (which
runs at Apache on Solaris using the Sun Java JRE) without the deserialize
testcase breaking the build. The new test class can be included with the Woden
Junit test suite when perform regression testing separately to the Maven build.
> QNameTest.testGoodDeserializeQNameWithoutPrefix fails for Sun 1.5.0_07->_11
> JREs
> --------------------------------------------------------------------------------
>
> Key: WODEN-137
> URL: https://issues.apache.org/jira/browse/WODEN-137
> Project: Woden
> Issue Type: Bug
> Affects Versions: M7
> Environment: Sun 1.5.0_07, 1.5.0_09 JRE or 1.5.0_11 JRE.
> Reporter: Jeremy Hughes
> Assignee: John Kaputin
> Fix For: M8
>
>
> A v1.0 QName serialized object when deserialized into the QName
> implementation in the Sun JRE results in a QName with a null 'prefix' value.
> According to the javadoc for QName this shouldn't be allowed. This is a bug
> with the Sun JRE, just reporting it here to track the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]