You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Michele Vivoda (JIRA)" <ji...@apache.org> on 2007/12/10 01:43:43 UTC

[jira] Created: (JXPATH-105) BasicNodeSet.getNodes() returns values instead of nodes ?

BasicNodeSet.getNodes() returns values instead of nodes ?
---------------------------------------------------------

                 Key: JXPATH-105
                 URL: https://issues.apache.org/jira/browse/JXPATH-105
             Project: Commons JXPath
          Issue Type: Bug
    Affects Versions: Nightly Builds
         Environment: ALL
            Reporter: Michele Vivoda
            Priority: Minor


In BasicNodeSet the method getNodes()  
adds the values instead of the nodes, using  

nodes.add(pointer.getValue()); 

instead of  what I think correct:

nodes.add(pointer.getNode());

Michele Vivoda
           

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JXPATH-105) BasicNodeSet.getNodes() returns values instead of nodes ?

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JXPATH-105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Benson resolved JXPATH-105.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3

Added test rev 604239

> BasicNodeSet.getNodes() returns values instead of nodes ?
> ---------------------------------------------------------
>
>                 Key: JXPATH-105
>                 URL: https://issues.apache.org/jira/browse/JXPATH-105
>             Project: Commons JXPath
>          Issue Type: Bug
>    Affects Versions: Nightly Builds
>         Environment: ALL
>            Reporter: Michele Vivoda
>            Priority: Minor
>             Fix For: 1.3
>
>
> In BasicNodeSet the method getNodes()  
> adds the values instead of the nodes, using  
> nodes.add(pointer.getValue()); 
> instead of  what I think correct:
> nodes.add(pointer.getNode());
> Michele Vivoda
>            

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JXPATH-105) BasicNodeSet.getNodes() returns values instead of nodes ?

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JXPATH-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550999 ] 

Matt Benson commented on JXPATH-105:
------------------------------------

I have committed this fix but still need to add a test to demonstrate the difference.  The only place in JXPath where the node and value are not the same is in XML models.

> BasicNodeSet.getNodes() returns values instead of nodes ?
> ---------------------------------------------------------
>
>                 Key: JXPATH-105
>                 URL: https://issues.apache.org/jira/browse/JXPATH-105
>             Project: Commons JXPath
>          Issue Type: Bug
>    Affects Versions: Nightly Builds
>         Environment: ALL
>            Reporter: Michele Vivoda
>            Priority: Minor
>
> In BasicNodeSet the method getNodes()  
> adds the values instead of the nodes, using  
> nodes.add(pointer.getValue()); 
> instead of  what I think correct:
> nodes.add(pointer.getNode());
> Michele Vivoda
>            

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JXPATH-105) BasicNodeSet.getNodes() returns values instead of nodes ?

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JXPATH-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549878 ] 

Matt Benson commented on JXPATH-105:
------------------------------------

Do you have any code that triggers bad behavior attributable to this possible problem?

> BasicNodeSet.getNodes() returns values instead of nodes ?
> ---------------------------------------------------------
>
>                 Key: JXPATH-105
>                 URL: https://issues.apache.org/jira/browse/JXPATH-105
>             Project: Commons JXPath
>          Issue Type: Bug
>    Affects Versions: Nightly Builds
>         Environment: ALL
>            Reporter: Michele Vivoda
>            Priority: Minor
>
> In BasicNodeSet the method getNodes()  
> adds the values instead of the nodes, using  
> nodes.add(pointer.getValue()); 
> instead of  what I think correct:
> nodes.add(pointer.getNode());
> Michele Vivoda
>            

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JXPATH-105) BasicNodeSet.getNodes() returns values instead of nodes ?

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JXPATH-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550188 ] 

Matt Benson commented on JXPATH-105:
------------------------------------

No, actually I think you're probably correct, but this code, though part of the API, seems to be virtually unexercised, so I have to create a testcase for BasicNodeSet and go from there.  Thanks!

> BasicNodeSet.getNodes() returns values instead of nodes ?
> ---------------------------------------------------------
>
>                 Key: JXPATH-105
>                 URL: https://issues.apache.org/jira/browse/JXPATH-105
>             Project: Commons JXPath
>          Issue Type: Bug
>    Affects Versions: Nightly Builds
>         Environment: ALL
>            Reporter: Michele Vivoda
>            Priority: Minor
>
> In BasicNodeSet the method getNodes()  
> adds the values instead of the nodes, using  
> nodes.add(pointer.getValue()); 
> instead of  what I think correct:
> nodes.add(pointer.getNode());
> Michele Vivoda
>            

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JXPATH-105) BasicNodeSet.getNodes() returns values instead of nodes ?

Posted by "Michele Vivoda (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JXPATH-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550180 ] 

Michele Vivoda commented on JXPATH-105:
---------------------------------------

No, I just went through the code and saw it as a possible bug. From the documentation one would expect the method to return nodes and not values. I think also that the private member {nodes} would be just a duplicate of {values} with the current code. If this is ok, getNodes()  could return getValues() to be more clear. 

> BasicNodeSet.getNodes() returns values instead of nodes ?
> ---------------------------------------------------------
>
>                 Key: JXPATH-105
>                 URL: https://issues.apache.org/jira/browse/JXPATH-105
>             Project: Commons JXPath
>          Issue Type: Bug
>    Affects Versions: Nightly Builds
>         Environment: ALL
>            Reporter: Michele Vivoda
>            Priority: Minor
>
> In BasicNodeSet the method getNodes()  
> adds the values instead of the nodes, using  
> nodes.add(pointer.getValue()); 
> instead of  what I think correct:
> nodes.add(pointer.getNode());
> Michele Vivoda
>            

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.