changeset 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 bfbbf69fc507
children ca2a8fe16037
files graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/SinglePassNodeIterator.java
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
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);
         }
     }