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/nativewindow/classes | |
parent | b740161d456c059d1b51029c603ce144eb2b2d44 (diff) |
Findbugs: Use <NumberType>.valueOf(..) instead of 'new <NumberType>(..)'
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r-- | src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java | 8 | ||||
-rw-r--r-- | src/nativewindow/classes/jogamp/nativewindow/jawt/windows/Win32SunJDKReflection.java | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java index 6c63fc08d..d29e2abbc 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java @@ -228,9 +228,9 @@ public class SWTAccessor { private static Number getIntOrLong(final long arg) { if(swt_uses_long_handles) { - return new Long(arg); + return Long.valueOf(arg); } - return new Integer((int) arg); + return Integer.valueOf((int) arg); } private static void callStaticMethodL2V(final Method m, final long arg) { @@ -453,9 +453,9 @@ public class SWTAccessor { @Override public void run() { if(swt_uses_long_handles) { - ReflectionUtil.callMethod(swtControl, swt_control_internal_dispose_GC, new Object[] { new Long(gc), gcData }); + ReflectionUtil.callMethod(swtControl, swt_control_internal_dispose_GC, new Object[] { Long.valueOf(gc), gcData }); } else { - ReflectionUtil.callMethod(swtControl, swt_control_internal_dispose_GC, new Object[] { new Integer((int)gc), gcData }); + ReflectionUtil.callMethod(swtControl, swt_control_internal_dispose_GC, new Object[] { Integer.valueOf((int)gc), gcData }); } } }); diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/Win32SunJDKReflection.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/Win32SunJDKReflection.java index ce39db79c..5d191f7e5 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/Win32SunJDKReflection.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/Win32SunJDKReflection.java @@ -89,7 +89,7 @@ public class Win32SunJDKReflection { } try { - return (GraphicsConfiguration) win32GraphicsConfigGetConfigMethod.invoke(null, new Object[] { device, new Integer(pfdID) }); + return (GraphicsConfiguration) win32GraphicsConfigGetConfigMethod.invoke(null, new Object[] { device, Integer.valueOf(pfdID) }); } catch (final Exception e) { return null; } |