From 815776c5760e42c8b3c858a9bab982b203c59c24 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 8 Jul 2014 21:13:15 +0200 Subject: Findbugs: Remove branches where reference cannot be null --- .../classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/jogl/classes/com/jogamp/gluegen') diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java index f082f358f..af7694ce1 100644 --- a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java +++ b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java @@ -186,8 +186,10 @@ public class BuildComposablePipeline { } try { + // Keep assignment w/ null comparison for clarification. + // If no exception is thrown, return value is always non-null; hasImmediateMode = - (classToComposeAround.getMethod("glBegin", new Class[]{Integer.TYPE}) != null); + null != classToComposeAround.getMethod("glBegin", new Class[]{Integer.TYPE}); } catch (final Exception e) { } @@ -388,7 +390,7 @@ public class BuildComposablePipeline { } } - if (null != baseInterfaceClass && !clazzList.contains(baseInterfaceClass)) { + if ( !clazzList.contains(baseInterfaceClass) ) { ifNames[i++] = baseInterfaceClass.getName(); clazzList.add(baseInterfaceClass); } -- cgit v1.2.3