Browse Source

White-space changes only

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276234 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 21 years ago
parent
commit
0e58e71738
1 changed files with 57 additions and 57 deletions
  1. +57
    -57
      src/main/org/apache/tools/ant/taskdefs/Java.java

+ 57
- 57
src/main/org/apache/tools/ant/taskdefs/Java.java View File

@@ -681,41 +681,41 @@ public class Java extends Task {
*/
private int fork(String[] command) throws BuildException {

Execute exe
= new Execute(redirector.createHandler(), createWatchdog());
exe.setAntRun(getProject());
if (dir == null) {
dir = getProject().getBaseDir();
} else if (!dir.exists() || !dir.isDirectory()) {
throw new BuildException(dir.getAbsolutePath()
+ " is not a valid directory",
getLocation());
}
Execute exe
= new Execute(redirector.createHandler(), createWatchdog());
exe.setAntRun(getProject());
if (dir == null) {
dir = getProject().getBaseDir();
} else if (!dir.exists() || !dir.isDirectory()) {
throw new BuildException(dir.getAbsolutePath()
+ " is not a valid directory",
getLocation());
}

exe.setWorkingDirectory(dir);
exe.setWorkingDirectory(dir);

String[] environment = env.getVariables();
if (environment != null) {
for (int i = 0; i < environment.length; i++) {
log("Setting environment variable: " + environment[i],
Project.MSG_VERBOSE);
}
String[] environment = env.getVariables();
if (environment != null) {
for (int i = 0; i < environment.length; i++) {
log("Setting environment variable: " + environment[i],
Project.MSG_VERBOSE);
}
exe.setNewenvironment(newEnvironment);
exe.setEnvironment(environment);

exe.setCommandline(command);
try {
int rc = exe.execute();
redirector.complete();
if (exe.killedProcess()) {
throw new BuildException("Timeout: killed the sub-process");
}
return rc;
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
exe.setNewenvironment(newEnvironment);
exe.setEnvironment(environment);

exe.setCommandline(command);
try {
int rc = exe.execute();
redirector.complete();
if (exe.killedProcess()) {
throw new BuildException("Timeout: killed the sub-process");
}
return rc;
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
}

/**
@@ -723,36 +723,36 @@ public class Java extends Task {
*/
private void spawn(String[] command) throws BuildException {

Execute exe
= new Execute();
exe.setAntRun(getProject());
Execute exe
= new Execute();
exe.setAntRun(getProject());

if (dir == null) {
dir = getProject().getBaseDir();
} else if (!dir.exists() || !dir.isDirectory()) {
throw new BuildException(dir.getAbsolutePath()
+ " is not a valid directory",
getLocation());
}
if (dir == null) {
dir = getProject().getBaseDir();
} else if (!dir.exists() || !dir.isDirectory()) {
throw new BuildException(dir.getAbsolutePath()
+ " is not a valid directory",
getLocation());
}

exe.setWorkingDirectory(dir);
exe.setWorkingDirectory(dir);

String[] environment = env.getVariables();
if (environment != null) {
for (int i = 0; i < environment.length; i++) {
log("Setting environment variable: " + environment[i],
Project.MSG_VERBOSE);
}
}
exe.setNewenvironment(newEnvironment);
exe.setEnvironment(environment);

exe.setCommandline(command);
try {
exe.spawn();
} catch (IOException e) {
throw new BuildException(e, getLocation());
String[] environment = env.getVariables();
if (environment != null) {
for (int i = 0; i < environment.length; i++) {
log("Setting environment variable: " + environment[i],
Project.MSG_VERBOSE);
}
}
exe.setNewenvironment(newEnvironment);
exe.setEnvironment(environment);

exe.setCommandline(command);
try {
exe.spawn();
} catch (IOException e) {
throw new BuildException(e, getLocation());
}
}
/**
* Executes the given classname with the given arguments as it


Loading…
Cancel
Save