Browse Source

fmt/refac

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@556986 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 18 years ago
parent
commit
e49770109c
2 changed files with 7 additions and 10 deletions
  1. +3
    -4
      src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java
  2. +4
    -6
      src/main/org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.java

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

@@ -238,8 +238,8 @@ public class AggregateTransformer {
File outputFile = null;
if (format.equals(FRAMES)) {
String tempFileProperty = getClass().getName() + String.valueOf(counter++);
File tmp = FILE_UTILS.resolveFile(project.getBaseDir(),
project.getProperty("java.io.tmpdir"));
File tmp = FILE_UTILS.resolveFile(project.getBaseDir(), project
.getProperty("java.io.tmpdir"));
tempFileTask.setDestDir(tmp);
tempFileTask.setProperty(tempFileProperty);
tempFileTask.execute();
@@ -263,8 +263,7 @@ public class AggregateTransformer {
try {
xsltTask.execute();
} catch (Exception e) {
throw new BuildException("Errors while applying transformations: "
+ e.getMessage(), e);
throw new BuildException("Errors while applying transformations: " + e.getMessage(), e);
}
final long dt = System.currentTimeMillis() - t0;
task.log("Transform time: " + dt + "ms");


+ 4
- 6
src/main/org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.java View File

@@ -199,11 +199,10 @@ public class FormatterElement {
public boolean shouldUse(Task t) {
if (ifProperty != null && t.getProject().getProperty(ifProperty) == null) {
return false;
} else if (unlessProperty != null
&& t.getProject().getProperty(unlessProperty) != null) {
}
if (unlessProperty != null && t.getProject().getProperty(unlessProperty) != null) {
return false;
}

return true;
}

@@ -218,7 +217,7 @@ public class FormatterElement {
* @since Ant 1.6
*/
JUnitTaskMirror.JUnitResultFormatterMirror createFormatter(ClassLoader loader)
throws BuildException {
throws BuildException {

if (classname == null) {
throw new BuildException("you must specify type or classname");
@@ -253,8 +252,7 @@ public class FormatterElement {
}

if (!(o instanceof JUnitTaskMirror.JUnitResultFormatterMirror)) {
throw new BuildException(classname
+ " is not a JUnitResultFormatter");
throw new BuildException(classname + " is not a JUnitResultFormatter");
}
JUnitTaskMirror.JUnitResultFormatterMirror r =
(JUnitTaskMirror.JUnitResultFormatterMirror) o;


Loading…
Cancel
Save