diff --git a/src/main/org/apache/tools/ant/Main.java b/src/main/org/apache/tools/ant/Main.java index 075ec8396..647fc9fa9 100644 --- a/src/main/org/apache/tools/ant/Main.java +++ b/src/main/org/apache/tools/ant/Main.java @@ -81,10 +81,10 @@ public class Main implements AntMain { private File buildFile; /* null */ /** Stream to use for logging. */ - private static PrintStream out = System.out; + private PrintStream out = System.out; /** Stream that we are using for logging error messages. */ - private static PrintStream err = System.err; + private PrintStream err = System.err; /** The build targets. */ private final Vector targets = new Vector(); @@ -143,7 +143,7 @@ public class Main implements AntMain { * Whether or not a logfile is being used. This is used to * check if the output streams must be closed. */ - private static boolean isLogFileUsed = false; + private boolean isLogFileUsed = false; /** * optional thread priority @@ -269,7 +269,7 @@ public class Main implements AntMain { * * @since Ant 1.6 */ - private static void handleLogfile() { + private void handleLogfile() { if (isLogFileUsed) { FileUtils.close(out); FileUtils.close(err); diff --git a/src/main/org/apache/tools/ant/launch/Launcher.java b/src/main/org/apache/tools/ant/launch/Launcher.java index bf881db89..364bc5820 100644 --- a/src/main/org/apache/tools/ant/launch/Launcher.java +++ b/src/main/org/apache/tools/ant/launch/Launcher.java @@ -65,7 +65,7 @@ public class Launcher { /** * launch diagnostics flag; for debugging trouble at launch time. */ - public static boolean launchDiag = false; + public boolean launchDiag = false; /** * The location of a per-user library directory. @@ -107,9 +107,11 @@ public class Launcher { */ public static void main(final String[] args) { int exitCode; + boolean launchDiag = false; try { final Launcher launcher = new Launcher(); exitCode = launcher.run(args); + launchDiag = launcher.launchDiag; } catch (final LaunchException e) { exitCode = EXIT_CODE_ERROR; System.err.println(e.getMessage()); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java index d81e505cd..5a537eb85 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java @@ -49,7 +49,7 @@ public abstract class ClearCase extends Task { private String mClearToolDir = ""; private String mviewPath = null; private String mobjSelect = null; - private static int pcnt = 0; + private int pcnt = 0; private boolean mFailonerr = true; /** * Set the directory where the cleartool executable is located. diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java index 3046b75aa..4c90631da 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java @@ -97,7 +97,7 @@ public class FailureRecorder extends ProjectComponent implements JUnitResultForm * Location and name of the generated JUnit class. * Lazy instantiated via getLocationName(). */ - private static String locationName; + private String locationName; /** * Returns the (lazy evaluated) location for the collector class.