From ec8d88fa0192eb8fb5fc180036a5d032bba83d74 Mon Sep 17 00:00:00 2001 From: Sibo Van Gool Date: Fri, 28 Jan 2022 22:35:13 +0100 Subject: [PATCH] Use fixed Locale for LogLine number formatting Keep consistency over bug reports (e.g. on my machine, the time stamp was with commas as decimal separators, but I've seen people with dots) --- swing/src/net/sf/openrocket/logging/LogLine.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/swing/src/net/sf/openrocket/logging/LogLine.java b/swing/src/net/sf/openrocket/logging/LogLine.java index c4c0d4cb1..af6f74f54 100644 --- a/swing/src/net/sf/openrocket/logging/LogLine.java +++ b/swing/src/net/sf/openrocket/logging/LogLine.java @@ -1,6 +1,7 @@ package net.sf.openrocket.logging; import java.io.PrintWriter; +import java.util.Locale; import java.util.concurrent.atomic.AtomicInteger; /** @@ -127,7 +128,7 @@ public class LogLine implements Comparable { public String toString() { if (formattedMessage == null) { String str; - str = String.format("%4d %10.3f %-" + LogLevel.LENGTH + "s %s %s", + str = String.format(Locale.ENGLISH, "%4d %10.3f %-" + LogLevel.LENGTH + "s %s %s", count, timestamp / 1000.0, (level != null) ? level.toString() : "NULL", getLocation(), message);