1. opensymphony
  2. xwork

Commits

rainerh  committed c565d37

XmlConfigurationProvider fails to parse result because Node.equals fails
o fixed for other node comparisons as well

Issue Number: XW-481
Submitted by: Ian Pojman

git-svn-id: http://svn.opensymphony.com/svn/xwork/branches/xwork_1-2@1366e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits dc27c8d
  • Branches xwork_1-2

Comments (0)

Files changed (1)

File src/java/com/opensymphony/xwork/config/providers/XmlConfigurationProvider.java

View file
         for (int i = 0; i < externalRefList.getLength(); i++) {
             Element refElement = (Element) externalRefList.item(i);
 
-            if (refElement.getParentNode().equals(element)) {
+            if (refElement.getParentNode().equals(element) || refElement.getParentNode().getNodeName().equals(element.getNodeName())) {
                 refName = refElement.getAttribute("name");
 
                 //If the external ref is not declared explicitly, we can introspect the
         for (int i = 0; i < interceptorRefList.getLength(); i++) {
             Element interceptorRefElement = (Element) interceptorRefList.item(i);
 
-            if (interceptorRefElement.getParentNode().equals(element)) {
+            if (interceptorRefElement.getParentNode().equals(element) || interceptorRefElement.getParentNode().getNodeName().equals(element.getNodeName())) {
                 List interceptors = lookupInterceptorReference(context, interceptorRefElement);
                 interceptorList.addAll(interceptors);
             }
         for (int i = 0; i < resultEls.getLength(); i++) {
             Element resultElement = (Element) resultEls.item(i);
 
-            if (resultElement.getParentNode().equals(element)) {
+            if (resultElement.getParentNode().equals(element) || resultElement.getParentNode().getNodeName().equals(element.getNodeName())) {
                 String resultName = resultElement.getAttribute("name");
                 String resultType = resultElement.getAttribute("type");
 
         for (int i = 0; i < exceptionMappingEls.getLength(); i++) {
             Element ehElement = (Element) exceptionMappingEls.item(i);
 
-            if (ehElement.getParentNode().equals(element)) {
+            if (ehElement.getParentNode().equals(element) || ehElement.getParentNode().getNodeName().equals(element.getNodeName())) {
                 String emName = ehElement.getAttribute("name");
                 String exceptionClassName = ehElement.getAttribute("exception");
                 String exceptionResult = ehElement.getAttribute("result");