[ 
https://issues.apache.org/jira/browse/SLING-12749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17944748#comment-17944748
 ] 

Julian Reschke commented on SLING-12749:
----------------------------------------

Like that:

{code}
diff --git 
a/src/main/java/org/apache/sling/commons/log/logback/internal/SlingConfigurationPrinter.java
 
b/src/main/java/org/apache/sling/commons/log/logback/internal/SlingConfigurationPrinter.java
index b26df61..187afdc 100644
--- 
a/src/main/java/org/apache/sling/commons/log/logback/internal/SlingConfigurationPrinter.java
+++ 
b/src/main/java/org/apache/sling/commons/log/logback/internal/SlingConfigurationPrinter.java
@@ -30,6 +30,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
+import java.util.Locale;

 import ch.qos.logback.classic.LoggerContext;
 import ch.qos.logback.classic.spi.ILoggingEvent;
@@ -286,7 +287,7 @@ public class SlingConfigurationPrinter {
         }
         int exp = (int) (Math.log(bytes) / Math.log(unit));
         char pre = "kMGTPE".charAt(exp - 1);
-        return String.format("%.1f %sB", bytes / Math.pow(unit, exp), pre);
+        return String.format(Locale.ENGLISH, "%.1f %sB", bytes / 
Math.pow(unit, exp), pre);
     }
{code}

> Commons Log: SlingConfigurationPrinterTest relies on system locale
> ------------------------------------------------------------------
>
>                 Key: SLING-12749
>                 URL: https://issues.apache.org/jira/browse/SLING-12749
>             Project: Sling
>          Issue Type: Bug
>          Components: CI, Commons
>            Reporter: Julian Reschke
>            Priority: Trivial
>
> SlingConfigurationPrinterTest assumes "HumanReadableByteCount" to use English 
> (or equivalent) formatting of floats.
> We either should fix the test assumption, or the actual code that produces 
> the result.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to