Commons JXPath
  1. Commons JXPath
  2. JXPATH-20

[jxpath] JXPathContext.removeAll() doesn't remove all (just one)

    Details

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

      Operating System: other
      Platform: Other

      Description

      JXPathContext.removeAll() doesn't remove all items for a Collection path supplied.

      TestCase to reproduce:

      public void testRemoveAllFromCollection() {
      final Map map = new HashMap();
      final Collection list = new ArrayList();
      for(int i = 0; i < 20; i++)

      { list.add("" + i); }

      map.put( "list", list);
      JXPathContext context = JXPathContext.newContext(null, map);
      context.removeAll( "list" );
      assertEquals("not all items removed", 0, list.size() );
      }

        Activity

        Hide
        Matt Benson added a comment -

        fixed in SVN HEAD. Thanks for the report.

        Show
        Matt Benson added a comment - fixed in SVN HEAD. Thanks for the report.

          People

          • Assignee:
            Unassigned
            Reporter:
            Giacomo Pati
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development