Browse Source

tiny performance tweak

master
Stefan Bodewig 7 years ago
parent
commit
c053271df8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/main/org/apache/tools/ant/types/resources/AllButFirst.java

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

@@ -42,7 +42,7 @@ public class AllButFirst extends SizeLimitCollection {

@Override
public synchronized int size() {
return (int) getResourceCollection().stream().skip(getValidCount()).count();
return Math.max(getResourceCollection().size() - getValidCount(), 0);
}

}

Loading…
Cancel
Save