Browse Source

#53622: faster VectorSet.retainAll.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1367741 13f79535-47bb-0310-9956-ffa450edef68
master
Jesse N. Glick 13 years ago
parent
commit
439545ad27
2 changed files with 7 additions and 0 deletions
  1. +3
    -0
      WHATSNEW
  2. +4
    -0
      src/main/org/apache/tools/ant/util/VectorSet.java

+ 3
- 0
WHATSNEW View File

@@ -17,6 +17,9 @@ Changes that could break older environments:
Fixed bugs:
-----------

* Made VectorSet faster.
Bugzilla Report 53622.

* Incorrect URLs in Ant child POMs.
Bugzilla Report 53617.



+ 4
- 0
src/main/org/apache/tools/ant/util/VectorSet.java View File

@@ -21,6 +21,7 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Set;
import java.util.Vector;

/**
@@ -191,6 +192,9 @@ public final class VectorSet extends Vector {
}

public synchronized boolean retainAll(Collection c) {
if (!(c instanceof Set)) {
c = new HashSet(c);
}
LinkedList l = new LinkedList();
for (Iterator i = iterator(); i.hasNext(); ) {
Object o = i.next();


Loading…
Cancel
Save