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 */

/** 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);


+ 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.
*/
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());


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


+ 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
*/
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> */
protected String format = FRAMES;
@@ -257,7 +257,7 @@ public class AggregateTransformer {
xsltTask.setIn(((XMLResultAggregator) task).getDestinationFile());
File outputFile = null;
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
.getProperty("java.io.tmpdir"));
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.
* Lazy instantiated via getLocationName().
*/
private static String locationName;
private String locationName;

/**
* 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 displayText = null;

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

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

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

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


Loading…
Cancel
Save