Commits

Anonymous committed 4376b6b

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/2.0@1365e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits a857675
  • Branches 2.0, xwork_2_0_7

Comments (0)

Files changed (1)

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

         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 < 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");