summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-08 22:10:03 +0200
committerSven Gothel <[email protected]>2014-07-08 22:10:03 +0200
commitde53d193c86a02a3cdc46c5c8758192d957d1c67 (patch)
tree8be8e36381d6f25850b887c9ff0df7e9c2279487 /src
parentbe2b608e22d9a2a3a80eb547bee6180c2ca22678 (diff)
Findbugs: Misc minor issues (see below)
- remove duplicate code in branch - Use Type.valueOf(primitive) - Don't use array.toString() directly - remove dead code
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java2
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java16
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java12
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSByte.java4
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/mipmap/Mipmap.java30
-rw-r--r--src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java5
-rw-r--r--src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java14
-rw-r--r--src/newt/classes/jogamp/newt/MonitorModeProps.java5
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java23
-rw-r--r--src/test/com/jogamp/opengl/test/android/NEWTGearsES2Activity.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestMainVersionGLCanvasAWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2AWT3.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java32
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom1.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom2.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/UITestCase.java2
17 files changed, 79 insertions, 102 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
index 5ff64d81b..06f7d9268 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
@@ -207,7 +207,7 @@ public class ShaderUtil {
gle.printStackTrace();
}
if(!queryOK) {
- info.shaderCompilerAvailable = new Boolean(true);
+ info.shaderCompilerAvailable = Boolean.valueOf(true);
}
} else if( gl.isGL2ES2() ) {
info.shaderCompilerAvailable = new Boolean(true);
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java
index f84a4eab3..c8be6c7fb 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java
@@ -157,13 +157,13 @@ public class CmapFormat4 extends CmapFormat {
.append(_entrySelector)
.append(", rangeShift: ")
.append(_rangeShift)
- .append(", endCode: ")
- .append(_endCode)
- .append(", startCode: ")
- .append(_endCode)
- .append(", idDelta: ")
- .append(_idDelta)
- .append(", idRangeOffset: ")
- .append(_idRangeOffset).toString();
+ .append(", endCodeLen: ")
+ .append(_endCode.length)
+ .append(", startCodeLen: ")
+ .append(_endCode.length)
+ .append(", idDeltaLen: ")
+ .append(_idDelta.length)
+ .append(", idRangeOffsetLen: ")
+ .append(_idRangeOffset.length).toString();
}
}
diff --git a/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java b/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java
index a6952ec5a..c91a045ae 100644
--- a/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java
+++ b/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java
@@ -463,21 +463,21 @@ public class GLUquadricImpl implements GLUquadric {
x = sin((i * da));
y = cos((i * da));
}
- if (nsign == 1.0f) {
+ // if (nsign == 1.0f) {
normal3f(gl, (x * nsign), (y * nsign), (nz * nsign));
TXTR_COORD(gl, s, t);
glVertex3f(gl, (x * r), (y * r), z);
normal3f(gl, (x * nsign), (y * nsign), (nz * nsign));
TXTR_COORD(gl, s, t + dt);
glVertex3f(gl, (x * (r + dr)), (y * (r + dr)), (z + dz));
- } else {
+ /* } else {
normal3f(gl, x * nsign, y * nsign, nz * nsign);
TXTR_COORD(gl, s, t);
glVertex3f(gl, (x * r), (y * r), z);
normal3f(gl, x * nsign, y * nsign, nz * nsign);
TXTR_COORD(gl, s, t + dt);
glVertex3f(gl, (x * (r + dr)), (y * (r + dr)), (z + dz));
- }
+ } */
s += ds;
} // for slices
glEnd(gl);
@@ -625,7 +625,7 @@ public class GLUquadricImpl implements GLUquadric {
if (innerRadius != 0.0) {
float a;
glBegin(gl, GL.GL_LINE_LOOP);
- for (a = 0.0f; a < 2.0 * PI; a += da) {
+ for (a = 0.0f; a < PI_2; a += da) {
final float x = innerRadius * sin(a);
final float y = innerRadius * cos(a);
glVertex2f(gl, x, y);
@@ -635,7 +635,7 @@ public class GLUquadricImpl implements GLUquadric {
{
float a;
glBegin(gl, GL.GL_LINE_LOOP);
- for (a = 0; a < 2.0f * PI; a += da) {
+ for (a = 0; a < PI_2; a += da) {
final float x = outerRadius * sin(a);
final float y = outerRadius * cos(a);
glVertex2f(gl, x, y);
@@ -1120,7 +1120,7 @@ public class GLUquadricImpl implements GLUquadric {
//
private static final float PI = FloatUtil.PI;
- private static final float PI_2 = 2f * FloatUtil.PI;
+ private static final float PI_2 = 2f * PI;
private static final int CACHE_SIZE = 240;
private final void glBegin(final GL gl, final int mode) {
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSByte.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSByte.java
index e9b021413..76c34330f 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSByte.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSByte.java
@@ -58,9 +58,7 @@ public class ExtractSByte implements ExtractPrimitive {
@Override
public double extract( final boolean isSwap, final ByteBuffer sbyte ) {
- final byte b = sbyte.get();
- assert( b <= 127 );
- return( b );
+ return sbyte.get(); // <= 127
}
@Override
diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Mipmap.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Mipmap.java
index fba6a231a..9ff6bd637 100644
--- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Mipmap.java
+++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Mipmap.java
@@ -661,8 +661,6 @@ public class Mipmap {
public static int gluBuild2DMipmapLevels( final GL gl, final int target, final int internalFormat,
final int width, final int height, final int format, final int type, final int userLevel,
final int baseLevel, final int maxLevel, final Object data ) {
- int dataPos = 0;
-
int level, levels;
final int rc = checkMipmapArgs( internalFormat, format, type );
@@ -686,14 +684,14 @@ public class Mipmap {
}
//PointerWrapper pointer = PointerWrapperFactory.getPointerWrapper( data );
- ByteBuffer buffer = null;
+ final ByteBuffer buffer;
if( data instanceof ByteBuffer ) {
buffer = (ByteBuffer)data;
- dataPos = buffer.position();
} else if( data instanceof byte[] ) {
- final byte[] array = (byte[])data;
- buffer = ByteBuffer.allocateDirect(array.length);
- buffer.put(array);
+ final byte[] array = (byte[])data;
+ buffer = ByteBuffer.allocateDirect(array.length);
+ buffer.put(array);
+ buffer.flip();
} else if( data instanceof short[] ) {
final short[] array = (short[])data;
buffer = ByteBuffer.allocateDirect( array.length * 2 );
@@ -709,8 +707,11 @@ public class Mipmap {
buffer = ByteBuffer.allocateDirect( array.length * 4 );
final FloatBuffer fb = buffer.asFloatBuffer();
fb.put( array );
+ } else {
+ throw new IllegalArgumentException("Unhandled data type: "+data.getClass().getName());
}
+ final int dataPos = buffer.position();
try {
return( BuildMipmap.gluBuild2DMipmapLevelsCore( gl, target, internalFormat,
width, height, width, height, format, type, userLevel, baseLevel,
@@ -723,8 +724,6 @@ public class Mipmap {
public static int gluBuild2DMipmaps( final GL gl, final int target, final int internalFormat,
final int width, final int height, final int format, final int type, final Object data ) {
- int dataPos = 0;
-
final int[] widthPowerOf2 = new int[1];
final int[] heightPowerOf2 = new int[1];
int level, levels;
@@ -748,14 +747,14 @@ public class Mipmap {
}
//PointerWrapper pointer = PointerWrapperFactory.getPointerWrapper( data );
- ByteBuffer buffer = null;
+ final ByteBuffer buffer;
if( data instanceof ByteBuffer ) {
buffer = (ByteBuffer)data;
- dataPos = buffer.position();
} else if( data instanceof byte[] ) {
- final byte[] array = (byte[])data;
- buffer = ByteBuffer.allocateDirect(array.length);
- buffer.put(array);
+ final byte[] array = (byte[])data;
+ buffer = ByteBuffer.allocateDirect(array.length);
+ buffer.put(array);
+ buffer.flip();
} else if( data instanceof short[] ) {
final short[] array = (short[])data;
buffer = ByteBuffer.allocateDirect( array.length * 2 );
@@ -771,8 +770,11 @@ public class Mipmap {
buffer = ByteBuffer.allocateDirect( array.length * 4 );
final FloatBuffer fb = buffer.asFloatBuffer();
fb.put( array );
+ } else {
+ throw new IllegalArgumentException("Unhandled data type: "+data.getClass().getName());
}
+ final int dataPos = buffer.position();
try {
return( BuildMipmap.gluBuild2DMipmapLevelsCore( gl, target, internalFormat,
width, height, widthPowerOf2[0], heightPowerOf2[0], format, type, 0,
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java
index b1d560f4a..6017c94e4 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java
@@ -46,12 +46,9 @@ import javax.media.nativewindow.DefaultGraphicsConfiguration;
import javax.media.nativewindow.NativeSurface;
import javax.media.nativewindow.MutableSurface;
import javax.media.opengl.GL;
-import javax.media.opengl.GL2;
-import javax.media.opengl.GLCapabilitiesImmutable;
import javax.media.opengl.GLContext;
import javax.media.opengl.GLDrawableFactory;
import javax.media.opengl.GLException;
-import javax.media.opengl.GLProfile;
import com.jogamp.common.nio.PointerBuffer;
import com.jogamp.opengl.util.GLBuffers;
@@ -119,8 +116,6 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
private void createPbuffer() {
final MutableSurface ms = (MutableSurface) getNativeSurface();
final DefaultGraphicsConfiguration config = (DefaultGraphicsConfiguration) ms.getGraphicsConfiguration();
- final GLCapabilitiesImmutable capabilities = (GLCapabilitiesImmutable)config.getChosenCapabilities();
- final GLProfile glProfile = capabilities.getGLProfile();
final MacOSXCGLDrawableFactory.SharedResource sr = ((MacOSXCGLDrawableFactory)factory).getOrCreateSharedResourceImpl(config.getScreen().getDevice());
if (DEBUG) {
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java
index c65ed084d..7371b0f3b 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java
@@ -748,24 +748,24 @@ public class FixedFuncPipeline {
if( !gl.getContext().isCPUDataSourcingAvail() ) {
throw new GLException("CPU data sourcing n/a w/ "+gl.getContext());
}
- if( GL.GL_POINTS != mode ) {
+ // if( GL.GL_POINTS != mode ) {
((GLES2)gl).glDrawElements(mode, count, type, indices);
- } else {
+ /* } else {
// FIXME GL_POINTS !
((GLES2)gl).glDrawElements(mode, count, type, indices);
- }
+ } */
}
}
public void glDrawElements(final GL2ES2 gl, final int mode, final int count, final int type, final long indices_buffer_offset) {
validate(gl, true);
if ( GL2GL3.GL_QUADS == mode && !gl.isGL2() ) {
throw new GLException("Cannot handle indexed QUADS on !GL2 w/ VBO due to lack of CPU index access");
- } else if( GL.GL_POINTS != mode ) {
- // FIXME GL_POINTS !
+ } else /* if( GL.GL_POINTS != mode ) */ {
gl.glDrawElements(mode, count, type, indices_buffer_offset);
- } else {
+ } /* else {
+ // FIXME GL_POINTS !
gl.glDrawElements(mode, count, type, indices_buffer_offset);
- }
+ } */
}
private final int textureEnabledCount() {
diff --git a/src/newt/classes/jogamp/newt/MonitorModeProps.java b/src/newt/classes/jogamp/newt/MonitorModeProps.java
index 0fc0da9bc..6e376ce48 100644
--- a/src/newt/classes/jogamp/newt/MonitorModeProps.java
+++ b/src/newt/classes/jogamp/newt/MonitorModeProps.java
@@ -163,9 +163,8 @@ public class MonitorModeProps {
}
/** WARNING: must be synchronized with ScreenMode.h, native implementation */
- private static SurfaceSize streamInSurfaceSize(final DimensionImmutable resolution, final int[] sizeProperties, int offset) {
- final SurfaceSize surfaceSize = new SurfaceSize(resolution, sizeProperties[offset++]);
- return surfaceSize;
+ private static SurfaceSize streamInSurfaceSize(final DimensionImmutable resolution, final int[] sizeProperties, final int offset) {
+ return new SurfaceSize(resolution, sizeProperties[offset]);
}
/** WARNING: must be synchronized with ScreenMode.h, native implementation */
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index c9a5d9277..68d3e93d6 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -3069,11 +3069,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
* </p>
*/
protected void consumePointerEvent(MouseEvent pe) {
- int x = pe.getX();
- int y = pe.getY();
-
if(DEBUG_MOUSE_EVENT) {
- System.err.println("consumePointerEvent.in: "+pe+", "+pState0+", pos "+x+"/"+y+", win["+getX()+"/"+getY()+" "+getWidth()+"x"+getHeight()+
+ System.err.println("consumePointerEvent.in: "+pe+", "+pState0+", pos "+pe.getX()+"/"+pe.getY()+", win["+getX()+"/"+getY()+" "+getWidth()+"x"+getHeight()+
"], pixel["+getSurfaceWidth()+"x"+getSurfaceHeight()+"]");
}
@@ -3098,8 +3095,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
// Fall through intended !
case MouseEvent.EVENT_MOUSE_ENTERED:
// clip coordinates to window dimension
- x = Math.min(Math.max(x, 0), getSurfaceWidth()-1);
- y = Math.min(Math.max(y, 0), getSurfaceHeight()-1);
+ // final int pe_x = Math.min(Math.max(pe.getX(), 0), getSurfaceWidth()-1);
+ // final int pe_y = Math.min(Math.max(pe.getY(), 0), getSurfaceHeight()-1);
pState0.clearButton();
if( eventType == MouseEvent.EVENT_MOUSE_ENTERED ) {
insideSurface = true;
@@ -3122,20 +3119,22 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
// Fall through intended !
default:
- insideSurface = x >= 0 && y >= 0 && x < getSurfaceWidth() && y < getSurfaceHeight();
+ final int pe_x = pe.getX();
+ final int pe_y = pe.getY();
+ insideSurface = pe_x >= 0 && pe_y >= 0 && pe_x < getSurfaceWidth() && pe_y < getSurfaceHeight();
if( pe.getPointerType(0) == PointerType.Mouse ) {
if( !pState0.insideSurface && insideSurface ) {
// ENTER .. use clipped coordinates
eEntered = new MouseEvent(MouseEvent.EVENT_MOUSE_ENTERED, pe.getSource(), pe.getWhen(), pe.getModifiers(),
- Math.min(Math.max(x, 0), getSurfaceWidth()-1),
- Math.min(Math.max(y, 0), getSurfaceHeight()-1),
- (short)0, (short)0, pe.getRotation(), pe.getRotationScale());
+ Math.min(Math.max(pe_x, 0), getSurfaceWidth()-1),
+ Math.min(Math.max(pe_y, 0), getSurfaceHeight()-1),
+ (short)0, (short)0, pe.getRotation(), pe.getRotationScale());
pState0.exitSent = false;
} else if( !insideSurface && eExitAllowed ) {
// EXIT .. use clipped coordinates
eExited = new MouseEvent(MouseEvent.EVENT_MOUSE_EXITED, pe.getSource(), pe.getWhen(), pe.getModifiers(),
- Math.min(Math.max(x, 0), getSurfaceWidth()-1),
- Math.min(Math.max(y, 0), getSurfaceHeight()-1),
+ Math.min(Math.max(pe_x, 0), getSurfaceWidth()-1),
+ Math.min(Math.max(pe_y, 0), getSurfaceHeight()-1),
(short)0, (short)0, pe.getRotation(), pe.getRotationScale());
pState0.exitSent = true;
}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTGearsES2Activity.java b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2Activity.java
index eff2c876a..25eb25892 100644
--- a/src/test/com/jogamp/opengl/test/android/NEWTGearsES2Activity.java
+++ b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2Activity.java
@@ -102,7 +102,7 @@ public class NEWTGearsES2Activity extends NewtBaseActivity {
System.err.println("MemoryHog: ****** +4k: "+osizeMB+" MB +"+nsizeMB+" MB - Done");
try {
Thread.sleep(500);
- } catch (final Exception e) {};
+ } catch (final Exception e) { e.printStackTrace(); };
}
} }, "MemoryHog").start();
} else if( e.getPointerCount() == 4 ) {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestMainVersionGLCanvasAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestMainVersionGLCanvasAWT.java
index 5f5053089..6395c1446 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestMainVersionGLCanvasAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestMainVersionGLCanvasAWT.java
@@ -43,7 +43,7 @@ public class TestMainVersionGLCanvasAWT extends UITestCase {
@Test
public void testMain() throws InterruptedException {
- GLCanvas.main(null);
+ GLCanvas.main(new String[0]);
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2AWT3.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2AWT3.java
index a0662f862..a5b5653c0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2AWT3.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2AWT3.java
@@ -207,11 +207,7 @@ public class TestSharedContextVBOES2AWT3 extends UITestCase {
javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
try {
- if( destroyCleanOrder ) {
- f2.dispose();
- } else {
- f2.dispose();
- }
+ f2.dispose();
} catch (final Throwable t) {
throw new RuntimeException(t);
}
@@ -365,11 +361,7 @@ public class TestSharedContextVBOES2AWT3 extends UITestCase {
javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
try {
- if( destroyCleanOrder ) {
- f2.dispose();
- } else {
- f2.dispose();
- }
+ f2.dispose();
} catch (final Throwable t) {
throw new RuntimeException(t);
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java
index 50d16db1b..0d1191528 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java
@@ -643,20 +643,12 @@ public class MovieSimple implements GLEventListener {
// left-top
ib.put(verts[0]); ib.put(verts[4]); ib.put(verts[2]);
- if( hasEffect(EFFECT_GRADIENT_BOTTOM2TOP) ) {
- ib.put( 1); ib.put( 1); ib.put( 1); ib.put(alpha);
- } else {
- ib.put( 1); ib.put( 1); ib.put( 1); ib.put(alpha);
- }
+ ib.put( 1); ib.put( 1); ib.put( 1); ib.put(alpha);
ib.put( tc.left() *ss); ib.put( tc.top() *ts);
// right-top
ib.put(verts[3]); ib.put(verts[4]); ib.put(verts[2]);
- if( hasEffect(EFFECT_GRADIENT_BOTTOM2TOP) ) {
- ib.put( 1); ib.put( 1); ib.put( 1); ib.put(alpha);
- } else {
- ib.put( 1); ib.put( 1); ib.put( 1); ib.put(alpha);
- }
+ ib.put( 1); ib.put( 1); ib.put( 1); ib.put(alpha);
ib.put( tc.right() *ss); ib.put( tc.top() *ts);
}
interleavedVBO.seal(gl, true);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java
index fa8406fa2..32e0be3e1 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java
@@ -149,15 +149,15 @@ public class GLSLMiscHelper {
validateGLArrayDataServerState(gl, st, vDataArray);
return vDataArray;
}
- public static float[] vertices0 = new float[] { -2f, 2f, 0f,
- 2f, 2f, 0f,
- -2f, -2f, 0f,
- 2f, -2f, 0f };
+ public static final float[] vertices0 = new float[] { -2f, 2f, 0f,
+ 2f, 2f, 0f,
+ -2f, -2f, 0f,
+ 2f, -2f, 0f };
- public static float[] vertices1 = new float[] { -2f, 1f, 0f,
- 2f, 1f, 0f,
- -2f, -1f, 0f,
- 2f, -1f, 0f };
+ public static final float[] vertices1 = new float[] { -2f, 1f, 0f,
+ 2f, 1f, 0f,
+ -2f, -1f, 0f,
+ 2f, -1f, 0f };
public static GLArrayDataServer createColors(final GL2ES2 gl, final ShaderState st, final int shaderProgram, final int location, final float[] colors) {
if(null != st && 0 != shaderProgram) {
@@ -194,14 +194,14 @@ public class GLSLMiscHelper {
validateGLArrayDataServerState(gl, st, cDataArray);
return cDataArray;
}
- public static float[] colors0 = new float[] { 1f, 0f, 0f, 1f,
- 0f, 0f, 1f, 1f,
- 1f, 0f, 0f, 1f,
- 1f, 0f, 1f, 1f };
+ public static final float[] colors0 = new float[] { 1f, 0f, 0f, 1f,
+ 0f, 0f, 1f, 1f,
+ 1f, 0f, 0f, 1f,
+ 1f, 0f, 1f, 1f };
- public static float[] colors1 = new float[] { 1f, 0f, 1f, 1f,
- 0f, 1f, 0f, 1f,
- 1f, 0f, 1f, 1f,
- 1f, 0f, 1f, 1f };
+ public static final float[] colors1 = new float[] { 1f, 0f, 1f, 1f,
+ 0f, 1f, 0f, 1f,
+ 1f, 0f, 1f, 1f,
+ 1f, 0f, 1f, 1f };
}
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom1.java b/src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom1.java
index acc53b2f9..2b6356e14 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom1.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom1.java
@@ -33,10 +33,10 @@ import com.jogamp.newt.event.*;
class WindowEventCom1 extends WindowAdapter {
public void windowResized(final WindowEvent e) {
- e.setAttachment(new String("WindowEventCom1.windowResized: "+e));
+ e.setAttachment("WindowEventCom1.windowResized: "+e);
}
public void windowMoved(final WindowEvent e) {
- e.setAttachment(new String("WindowEventCom1.windowMoved: "+e));
+ e.setAttachment("WindowEventCom1.windowMoved: "+e);
}
}
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom2.java b/src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom2.java
index e563e768f..bc0415756 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom2.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/WindowEventCom2.java
@@ -35,13 +35,13 @@ class WindowEventCom2 extends WindowAdapter {
public void windowResized(final WindowEvent e) {
final String str = (String) e.getAttachment();
if(null==str) {
- e.setAttachment(new String("WindowEventCom2.windowResized: "+e));
+ e.setAttachment("WindowEventCom2.windowResized: "+e);
}
}
public void windowMoved(final WindowEvent e) {
final String str = (String) e.getAttachment();
if(null==str) {
- e.setAttachment(new String("WindowEventCom2.windowMoved: "+e));
+ e.setAttachment("WindowEventCom2.windowMoved: "+e);
}
}
}
diff --git a/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
index a1e2b19d3..c2b309cd7 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
@@ -273,7 +273,7 @@ public abstract class UITestCase {
System.err.println(preMessage+"> Press enter to continue");
try {
System.err.println(stdin.readLine());
- } catch (final IOException e) { }
+ } catch (final IOException e) { e.printStackTrace(); }
}
static final String unsupportedTestMsg = "Test not supported on this platform.";