diff options
author | Sven Gothel <[email protected]> | 2014-07-08 21:09:30 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-08 21:09:30 +0200 |
commit | a41db57df54863566b0e286cd100bbbc5518eb7f (patch) | |
tree | fb82077e79f54ba2fcf4c77b42458572fd9995eb /src/jogl/classes/jogamp/opengl | |
parent | b740161d456c059d1b51029c603ce144eb2b2d44 (diff) |
Findbugs: Use <NumberType>.valueOf(..) instead of 'new <NumberType>(..)'
Diffstat (limited to 'src/jogl/classes/jogamp/opengl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/awt/Java2D.java | 10 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/jogl/classes/jogamp/opengl/awt/Java2D.java b/src/jogl/classes/jogamp/opengl/awt/Java2D.java index 86ca7650f..55212025d 100644 --- a/src/jogl/classes/jogamp/opengl/awt/Java2D.java +++ b/src/jogl/classes/jogamp/opengl/awt/Java2D.java @@ -387,8 +387,8 @@ public class Java2D { try { return (Rectangle) getOGLViewportMethod.invoke(null, new Object[] {g, - new Integer(componentWidth), - new Integer(componentHeight)}); + Integer.valueOf(componentWidth), + Integer.valueOf(componentHeight)}); } catch (final InvocationTargetException e) { throw new GLException(e.getTargetException()); } catch (final Exception e) { @@ -514,7 +514,7 @@ public class Java2D { checkCompatible(); try { - return ((Long) createOGLContextOnSurfaceMethod.invoke(null, new Object[] { g, new Long(shareCtx) })).longValue(); + return ((Long) createOGLContextOnSurfaceMethod.invoke(null, new Object[] { g, Long.valueOf(shareCtx) })).longValue(); } catch (final InvocationTargetException e) { throw new GLException(e.getTargetException()); } catch (final Exception e) { @@ -528,7 +528,7 @@ public class Java2D { checkCompatible(); try { - return ((Boolean) makeOGLContextCurrentOnSurfaceMethod.invoke(null, new Object[] { g, new Long(ctx) })).booleanValue(); + return ((Boolean) makeOGLContextCurrentOnSurfaceMethod.invoke(null, new Object[] { g, Long.valueOf(ctx) })).booleanValue(); } catch (final InvocationTargetException e) { throw new GLException(e.getTargetException()); } catch (final Exception e) { @@ -541,7 +541,7 @@ public class Java2D { checkCompatible(); try { - destroyOGLContextMethod.invoke(null, new Object[] { new Long(ctx) }); + destroyOGLContextMethod.invoke(null, new Object[] { Long.valueOf(ctx) }); } catch (final InvocationTargetException e) { throw new GLException(e.getTargetException()); } catch (final Exception e) { diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java index 66d3018fc..517ca72cc 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java @@ -156,7 +156,7 @@ public class WindowsAWTWGLGraphicsConfigurationFactory extends GLGraphicsConfigu for (int i = 0; i < configs.length; i++) { final GraphicsConfiguration gc = configs[i]; pfdIDs[i] = Win32SunJDKReflection.graphicsConfigurationGetPixelFormatID(gc); - pfdIDOSet.add(new Integer(pfdIDs[i])); + pfdIDOSet.add( Integer.valueOf(pfdIDs[i]) ); if(DEBUG) { System.err.println("AWT pfd["+i+"] "+pfdIDs[i]); } |