Uploaded image for project: 'ServiceMix'
  1. ServiceMix
  2. SM-579

Setters on JaxenXPathExpression have no effect on the underlying DOMXPath object

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 3.0-M2
    • None
    • servicemix-core
    • None
    • Not relevant

    Description

      The setter methods of JaxenXPathExpression (for fields other than the xpathObject)
      only set the private field of the JaxenXPathExpression. The new values are not
      propagated to the xpathObject and therefore have no effect.

      The method "afterPropertiesSet()" probably was initially designed for this purpose,
      but it is only called in the constructor. Besides that, this method would have no
      effect if called in the setter methods, because it does nothing if the xpathObject
      is not null (i.e. after the first call).

      The bug was found in the following use case:

      Namespace prefixes in an XPath expression within a <jbi:condition> element in
      a drools rule are not recognized when the expression is evaluated.

      This should work, since the JaxenConditionFactory correctly sets the namespace
      context in the JaxenXPathExpression object. But because of the bug, the
      namespace context in the DOMXPath object is not set.

      Attachments

        Activity

          People

            gnodet Guillaume Nodet
            hstuder Horst Studer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified