Commons JXPath
  1. Commons JXPath
  2. JXPATH-123

Regression: "fix" made to NamespaceResolver broke existing testcases

    Details

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

      Description

      Relatively shortly after introducing NamespaceResolver, Dmitri had changed it to wipe out the reverse mapping cache every time a new mapping was added. The tests, however, relied upon the last added mapping to a given namespace being the preferred prefix. The description for his change was that he was fixing a "bug", but since he didn't elaborate on what kind of bug I can't see how maintaining the cache is any more harmful than not maintaining it, and reverting this change clears up the test failures that for some reason are only seen on JDK 1.3.

        Activity

        Hide
        Matt Benson added a comment -

        To follow up, it seems that my approach of maintaining the reverseMap on an ongoing basis accomplishes what Dmitri was trying to do before--make sure the last registered prefix is returned for a given URI during reverse lookup.

        Show
        Matt Benson added a comment - To follow up, it seems that my approach of maintaining the reverseMap on an ongoing basis accomplishes what Dmitri was trying to do before--make sure the last registered prefix is returned for a given URI during reverse lookup.
        Matt Benson made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Matt Benson added a comment -

        svn rev 666910

        Show
        Matt Benson added a comment - svn rev 666910
        Matt Benson created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Matt Benson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development