mbenson 2005/01/04 15:16:49
Modified: src/main/org/apache/tools/ant/types Tag: ANT_16_BRANCH
Description.java
Log:
Merge
Revision Changes Path
No revision
No revision
1.15.2.5 +7 -4 ant/src/main/org/apache/tools/ant/types/Description.java
Index: Description.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/Description.java,v
retrieving revision 1.15.2.4
retrieving revision 1.15.2.5
diff -u -r1.15.2.4 -r1.15.2.5
--- Description.java 9 Mar 2004 17:01:54 -0000 1.15.2.4
+++ Description.java 4 Jan 2005 23:16:49 -0000 1.15.2.5
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * Copyright 2001-2005 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.
@@ -65,7 +65,7 @@
}
/**
- * return the descriptions from all the targets of
+ * Return the descriptions from all the targets of
* a project.
*
* @param project the project to get the descriptions for.
@@ -73,8 +73,11 @@
* the targets.
*/
public static String getDescription(Project project) {
- StringBuffer description = new StringBuffer();
Vector targets = (Vector) project.getReference("ant.targets");
+ if (targets == null) {
+ return null;
+ }
+ StringBuffer description = new StringBuffer();
for (int i = 0; i < targets.size(); i++) {
Target t = (Target) targets.elementAt(i);
concatDescriptions(project, t, description);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]