LANG-978 Failing tests with Java 8 b128
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1573756 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8b5e3eb81d
commit
77f5fe29e3
|
@ -24,7 +24,8 @@
|
|||
<release version="3.4" date="TBA" description="TBA">
|
||||
<action issue="LANG-984" type="fix" dev="sebb">DurationFormatUtils does not handle large durations correctly</action>
|
||||
<action issue="LANG-982" type="fix" dev="sebb">DurationFormatUtils.formatDuration(61999, "s.SSSS") - ms field size should be 4 digits</action>
|
||||
</release>
|
||||
<action issue="LANG-978" type="fix" dev="sebb">Failing tests with Java 8 b128</action>
|
||||
</release>
|
||||
|
||||
<release version="3.3" date="TBA" description="Bug fixes and and new features including: DifferenceBuilder, ClassPathUtils, RandomUtils and Jaro-Winkler String distance metric">
|
||||
<action issue="LANG-621" type="fix" dev="kinow" due-to="Philip Hodges, Thomas Neidhart">ReflectionToStringBuilder.toString does not debug 3rd party object fields within 3rd party object</action>
|
||||
|
|
|
@ -442,12 +442,10 @@ public class DurationFormatUtils {
|
|||
buffer.append(paddedValue(seconds, padWithZeros, count));
|
||||
lastOutputSeconds = true;
|
||||
} else if (value == S) {
|
||||
if (lastOutputSeconds) {
|
||||
milliseconds += 1000;
|
||||
final String str = padWithZeros
|
||||
? StringUtils.leftPad(Long.toString(milliseconds), count, '0')
|
||||
: Long.toString(milliseconds);
|
||||
buffer.append(str.substring(1));
|
||||
if (lastOutputSeconds) {
|
||||
// ensure at least 3 digits are displayed even if padding is not selected
|
||||
int width = padWithZeros ? Math.max(3, count) : 3;
|
||||
buffer.append(paddedValue(milliseconds, true, width));
|
||||
} else {
|
||||
buffer.append(paddedValue(milliseconds, padWithZeros, count));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue