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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • Operating System: other
      Platform: Other

    • 37610

    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() );
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            giacomo@apache.org Giacomo Pati
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: