ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1519248 - in /ant/easyant/core/trunk/src/main/java/org/apache/easyant/core: EasyAntEngine.java EasyAntMain.java
Date Sun, 01 Sep 2013 08:38:11 GMT
Author: jlboudart
Date: Sun Sep  1 08:38:11 2013
New Revision: 1519248

URL: http://svn.apache.org/r1519248
Log:
A bit of refactoring

Modified:
    ant/easyant/core/trunk/src/main/java/org/apache/easyant/core/EasyAntEngine.java
    ant/easyant/core/trunk/src/main/java/org/apache/easyant/core/EasyAntMain.java

Modified: ant/easyant/core/trunk/src/main/java/org/apache/easyant/core/EasyAntEngine.java
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/main/java/org/apache/easyant/core/EasyAntEngine.java?rev=1519248&r1=1519247&r2=1519248&view=diff
==============================================================================
--- ant/easyant/core/trunk/src/main/java/org/apache/easyant/core/EasyAntEngine.java (original)
+++ ant/easyant/core/trunk/src/main/java/org/apache/easyant/core/EasyAntEngine.java Sun Sep
 1 08:38:11 2013
@@ -582,7 +582,7 @@ public class EasyAntEngine {
 
     }
 
-    public void doBuild(final Project project) throws Error {
+    public void doBuild(final Project project) {
         project.fireBuildStarted();
 
         Throwable error = null;
@@ -610,10 +610,8 @@ public class EasyAntEngine {
                 System.setErr(new PrintStream(new DemuxOutputStream(project, true)));
 
                 // make sure that we have a target to execute
-                if (configuration.getTargets().size() == 0) {
-                    if (project.getDefaultTarget() != null) {
-                        configuration.getTargets().add(project.getDefaultTarget());
-                    }
+                if (configuration.getTargets().size() == 0 && project.getDefaultTarget()
!= null) {
+                    configuration.getTargets().add(project.getDefaultTarget());
                 }
                 project.executeTargets(new Vector(configuration.getTargets()));
             } finally {
@@ -731,7 +729,7 @@ public class EasyAntEngine {
                 msg.append(props.getProperty("DATE"));
                 easyantVersion = msg.toString();
             } catch (IOException ioe) {
-                throw new BuildException("Could not load the version information:" + ioe.getMessage());
+                throw new BuildException("Could not load the version information", ioe);
             } finally {
                 if (in != null) {
                     try {

Modified: ant/easyant/core/trunk/src/main/java/org/apache/easyant/core/EasyAntMain.java
URL: http://svn.apache.org/viewvc/ant/easyant/core/trunk/src/main/java/org/apache/easyant/core/EasyAntMain.java?rev=1519248&r1=1519247&r2=1519248&view=diff
==============================================================================
--- ant/easyant/core/trunk/src/main/java/org/apache/easyant/core/EasyAntMain.java (original)
+++ ant/easyant/core/trunk/src/main/java/org/apache/easyant/core/EasyAntMain.java Sun Sep
 1 08:38:11 2013
@@ -750,7 +750,7 @@ public class EasyAntMain implements AntM
                 msg.append(props.getProperty("DATE"));
                 antVersion = msg.toString();
             } catch (IOException ioe) {
-                throw new BuildException("Could not load the version information:" + ioe.getMessage());
+                throw new BuildException("Could not load the version information", ioe);
             } finally {
                 if (in != null) {
                     try {



Mime
View raw message