diff options
author | Sven Gothel <[email protected]> | 2014-07-08 12:37:14 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-08 12:37:14 +0200 |
commit | b388a572c8ef9c971dbc16b89069429cc67c0928 (patch) | |
tree | 2e55e550c567f97c5936e3f593a9e8451a3e823c /src/newt | |
parent | 109e162a78ef5bab0a7481a8499ad1da48cea094 (diff) |
Findbugs: Remove redundant instanceof checks
Diffstat (limited to 'src/newt')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java | 3 | ||||
-rw-r--r-- | src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java | 5 |
2 files changed, 1 insertions, 7 deletions
diff --git a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java index 45db95520..72b3e43f3 100644 --- a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java +++ b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java @@ -111,9 +111,6 @@ public class JOGLNewtApplet1Run extends Applet { if(DEBUG) { System.err.println("JOGLNewtApplet1Run.init() START - "+currentThreadName()); } - if(!(this instanceof Container)) { - throw new RuntimeException("This Applet is not a AWT Container"); - } final Container container = this; String glEventListenerClazzName=null; diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java index 65d927157..a8105403d 100644 --- a/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java +++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java @@ -94,10 +94,7 @@ public class AWTWindowAdapter while( null != comp && !(comp instanceof java.awt.Window) ) { comp = comp.getParent(); } - if(comp instanceof java.awt.Window) { - return (java.awt.Window) comp; - } - return null; + return (java.awt.Window) comp; // either null or a 'java.awt.Window' } @Override |