git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275180 13f79535-47bb-0310-9956-ffa450edef68master
@@ -307,11 +307,13 @@ public class Execute { | |||||
try { | try { | ||||
return bos.toString("Cp1047"); | return bos.toString("Cp1047"); | ||||
} catch (java.io.UnsupportedEncodingException e) { | } catch (java.io.UnsupportedEncodingException e) { | ||||
//noop default encoding used | |||||
} | } | ||||
} else if (Os.isFamily("os/400")) { | } else if (Os.isFamily("os/400")) { | ||||
try { | try { | ||||
return bos.toString("Cp500"); | return bos.toString("Cp500"); | ||||
} catch (java.io.UnsupportedEncodingException e) { | } catch (java.io.UnsupportedEncodingException e) { | ||||
//noop default encoding used | |||||
} | } | ||||
} | } | ||||
return bos.toString(); | return bos.toString(); | ||||
@@ -1151,4 +1153,4 @@ public class Execute { | |||||
} | } | ||||
} | } | ||||
} | |||||
} |
@@ -104,7 +104,7 @@ public class ExecuteJava implements Runnable, TimeoutObserver { | |||||
public void setSystemProperties(CommandlineJava.SysProperties s) { | public void setSystemProperties(CommandlineJava.SysProperties s) { | ||||
sysProperties = s; | sysProperties = s; | ||||
} | } | ||||
/** | /** | ||||
* Permissions for the application run. | * Permissions for the application run. | ||||
* @since Ant 1.6 | * @since Ant 1.6 | ||||
@@ -220,7 +220,7 @@ public class ExecuteJava implements Runnable, TimeoutObserver { | |||||
public void run() { | public void run() { | ||||
final Object[] argument = {javaCommand.getArguments()}; | final Object[] argument = {javaCommand.getArguments()}; | ||||
try { | try { | ||||
if(perm != null) { | |||||
if (perm != null) { | |||||
perm.setSecurityManager(); | perm.setSecurityManager(); | ||||
} | } | ||||
main.invoke(null, argument); | main.invoke(null, argument); | ||||
@@ -232,7 +232,7 @@ public class ExecuteJava implements Runnable, TimeoutObserver { | |||||
} catch (Throwable t) { | } catch (Throwable t) { | ||||
caught = t; | caught = t; | ||||
} finally { | } finally { | ||||
if(perm != null) { | |||||
if (perm != null) { | |||||
perm.restoreSecurityManager(); | perm.restoreSecurityManager(); | ||||
} | } | ||||
synchronized (this) { | synchronized (this) { | ||||
@@ -258,4 +258,4 @@ public class ExecuteJava implements Runnable, TimeoutObserver { | |||||
public synchronized boolean killedProcess() { | public synchronized boolean killedProcess() { | ||||
return timedOut; | return timedOut; | ||||
} | } | ||||
} | |||||
} |
@@ -311,7 +311,7 @@ public class ExecuteOn extends ExecTask { | |||||
} | } | ||||
if (!"file".equals(currentType)) { | if (!"file".equals(currentType)) { | ||||
String[] s = getDirs(base, ds);; | |||||
String[] s = getDirs(base, ds); | |||||
for (int j = 0; j < s.length; j++) { | for (int j = 0; j < s.length; j++) { | ||||
totalDirs++; | totalDirs++; | ||||
fileNames.addElement(s[j]); | fileNames.addElement(s[j]); | ||||
@@ -615,4 +615,4 @@ public class ExecuteOn extends ExecTask { | |||||
return new String[] {"file", "dir", "both"}; | return new String[] {"file", "dir", "both"}; | ||||
} | } | ||||
} | } | ||||
} | |||||
} |
@@ -98,6 +98,9 @@ public class Exit extends Task { | |||||
unlessCondition = c; | unlessCondition = c; | ||||
} | } | ||||
/** | |||||
* Exits the actual build. | |||||
*/ | |||||
public void execute() throws BuildException { | public void execute() throws BuildException { | ||||
if (testIfCondition() && testUnlessCondition()) { | if (testIfCondition() && testUnlessCondition()) { | ||||
if (message != null && message.length() > 0) { | if (message != null && message.length() > 0) { | ||||
@@ -110,6 +113,7 @@ public class Exit extends Task { | |||||
/** | /** | ||||
* Set a multiline message. | * Set a multiline message. | ||||
* @param msg the message to display | |||||
*/ | */ | ||||
public void addText(String msg) { | public void addText(String msg) { | ||||
if (message == null) { | if (message == null) { | ||||
@@ -133,4 +137,4 @@ public class Exit extends Task { | |||||
return getProject().getProperty(unlessCondition) == null; | return getProject().getProperty(unlessCondition) == null; | ||||
} | } | ||||
} | |||||
} |
@@ -121,6 +121,7 @@ public class Input extends Task { | |||||
/** | /** | ||||
* Set a multiline message. | * Set a multiline message. | ||||
* @param msg The message to be displayed. | |||||
*/ | */ | ||||
public void addText(String msg) { | public void addText(String msg) { | ||||
message += getProject().replaceProperties(msg); | message += getProject().replaceProperties(msg); | ||||
@@ -133,8 +134,8 @@ public class Input extends Task { | |||||
} | } | ||||
/** | /** | ||||
* Actual method executed by jakarta-ant. | |||||
* @exception BuildException | |||||
* Actual method executed by ant. | |||||
* @throws BuildException | |||||
*/ | */ | ||||
public void execute () throws BuildException { | public void execute () throws BuildException { | ||||
if (addproperty != null | if (addproperty != null | ||||
@@ -163,4 +164,4 @@ public class Input extends Task { | |||||
} | } | ||||
} | } | ||||
} | |||||
} |