Browse Source

FailFast adjustments

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278499 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 20 years ago
parent
commit
19d970dbd3
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/main/org/apache/tools/ant/types/resources/Restrict.java

+ 4
- 1
src/main/org/apache/tools/ant/types/resources/Restrict.java View File

@@ -88,6 +88,9 @@ outer: for (Iterator ri = w.getResourceCollection().iterator(); ri.hasNext(
* @param s the ResourceSelector to add. * @param s the ResourceSelector to add.
*/ */
public synchronized void add(ResourceSelector s) { public synchronized void add(ResourceSelector s) {
if (s == null) {
return;
}
super.add(s); super.add(s);
FailFast.invalidate(this); FailFast.invalidate(this);
} }
@@ -101,7 +104,7 @@ outer: for (Iterator ri = w.getResourceCollection().iterator(); ri.hasNext(
return ((Restrict) getCheckedRef()).iterator(); return ((Restrict) getCheckedRef()).iterator();
} }
dieOnCircularReference(); dieOnCircularReference();
return new FailFast(this, w.iterator());
return w.iterator();
} }


/** /**


Loading…
Cancel
Save