Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2 Final
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      The TestCases below fail in jxpath 1.2 RC1. Note that the locale on the JXPathContext is correctly set to
      Locale.US, but the tests find the default locale (of my computer) de_DE!

      Testcase: testFormatNumberFunction(org.apache.commons.jxpath.ri.compiler.CoreFunctionTest):
      FAILED
      Evaluating <format-number(123456789, '#.000000000')> expected:<123456789.000000000> but
      was:<123456789>
      junit.framework.AssertionFailedError: Evaluating <format-number(123456789, '#.000000000')>
      expected:<123456789.000000000> but was:<123456789>
      at org.apache.commons.jxpath.JXPathTestCase.assertXPathValue(JXPathTestCase.java:52)
      at
      org.apache.commons.jxpath.ri.compiler.CoreFunctionTest.testFormatNumberFunction(CoreFunctionTes
      t.java:153)

      Testcase: testAttributeLang(org.apache.commons.jxpath.ri.model.beans.BeanModelTest): FAILED
      Evaluating <@xml:lang> expected:<en-US> but was:<de-DE>
      junit.framework.AssertionFailedError: Evaluating <@xml:lang> expected:<en-US> but was:<de-DE>
      at org.apache.commons.jxpath.JXPathTestCase.assertXPathValue(JXPathTestCase.java:52)
      at
      org.apache.commons.jxpath.ri.model.BeanModelTestCase.testAttributeLang(BeanModelTestCase.java:
      605)

      Testcase: testLang(org.apache.commons.jxpath.ri.model.dom.DOMModelTest): Caused an ERROR
      No value for xpath: //product/price:sale[lang('en')]/saleEnds
      org.apache.commons.jxpath.JXPathException: No value for xpath: //product/price:sale[lang('en')]/
      saleEnds
      at
      org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.getValue(JXPathContextReferenceImpl.java:
      344)
      at
      org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.getValue(JXPathContextReferenceImpl.java:
      280)
      at org.apache.commons.jxpath.JXPathTestCase.assertXPathValue(JXPathTestCase.java:51)
      at org.apache.commons.jxpath.ri.model.XMLModelTestCase.testLang(XMLModelTestCase.java:698)

      Testcase: testAttributeLang(org.apache.commons.jxpath.ri.model.dynabeans.DynaBeanModelTest):
      FAILED
      Evaluating <@xml:lang> expected:<en-US> but was:<de-DE>
      junit.framework.AssertionFailedError: Evaluating <@xml:lang> expected:<en-US> but was:<de-DE>
      at org.apache.commons.jxpath.JXPathTestCase.assertXPathValue(JXPathTestCase.java:52)
      at
      org.apache.commons.jxpath.ri.model.BeanModelTestCase.testAttributeLang(BeanModelTestCase.java:
      604)

      Testcase: testLang(org.apache.commons.jxpath.ri.model.jdom.JDOMModelTest): Caused an ERROR
      No value for xpath: //product/price:sale[lang('en')]/saleEnds
      org.apache.commons.jxpath.JXPathException: No value for xpath: //product/price:sale[lang('en')]/
      saleEnds
      at
      org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.getValue(JXPathContextReferenceImpl.java:
      344)
      at
      org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.getValue(JXPathContextReferenceImpl.java:
      280)
      at org.apache.commons.jxpath.JXPathTestCase.assertXPathValue(JXPathTestCase.java:51)
      at org.apache.commons.jxpath.ri.model.XMLModelTestCase.testLang(XMLModelTestCase.java:698)

        Activity

        Simon Raess created issue -
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 30133 12341576
        Henri Yandell made changes -
        Project Commons [ 12310458 ] Commons JXPath [ 12310480 ]
        Key COM-1424 JXPATH-27
        Component/s JXPath [ 12311120 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Affects Version/s 1.2 Final [ 12311661 ]
        Henri Yandell made changes -
        Affects Version/s 1.2 Final [ 12311699 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Simon Raess
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development