diff options
author | Sven Gothel <[email protected]> | 2019-03-30 06:08:14 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-03-30 06:08:14 +0100 |
commit | ecb65c39a6902158ed824348a23dbbcb42a85f01 (patch) | |
tree | 6b3fe22223a96cc6fed7c894e5d9f816dece3fa0 /src/java/com/jogamp/common/util | |
parent | 03bcef96e3105923ccc8c827b70b97ff0aa3464c (diff) |
Bug 1366 - Use String.format((Locale)null, "..." ..) avoiding Locale output for System related Operations
Diffstat (limited to 'src/java/com/jogamp/common/util')
-rw-r--r-- | src/java/com/jogamp/common/util/Bitstream.java | 5 | ||||
-rw-r--r-- | src/java/com/jogamp/common/util/IOUtil.java | 3 | ||||
-rw-r--r-- | src/java/com/jogamp/common/util/ReflectionUtil.java | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/java/com/jogamp/common/util/Bitstream.java b/src/java/com/jogamp/common/util/Bitstream.java index e75d820..2dcd099 100644 --- a/src/java/com/jogamp/common/util/Bitstream.java +++ b/src/java/com/jogamp/common/util/Bitstream.java @@ -33,6 +33,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.ByteBuffer; +import java.util.Locale; import jogamp.common.Debug; @@ -1507,7 +1508,7 @@ public class Bitstream<T> { mode = outputMode ? "output" : "input"; bpos = bytes.position(); } - return String.format("%s, pos %d [byteP %d, bitCnt %d], bitbuf %s", + return String.format((Locale)null, "%s, pos %d [byteP %d, bitCnt %d], bitbuf %s", mode, position(), bpos, bitCount, toHexBinString(true, bitBuffer, 8)); } @@ -1531,7 +1532,7 @@ public class Bitstream<T> { } public static String toHexBinString(final boolean msbFirst, final int v, final int bitCount) { final int nibbles = 0 == bitCount ? 2 : ( bitCount + 3 ) / 4; - return String.format("[0x%0"+nibbles+"X, msbFirst %b, %s]", v, msbFirst, toBinString(msbFirst, v, bitCount)); + return String.format((Locale)null, "[0x%0"+nibbles+"X, msbFirst %b, %s]", v, msbFirst, toBinString(msbFirst, v, bitCount)); } public static final String toHexBinString(final boolean msbFirst, final byte[] data, final int offset, final int len) { final StringBuilder sb = new StringBuilder(); diff --git a/src/java/com/jogamp/common/util/IOUtil.java b/src/java/com/jogamp/common/util/IOUtil.java index 0381ebc..066500f 100644 --- a/src/java/com/jogamp/common/util/IOUtil.java +++ b/src/java/com/jogamp/common/util/IOUtil.java @@ -50,6 +50,7 @@ import java.net.URLConnection; import java.nio.ByteBuffer; import java.security.AccessController; import java.security.PrivilegedAction; +import java.util.Locale; import java.util.regex.Pattern; import jogamp.common.Debug; @@ -1162,7 +1163,7 @@ public class IOUtil { File tmpBaseDir = null; if(null != testDirImpl(tmpRoot, true /* create */, executable, dbgMsg)) { // check tmpRoot first for(int i = 0; null == tmpBaseDir && i<=9999; i++) { - final String tmpDirSuffix = String.format("_%04d", i); // 4 digits for iteration + final String tmpDirSuffix = String.format((Locale)null, "_%04d", i); // 4 digits for iteration tmpBaseDir = testDirImpl(new File(tmpRoot, tmpSubDirPrefix+tmpDirSuffix), true /* create */, executable, dbgMsg); } } diff --git a/src/java/com/jogamp/common/util/ReflectionUtil.java b/src/java/com/jogamp/common/util/ReflectionUtil.java index 7e8ae63..0d76827 100644 --- a/src/java/com/jogamp/common/util/ReflectionUtil.java +++ b/src/java/com/jogamp/common/util/ReflectionUtil.java @@ -42,6 +42,7 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Iterator; +import java.util.Locale; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -92,7 +93,7 @@ public final class ReflectionUtil { public int count; @Override public String toString() { - return String.format("%8.3f ms, %03d invoc, %s", nanoCosts/1e6, count, name); + return String.format((Locale)null, "%8.3f ms, %03d invoc, %s", nanoCosts/1e6, count, name); } } public static void resetForNameCount() { |