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 2011/04/12 05:29:05 UTC

[jira] [Updated] (JXPATH-148) false and false returns true

     [ https://issues.apache.org/jira/browse/JXPATH-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michele Vivoda updated JXPATH-148:
----------------------------------

    Attachment: Issue148Test.java

Bug looks real, and to me it looks strange that has never been found before. I attach a test case to prove the problem, if someone could verify it would be nice, if any committer reads this, the test might be inserted in the test sources if proved the error is real.
I am currently looking at the problem, getting some results around the InfoSetUtil#booleanValue() method that uses *only* NodePointer#isActual() to determine the boolean value of a NodePointer, this looks like the cause of the problem, but I must still do some tests. 

> false and false returns true
> ----------------------------
>
>                 Key: JXPATH-148
>                 URL: https://issues.apache.org/jira/browse/JXPATH-148
>             Project: Commons JXPath
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: WindowsXP
>            Reporter: Johannes Stelzer
>            Priority: Blocker
>         Attachments: Issue148Test.java
>
>
> Map<String, Object> map = new HashMap<String, Object>();
> map.put("h", false);
> JXPathContext c = JXPathContext.newContext(map);
> System.out.println(c.getValue("h  and h "));
> Prints: true !!! it should print false!
> System.out.println(c.getValue("h = true() and h = true()")); although prints correctly: false

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira