ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r377166 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ImportTask.java
Date Sun, 12 Feb 2006 12:33:13 GMT
Author: jkf
Date: Sun Feb 12 04:33:13 2006
New Revision: 377166

URL: http://svn.apache.org/viewcvs?rev=377166&view=rev
Log:
PR 38622: project helper reference may not have been set.

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ImportTask.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ImportTask.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ImportTask.java?rev=377166&r1=377165&r2=377166&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ImportTask.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ImportTask.java Sun Feb 12 04:33:13
2006
@@ -93,6 +93,12 @@
         ProjectHelper helper =
                 (ProjectHelper) getProject().
                     getReference(ProjectHelper.PROJECTHELPER_REFERENCE);
+        
+        if (helper == null) {
+            // this happens if the projecthelper was not registered with the project.
+            throw new BuildException("import requires support in ProjectHelper");
+        }
+        
         Vector importStack = helper.getImportStack();
 
         if (importStack.size() == 0) {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message