You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2018/02/17 17:26:10 UTC
[5/6] ant git commit: frequency used to accept a null Collection
before Java8 refactoring
frequency used to accept a null Collection before Java8 refactoring
Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/4d0a7d5f
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/4d0a7d5f
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/4d0a7d5f
Branch: refs/heads/master
Commit: 4d0a7d5f26d031f91224cfe988db070891f12a30
Parents: 82f7d9b
Author: Stefan Bodewig <bo...@apache.org>
Authored: Sat Feb 17 17:03:41 2018 +0100
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Sat Feb 17 17:03:41 2018 +0100
----------------------------------------------------------------------
src/main/org/apache/tools/ant/util/CollectionUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant/blob/4d0a7d5f/src/main/org/apache/tools/ant/util/CollectionUtils.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/CollectionUtils.java b/src/main/org/apache/tools/ant/util/CollectionUtils.java
index 70b2810..2119a9e 100644
--- a/src/main/org/apache/tools/ant/util/CollectionUtils.java
+++ b/src/main/org/apache/tools/ant/util/CollectionUtils.java
@@ -252,7 +252,7 @@ public class CollectionUtils {
*/
@Deprecated
public static int frequency(Collection<?> c, Object o) {
- return Collections.frequency(c, o);
+ return c == null ? 0 : Collections.frequency(c, o);
}
private CollectionUtils() {