You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2025/04/15 15:30:04 UTC
(sling-org-apache-sling-commons-log) branch master updated: SLING-12749 : SlingConfigurationPrinterTest relies on system locale
This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-log.git
The following commit(s) were added to refs/heads/master by this push:
new f873fa2 SLING-12749 : SlingConfigurationPrinterTest relies on system locale
f873fa2 is described below
commit f873fa2013dc400f878bc5722626e56a62fbf2a9
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Apr 15 17:29:57 2025 +0200
SLING-12749 : SlingConfigurationPrinterTest relies on system locale
---
.../sling/commons/log/logback/internal/SlingConfigurationPrinter.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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);
}
protected String getModifiedDate(File f) {