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

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

    Details

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

      Operating System: other
      Platform: Other

    • Bugzilla Id:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: