Browse Source

Don't use a thousands separator at all for minutes. PR 44659.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@688958 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 17 years ago
parent
commit
bd76a2fb37
3 changed files with 8 additions and 2 deletions
  1. +6
    -0
      WHATSNEW
  2. +1
    -1
      src/main/org/apache/tools/ant/util/DateUtils.java
  3. +1
    -1
      src/tests/junit/org/apache/tools/ant/util/DateUtilsTest.java

+ 6
- 0
WHATSNEW View File

@@ -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:
-----------



+ 1
- 1
src/main/org/apache/tools/ant/util/DateUtils.java View File

@@ -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"};



+ 1
- 1
src/tests/junit/org/apache/tools/ant/util/DateUtilsTest.java View File

@@ -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));
}


Loading…
Cancel
Save