org.codehaus.xfire.test.XPathAssert.assertXPathEquals() does not support
attributes
-----------------------------------------------------------------------------------
Key: XFIRE-921
URL: http://jira.codehaus.org/browse/XFIRE-921
Project: XFire
Issue Type: Bug
Components: Core
Affects Versions: 1.2.5
Reporter: Bryan Brouckaert
Assigned To: Dan Diephouse
Attachments: attribute.patch
When executing a statement like this:
{code}
assertXPathEquals("//s:Body/rdb:country/@id", "1", doc);
{code}
The following exception is thrown:
{code}
java.lang.ClassCastException: org.jdom.Attribute
at
org.codehaus.xfire.test.XPathAssert.assertXPathEquals(XPathAssert.java:112)
at
org.codehaus.xfire.test.AbstractXFireTest.assertXPathEquals(AbstractXFireTest.java:305)
...
{code}
This is because the resulting node is cast to {{org.jdom.Content}}, but
{{org.jdom.Attribute}} does not inherit from that class. I made a patch that
checks the type of the resulting node.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email