[jira] [Commented] (JXPATH-187) Possible endless loop in Namespace Resolving

2015-12-09 Thread Stefan Albrecht (JIRA)

[ 
https://issues.apache.org/jira/browse/JXPATH-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15048388#comment-15048388
 ] 

Stefan Albrecht commented on JXPATH-187:


Oh, yes. I did not check the trunk, but just the released 1.3 version. On trunk 
it is fixed, so this is a duplicate of JXPATH-140

> Possible endless loop in Namespace Resolving
> 
>
> Key: JXPATH-187
> URL: https://issues.apache.org/jira/browse/JXPATH-187
> Project: Commons JXPath
>  Issue Type: Bug
>Affects Versions: 1.3
>Reporter: Stefan Albrecht
> Attachments: patch.junit.tgz, patch.txt
>
>
> When dealing with XML documents - org.w3c.dom - and when having a hierarchy 
> of relative contexts, then, when trying to resolve the namespace prefix for 
> some namespace uri, an endless loop is triggered.
> This happens if
> * the namespace is not programatically registered with JXPathContext
> * the context used to resolve the namespace
> ** has a parent context
> ** and neither the context nor the parent have the namespace defined within 
> the document
> I attached a patch for org/apache/commons/jxpath/ri/NamespaceResolver.java
> as well as a tar ball with a junit test and test files



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (JXPATH-187) Possible endless loop in Namespace Resolving

2015-12-08 Thread Michele Vivoda (JIRA)

[ 
https://issues.apache.org/jira/browse/JXPATH-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15047117#comment-15047117
 ] 

Michele Vivoda commented on JXPATH-187:
---

Hi, this to me looks already fixed by JXPATH-140, your tests passed on my 
machine, without the patch.

 
https://github.com/apache/commons-jxpath/blob/trunk/src/main/java/org/apache/commons/jxpath/ri/NamespaceResolver.java#L66

Please try the current trunk (that has many other bug fix) downloading the 
source from github https://github.com/apache/commons-jxpath



> Possible endless loop in Namespace Resolving
> 
>
> Key: JXPATH-187
> URL: https://issues.apache.org/jira/browse/JXPATH-187
> Project: Commons JXPath
>  Issue Type: Bug
>Affects Versions: 1.3
>Reporter: Stefan Albrecht
> Attachments: patch.junit.tgz, patch.txt
>
>
> When dealing with XML documents - org.w3c.dom - and when having a hierarchy 
> of relative contexts, then, when trying to resolve the namespace prefix for 
> some namespace uri, an endless loop is triggered.
> This happens if
> * the namespace is not programatically registered with JXPathContext
> * the context used to resolve the namespace
> ** has a parent context
> ** and neither the context nor the parent have the namespace defined within 
> the document
> I attached a patch for org/apache/commons/jxpath/ri/NamespaceResolver.java
> as well as a tar ball with a junit test and test files



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)