Browse Source

fields don't need to be static

master
Stefan Bodewig 8 years ago
parent
commit
bcc245e991
4 changed files with 9 additions and 7 deletions
  1. +4
    -4
      src/main/org/apache/tools/ant/Main.java
  2. +3
    -1
      src/main/org/apache/tools/ant/launch/Launcher.java
  3. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java
  4. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java

+ 4
- 4
src/main/org/apache/tools/ant/Main.java View File

@@ -81,10 +81,10 @@ public class Main implements AntMain {
private File buildFile; /* null */ private File buildFile; /* null */


/** Stream to use for logging. */ /** 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. */ /** Stream that we are using for logging error messages. */
private static PrintStream err = System.err;
private PrintStream err = System.err;


/** The build targets. */ /** The build targets. */
private final Vector<String> targets = new Vector<String>(); private final Vector<String> targets = new Vector<String>();
@@ -143,7 +143,7 @@ public class Main implements AntMain {
* Whether or not a logfile is being used. This is used to * Whether or not a logfile is being used. This is used to
* check if the output streams must be closed. * check if the output streams must be closed.
*/ */
private static boolean isLogFileUsed = false;
private boolean isLogFileUsed = false;


/** /**
* optional thread priority * optional thread priority
@@ -269,7 +269,7 @@ public class Main implements AntMain {
* *
* @since Ant 1.6 * @since Ant 1.6
*/ */
private static void handleLogfile() {
private void handleLogfile() {
if (isLogFileUsed) { if (isLogFileUsed) {
FileUtils.close(out); FileUtils.close(out);
FileUtils.close(err); FileUtils.close(err);


+ 3
- 1
src/main/org/apache/tools/ant/launch/Launcher.java View File

@@ -65,7 +65,7 @@ public class Launcher {
/** /**
* launch diagnostics flag; for debugging trouble at launch time. * 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. * The location of a per-user library directory.
@@ -107,9 +107,11 @@ public class Launcher {
*/ */
public static void main(final String[] args) { public static void main(final String[] args) {
int exitCode; int exitCode;
boolean launchDiag = false;
try { try {
final Launcher launcher = new Launcher(); final Launcher launcher = new Launcher();
exitCode = launcher.run(args); exitCode = launcher.run(args);
launchDiag = launcher.launchDiag;
} catch (final LaunchException e) { } catch (final LaunchException e) {
exitCode = EXIT_CODE_ERROR; exitCode = EXIT_CODE_ERROR;
System.err.println(e.getMessage()); System.err.println(e.getMessage());


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java View File

@@ -49,7 +49,7 @@ public abstract class ClearCase extends Task {
private String mClearToolDir = ""; private String mClearToolDir = "";
private String mviewPath = null; private String mviewPath = null;
private String mobjSelect = null; private String mobjSelect = null;
private static int pcnt = 0;
private int pcnt = 0;
private boolean mFailonerr = true; private boolean mFailonerr = true;
/** /**
* Set the directory where the cleartool executable is located. * Set the directory where the cleartool executable is located.


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java View File

@@ -97,7 +97,7 @@ public class FailureRecorder extends ProjectComponent implements JUnitResultForm
* Location and name of the generated JUnit class. * Location and name of the generated JUnit class.
* Lazy instantiated via getLocationName(). * Lazy instantiated via getLocationName().
*/ */
private static String locationName;
private String locationName;


/** /**
* Returns the (lazy evaluated) location for the collector class. * Returns the (lazy evaluated) location for the collector class.


Loading…
Cancel
Save