ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject [2/3] ant git commit: fields don't need to be static
Date Wed, 21 Dec 2016 09:52:19 GMT
fields don't need to be static


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/bcc245e9
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/bcc245e9
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/bcc245e9

Branch: refs/heads/master
Commit: bcc245e991f041e7592e98d515dd405161cb8f3a
Parents: 720df70
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Wed Dec 21 10:51:38 2016 +0100
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Wed Dec 21 10:51:38 2016 +0100

----------------------------------------------------------------------
 src/main/org/apache/tools/ant/Main.java                      | 8 ++++----
 src/main/org/apache/tools/ant/launch/Launcher.java           | 4 +++-
 .../tools/ant/taskdefs/optional/clearcase/ClearCase.java     | 2 +-
 .../tools/ant/taskdefs/optional/junit/FailureRecorder.java   | 2 +-
 4 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/bcc245e9/src/main/org/apache/tools/ant/Main.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/Main.java b/src/main/org/apache/tools/ant/Main.java
index 075ec83..647fc9f 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<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
      * 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);

http://git-wip-us.apache.org/repos/asf/ant/blob/bcc245e9/src/main/org/apache/tools/ant/launch/Launcher.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/launch/Launcher.java b/src/main/org/apache/tools/ant/launch/Launcher.java
index bf881db..364bc58 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());

http://git-wip-us.apache.org/repos/asf/ant/blob/bcc245e9/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java
----------------------------------------------------------------------
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 d81e505..5a537eb 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.

http://git-wip-us.apache.org/repos/asf/ant/blob/bcc245e9/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java
----------------------------------------------------------------------
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 3046b75..4c90631 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.


Mime
View raw message