diff graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/SinglePassNodeIterator.java @ 15650:034a5acbae14

[single-pass-iter] same check formulated differently so as to appease findbugs
author Miguel Garcia <miguel.m.garcia@oracle.com>
date Wed, 14 May 2014 19:11:16 +0200
parents 9c9bb06a6b83
children c88ab4f1f04a
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/SinglePassNodeIterator.java	Wed May 14 18:55:01 2014 +0200
+++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/SinglePassNodeIterator.java	Wed May 14 19:11:16 2014 +0200
@@ -123,7 +123,13 @@
          * @return true iff this instance is internally consistent (ie, its "representation is OK")
          */
         private boolean repOK() {
-            return (node instanceof MergeNode && stateOnEntry == null) || (stateOnEntry != null);
+            if (node == null) {
+                return false;
+            }
+            if (node instanceof MergeNode) {
+                return stateOnEntry == null;
+            }
+            return (stateOnEntry != null);
         }
     }