Uploaded image for project: 'Commons JXPath'
  1. Commons JXPath
  2. JXPATH-31

Problem with Pointer asPath method using dynamic beans

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.0 Final
    • None
    • None
    • Operating System: All
      Platform: All

    • 9482

    Description

      Hi,

      I noticed a strange behaviour of asPath, when I use dynamic beans (with
      DynamicPropertyHandler).

      Considering a dynamic property "properties", which contains a Vector with 5
      Objects (Strings in my case), using iteratePointers (works now ) returns a
      strange path using the asPath method on the returned pointers:

      [@name='properties'][1]
      [@name='properties'][2]
      [@name='properties'][3]
      [@name='properties'][4]
      [@name='properties'][5]

      This path leads (of course) to an error, when I invoke the context.getValue
      method with it. I attached a testcase.

      Also I noticed, that in some cases im my application the "index" begins with 2
      instead of 1. But I could not reproduce this in a simple testcase. It looks like
      this:

      [@name='properties'][2]
      [@name='properties'][3]
      [@name='properties'][4]
      [@name='properties'][5]

      Perhaps you'll face this behaviour too.

      Thanx
      Markus

      Attachments

        Activity

          People

            Unassigned Unassigned
            mm@teraspect.de Markus Menner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: