You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by mb...@apache.org on 2006/09/14 19:15:55 UTC
svn commit: r443418 -
/ant/core/trunk/src/main/org/apache/tools/ant/util/IdentityStack.java
Author: mbenson
Date: Thu Sep 14 10:15:54 2006
New Revision: 443418
URL: http://svn.apache.org/viewvc?view=rev&rev=443418
Log:
ignore passed-in Stack in factory method if null
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/util/IdentityStack.java
Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/IdentityStack.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/IdentityStack.java?view=diff&rev=443418&r1=443417&r2=443418
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/IdentityStack.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/IdentityStack.java Thu Sep 14 10:15:54 2006
@@ -27,7 +27,7 @@
/**
* Get an IdentityStack containing the contents of the specified Stack.
- * @param s the Stack to copy.
+ * @param s the Stack to copy; ignored if null.
* @return an IdentityStack instance.
*/
public static IdentityStack getInstance(Stack s) {
@@ -35,7 +35,9 @@
return (IdentityStack) s;
}
IdentityStack result = new IdentityStack();
- result.addAll(s);
+ if (s != null) {
+ result.addAll(s);
+ }
return result;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org