Browse Source

Merge branch '1.9.x'

master
Stefan Bodewig 8 years ago
parent
commit
0d58df76f6
6 changed files with 15 additions and 12 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. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java
  5. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java
  6. +4
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/splash/SplashTask.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.


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

@@ -115,7 +115,7 @@ public class AggregateTransformer {
/** /**
* Used to ensure the uniqueness of a property * Used to ensure the uniqueness of a property
*/ */
private static int counter = 0;
private volatile static int counter = 0;


/** the format to use for the report. Must be <tt>FRAMES</tt> or <tt>NOFRAMES</tt> */ /** the format to use for the report. Must be <tt>FRAMES</tt> or <tt>NOFRAMES</tt> */
protected String format = FRAMES; protected String format = FRAMES;
@@ -257,7 +257,7 @@ public class AggregateTransformer {
xsltTask.setIn(((XMLResultAggregator) task).getDestinationFile()); xsltTask.setIn(((XMLResultAggregator) task).getDestinationFile());
File outputFile = null; File outputFile = null;
if (format.equals(FRAMES)) { if (format.equals(FRAMES)) {
String tempFileProperty = getClass().getName() + String.valueOf(counter++);
String tempFileProperty = getClass().getName() + String.valueOf(counter++); //NOSONAR
File tmp = FILE_UTILS.resolveFile(project.getBaseDir(), project File tmp = FILE_UTILS.resolveFile(project.getBaseDir(), project
.getProperty("java.io.tmpdir")); .getProperty("java.io.tmpdir"));
tempFileTask.setDestDir(tmp); tempFileTask.setDestDir(tmp);


+ 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.


+ 4
- 3
src/main/org/apache/tools/ant/taskdefs/optional/splash/SplashTask.java View File

@@ -53,6 +53,7 @@ public class SplashTask extends Task {
private String progressRegExp = null; private String progressRegExp = null;
private String displayText = null; private String displayText = null;


// class instance so we'll never show two splash screens at the same time
private static SplashScreen splash = null; private static SplashScreen splash = null;


/** /**
@@ -163,7 +164,7 @@ public class SplashTask extends Task {
splash.setVisible(false); splash.setVisible(false);
getProject().removeBuildListener(splash); getProject().removeBuildListener(splash);
splash.dispose(); splash.dispose();
splash = null;
splash = null; //NOSONAR
} }


log("Creating new SplashScreen", Project.MSG_VERBOSE); log("Creating new SplashScreen", Project.MSG_VERBOSE);
@@ -248,7 +249,7 @@ public class SplashTask extends Task {


try { try {
ImageIcon img = new ImageIcon(bout.toByteArray()); ImageIcon img = new ImageIcon(bout.toByteArray());
splash = new SplashScreen(img, progressRegExp, displayText);
splash = new SplashScreen(img, progressRegExp, displayText); //NOSONAR
success = true; success = true;
} catch (Throwable e) { } catch (Throwable e) {
logHeadless(e); logHeadless(e);
@@ -268,7 +269,7 @@ public class SplashTask extends Task {
} }
} else { } else {
try { try {
splash = new SplashScreen("Image Unavailable.", progressRegExp,
splash = new SplashScreen("Image Unavailable.", progressRegExp, //NOSONAR
displayText); displayText);
success = true; success = true;
} catch (Throwable e) { } catch (Throwable e) {


Loading…
Cancel
Save