diff options
author | Sven Gothel <[email protected]> | 2019-03-30 06:09:52 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-03-30 06:09:52 +0100 |
commit | 31869130c3580a1a1c9e2f57e48d5712a3eebda1 (patch) | |
tree | a559bf7455913f2c7621f8e15cfa10c4867ee532 /src/jogl | |
parent | b83a912f19685e81b71c950914f0f82cc0e534bf (diff) |
Bug 1366 - Use String.format((Locale)null, "..." ..) avoiding Locale output for System related Operations
Diffstat (limited to 'src/jogl')
3 files changed, 10 insertions, 7 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java b/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java index d24ca5b7e..73244cb13 100644 --- a/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java +++ b/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java @@ -28,6 +28,7 @@ package com.jogamp.opengl.math; import java.nio.FloatBuffer; +import java.util.Locale; import com.jogamp.opengl.GLException; @@ -1907,11 +1908,11 @@ public final class FloatUtil { final int a0 = aOffset + a.position(); if(rowMajorOrder) { for(int c=0; c<columns; c++) { - sb.append( String.format( f+" ", a.get( a0 + row*columns + c ) ) ); + sb.append( String.format((Locale)null, f+" ", a.get( a0 + row*columns + c ) ) ); } } else { for(int r=0; r<columns; r++) { - sb.append( String.format( f+" ", a.get( a0 + row + r*rows ) ) ); + sb.append( String.format((Locale)null, f+" ", a.get( a0 + row + r*rows ) ) ); } } return sb; @@ -1935,11 +1936,11 @@ public final class FloatUtil { } if(rowMajorOrder) { for(int c=0; c<columns; c++) { - sb.append( String.format( f+" ", a[ aOffset + row*columns + c ] ) ); + sb.append( String.format((Locale)null, f+" ", a[ aOffset + row*columns + c ] ) ); } } else { for(int r=0; r<columns; r++) { - sb.append( String.format( f+" ", a[ aOffset + row + r*rows ] ) ); + sb.append( String.format((Locale)null, f+" ", a[ aOffset + row + r*rows ] ) ); } } return sb; diff --git a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java index 41b969551..c2da68cd9 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java +++ b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java @@ -33,6 +33,7 @@ import jogamp.opengl.FPSCounterImpl; import java.io.PrintStream; import java.util.ArrayList; +import java.util.Locale; import com.jogamp.opengl.GLAnimatorControl; import com.jogamp.opengl.GLAutoDrawable; @@ -151,7 +152,7 @@ public abstract class AnimatorBase implements GLAnimatorControl { */ protected final synchronized void initImpl(final boolean force) { if( force || null == impl ) { - final String seqSuffix = String.format("#%02d", seqInstanceNumber++); + final String seqSuffix = String.format((Locale)null, "#%02d", seqInstanceNumber++); if( useAWTAnimatorImpl( modeBits ) ) { try { impl = (AnimatorImpl) awtAnimatorImplClazz.newInstance(); diff --git a/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java b/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java index 7cc009668..91573143d 100644 --- a/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java +++ b/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java @@ -41,6 +41,7 @@ import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.Iterator; +import java.util.Locale; import java.util.Set; import java.util.Map.Entry; @@ -330,7 +331,7 @@ public class AWTTilePainter { // but that's the software rendering path which is very slow anyway. final BufferedImage dstImage; if( DEBUG_TILES ) { - final String fname = String.format("file_%03d_0_tile_[%02d][%02d]_sz_%03dx%03d_pos0_%03d_%03d_yOff_%03d_pos1_%03d_%03d.png", + final String fname = String.format((Locale)null, "file_%03d_0_tile_[%02d][%02d]_sz_%03dx%03d_pos0_%03d_%03d_yOff_%03d_pos1_%03d_%03d.png", _counter, renderer.getParam(TileRenderer.TR_CURRENT_COLUMN), renderer.getParam(TileRenderer.TR_CURRENT_ROW), tWidth, tHeight, @@ -361,7 +362,7 @@ public class AWTTilePainter { dstImage = tBuffer.image; } if( DEBUG_TILES ) { - final String fname = String.format("file_%03d_1_tile_[%02d][%02d]_sz_%03dx%03d_pos0_%03d_%03d_yOff_%03d_pos1_%03d_%03d.png", + final String fname = String.format((Locale)null, "file_%03d_1_tile_[%02d][%02d]_sz_%03dx%03d_pos0_%03d_%03d_yOff_%03d_pos1_%03d_%03d.png", _counter, renderer.getParam(TileRenderer.TR_CURRENT_COLUMN), renderer.getParam(TileRenderer.TR_CURRENT_ROW), tWidth, tHeight, |