ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r713007 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ImportTask.java
Date Tue, 11 Nov 2008 09:50:51 GMT
Author: bodewig
Date: Tue Nov 11 01:50:51 2008
New Revision: 713007

URL: http://svn.apache.org/viewvc?rev=713007&view=rev
Log:
deal with nested invokations

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/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ImportTask.java?rev=713007&r1=713006&r2=713007&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 Tue Nov 11 01:50:51
2008
@@ -152,6 +152,9 @@
             return;
         }
 
+        // nested invokations are possible like an imported file
+        // importing another one
+        String oldPrefix = ProjectHelper.getCurrentTargetPrefix();
         try {
             ProjectHelper.setCurrentTargetPrefix(targetPrefix);
             helper.parse(getProject(), importedFile);
@@ -159,8 +162,7 @@
             throw ProjectHelper.addLocationToBuildException(
                 ex, getLocation());
         } finally {
-            ProjectHelper.setCurrentTargetPrefix(null);
+            ProjectHelper.setCurrentTargetPrefix(oldPrefix);
         }
     }
-
 }



Mime
View raw message