You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by gl...@ca.ibm.com on 2000/07/05 19:20:07 UTC

[PATCH] Trivial fix for Target.java




I noticed a trivial but irritating problem with the latest CVS extract.
During a verbose build the "Build sequence for target" message returned a
list of Target instance addresses, rather then the name of the Target.
This corrects the problem.  Just for reference, I'm working on an AIX 4.3.3
box with the IBM SDK 1.2.2, ptf 4.

Index: Target.java
===================================================================
RCS file:
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/Target.java,v
retrieving revision 1.5
diff -u -r1.5 Target.java
--- Target.java        2000/06/24 10:55:41        1.5
+++ Target.java        2000/07/05 17:05:41
@@ -112,6 +112,11 @@
        this.condition = (property == null) ? "" : property;
    }

+    public String toString() {
+        return name;
+    }
+
+
    public void execute() throws BuildException {
        if (("".equals(this.condition)) ||
(project.getProperty(this.condition) != null)) {
            Enumeration enum = tasks.elements();


Glenn McAllister
TID - Software Developer - VisualAge for Java
IBM Toronto Lab, (416) 448-3805
"An approximate answer to the right question is better than the
right answer to the wrong question." - John W. Tukey