diff --git a/WHATSNEW b/WHATSNEW index 071c82cce..ff986267b 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -85,6 +85,12 @@ Changes that could break older environments: may not have started at all. Bugzilla Report 45227. + * If the number of minutes a build takes is bigger then 1000 Ant will + no longer print a thousands separator in the "elapsed time" + message. It used to be the thousands separator of the current + locale. + Bugzilla Report 44659. + Fixed bugs: ----------- diff --git a/src/main/org/apache/tools/ant/util/DateUtils.java b/src/main/org/apache/tools/ant/util/DateUtils.java index 30fd884cc..c9216d262 100644 --- a/src/main/org/apache/tools/ant/util/DateUtils.java +++ b/src/main/org/apache/tools/ant/util/DateUtils.java @@ -73,7 +73,7 @@ public final class DateUtils { private static final double[] LIMITS = {0, 1, 2}; - private static final String[] MINUTES_PART = {"", "1 minute ", "{0,number} minutes "}; + private static final String[] MINUTES_PART = {"", "1 minute ", "{0,number,###############} minutes "}; private static final String[] SECONDS_PART = {"0 seconds", "1 second", "{1,number} seconds"}; diff --git a/src/tests/junit/org/apache/tools/ant/util/DateUtilsTest.java b/src/tests/junit/org/apache/tools/ant/util/DateUtilsTest.java index 0cec840c7..b69f6f091 100644 --- a/src/tests/junit/org/apache/tools/ant/util/DateUtilsTest.java +++ b/src/tests/junit/org/apache/tools/ant/util/DateUtilsTest.java @@ -43,7 +43,7 @@ public class DateUtilsTest extends TestCase { } // https://issues.apache.org/bugzilla/show_bug.cgi?id=44659 - public void XtestLongElapsedTime(){ + public void testLongElapsedTime(){ assertEquals("2926 minutes 13 seconds", DateUtils.formatElapsedTime(1000 * 175573)); }