sbailliez 02/01/08 14:15:33
Modified: src/main/org/apache/tools/ant/taskdefs Execute.java
Log:
Fix bad coding style.
then/else parts of if statement and loop body must always been enclosed
in a block statement.
Revision Changes Path
1.28 +18 -7
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java
Index: Execute.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- Execute.java 11 Dec 2001 14:05:43 -0000 1.27
+++ Execute.java 8 Jan 2002 22:15:33 -0000 1.28
@@ -172,7 +172,9 @@
* Find the list of environment variables for this process.
*/
public static synchronized Vector getProcEnvironment() {
- if (procEnvironment != null) return procEnvironment;
+ if (procEnvironment != null) {
+ return procEnvironment;
+ }
procEnvironment = new Vector();
try {
@@ -326,7 +328,9 @@
* @return the environment used to create a subprocess
*/
public String[] getEnvironment() {
- if (env == null || newEnvironment) return env;
+ if (env == null || newEnvironment) {
+ return env;
+ }
return patchEnvironment();
}
@@ -352,10 +356,11 @@
* @param wd the working directory of the process.
*/
public void setWorkingDirectory(File wd) {
- if (wd == null || wd.getAbsolutePath().equals(antWorkingDirectory))
+ if (wd == null || wd.getAbsolutePath().equals(antWorkingDirectory)) {
workingDirectory = null;
- else
+ } else {
workingDirectory = wd;
+ }
}
/**
@@ -408,16 +413,22 @@
//
processDestroyer.add(process);
- if (watchdog != null) watchdog.start(process);
+ if (watchdog != null) {
+ watchdog.start(process);
+ }
waitFor(process);
// remove the process to the list of those to destroy if the VM exits
//
processDestroyer.remove(process);
- if (watchdog != null) watchdog.stop();
+ if (watchdog != null) {
+ watchdog.stop();
+ }
streamHandler.stop();
- if (watchdog != null) watchdog.checkException();
+ if (watchdog != null) {
+ watchdog.checkException();
+ }
return getExitValue();
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>