the test's setUp method. PR: 13465 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273422 13f79535-47bb-0310-9956-ffa450edef68master
@@ -25,6 +25,9 @@ Fixed bugs: | |||||
* ant.bat now supports the ANT_ARGS environment variable again (like | * ant.bat now supports the ANT_ARGS environment variable again (like | ||||
Ant 1.5 did). | Ant 1.5 did). | ||||
* The "plain" <junit> <formatter> could throw a NullPointerException | |||||
if an error occured in setUp. | |||||
Other changes: | Other changes: | ||||
-------------- | -------------- | ||||
@@ -203,10 +203,14 @@ public class PlainJUnitResultFormatter implements JUnitResultFormatter { | |||||
return; | return; | ||||
} | } | ||||
Long l = (Long) testStarts.get(test); | Long l = (Long) testStarts.get(test); | ||||
wri.println(" took " | |||||
+ nf.format((System.currentTimeMillis() - l.longValue()) | |||||
/ 1000.0) | |||||
+ " sec"); | |||||
double seconds = 0; | |||||
// can be null if an error occured in setUp | |||||
if (l != null) { | |||||
seconds = | |||||
(System.currentTimeMillis() - l.longValue()) / 1000.0; | |||||
} | |||||
wri.println(" took " + nf.format(seconds) + " sec"); | |||||
} | } | ||||
} | } | ||||