From 56c846c9acbd7af08723d1115e200761e2315f5c Mon Sep 17 00:00:00 2001 From: Matthew Jason Benson Date: Tue, 7 Aug 2007 22:17:43 +0000 Subject: [PATCH] remove constructor git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@563679 13f79535-47bb-0310-9956-ffa450edef68 --- .../tools/ant/taskdefs/PropertyHelperTask.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/PropertyHelperTask.java b/src/main/org/apache/tools/ant/taskdefs/PropertyHelperTask.java index 167217bb5..2f7df3b7b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/PropertyHelperTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/PropertyHelperTask.java @@ -71,17 +71,6 @@ public class PropertyHelperTask extends Task { private PropertyHelper propertyHelper; private List delegates; - /** - * Construct the PropertyHelperTask, which is useless without a Project instance. - * @param Project the associated Ant project instance. - */ - public PropertyHelperTask(Project project) { - if (project == null) { - throw new IllegalArgumentException(); - } - setProject(project); - } - /** * Add a new PropertyHelper to be set on the Project. * @param propertyHelper the PropertyHelper to set. @@ -116,6 +105,9 @@ public class PropertyHelperTask extends Task { * @throws BuildException on error. */ public void execute() throws BuildException { + if (getProject() == null) { + throw new BuildException("Project instance not set"); + } if (propertyHelper == null && delegates == null) { throw new BuildException("Either a new PropertyHelper" + " or one or more PropertyHelper delegates are required");