From 0ee5d2c875deac7cabf8056e86c92113d6cb1bf4 Mon Sep 17 00:00:00 2001 From: Matthew Jason Benson Date: Tue, 23 May 2006 23:01:50 +0000 Subject: [PATCH] guard against NPE, bugzilla 39648 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@409022 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/types/resources/Resources.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/org/apache/tools/ant/types/resources/Resources.java b/src/main/org/apache/tools/ant/types/resources/Resources.java index c0f4bbcb8..3a0f7de3d 100755 --- a/src/main/org/apache/tools/ant/types/resources/Resources.java +++ b/src/main/org/apache/tools/ant/types/resources/Resources.java @@ -1,5 +1,5 @@ /* - * Copyright 2005 The Apache Software Foundation + * Copyright 2005-2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -207,7 +207,7 @@ public class Resources extends DataType implements ResourceCollection { if (isReference()) { return getCheckedRef().toString(); } - if (coll.size() == 0) { + if (coll == null || coll.isEmpty()) { return ""; } StringBuffer sb = new StringBuffer();