From a41db57df54863566b0e286cd100bbbc5518eb7f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 8 Jul 2014 21:09:30 +0200 Subject: Findbugs: Use .valueOf(..) instead of 'new (..)' --- .../classes/com/jogamp/nativewindow/swt/SWTAccessor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nativewindow/classes/com') 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 }); } } }); -- cgit v1.2.3