Browse Source

Fix audit violations

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270916 13f79535-47bb-0310-9956-ffa450edef68
master
Stephane Bailliez 23 years ago
parent
commit
088129a371
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java

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

@@ -155,7 +155,6 @@ public class JUnitTask extends Task {
private Integer timeout = null; private Integer timeout = null;
private boolean summary = false; private boolean summary = false;
private String summaryValue = ""; private String summaryValue = "";
private boolean filtertrace = true;
private JUnitTestRunner runner = null; private JUnitTestRunner runner = null;


/** /**
@@ -432,8 +431,8 @@ public class JUnitTask extends Task {
boolean errorOccurredHere = exitValue == JUnitTestRunner.ERRORS; boolean errorOccurredHere = exitValue == JUnitTestRunner.ERRORS;
boolean failureOccurredHere = exitValue != JUnitTestRunner.SUCCESS; boolean failureOccurredHere = exitValue != JUnitTestRunner.SUCCESS;
if (errorOccurredHere || failureOccurredHere) { if (errorOccurredHere || failureOccurredHere) {
if (errorOccurredHere && test.getHaltonerror()
|| failureOccurredHere && test.getHaltonfailure()) {
if ((errorOccurredHere && test.getHaltonerror())
|| (failureOccurredHere && test.getHaltonfailure())) {
throw new BuildException("Test "+test.getName()+" failed" throw new BuildException("Test "+test.getName()+" failed"
+(wasKilled ? " (timeout)" : ""), +(wasKilled ? " (timeout)" : ""),
location); location);
@@ -631,8 +630,9 @@ public class JUnitTask extends Task {
* and return an enumeration over all <tt>JUnitTest</tt>. * and return an enumeration over all <tt>JUnitTest</tt>.
*/ */
protected Enumeration getIndividualTests(){ protected Enumeration getIndividualTests(){
Enumeration[] enums = new Enumeration[ batchTests.size() + 1];
for (int i = 0; i < batchTests.size(); i++) {
final int count = batchTests.size();
final Enumeration[] enums = new Enumeration[ count + 1];
for (int i = 0; i < count; i++) {
BatchTest batchtest = (BatchTest)batchTests.elementAt(i); BatchTest batchtest = (BatchTest)batchTests.elementAt(i);
enums[i] = batchtest.elements(); enums[i] = batchtest.elements();
} }


Loading…
Cancel
Save