Mercurial > hg > truffle
changeset 16234:32b829303ff2
fixed issue discovered by findbugs
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 25 Jun 2014 17:58:51 +0200 |
parents | 68fb8e4d8043 |
children | 0aac7ed51b12 |
files | graal/com.oracle.graal.printer/src/com/oracle/graal/printer/NoDeadCodeVerifyHandler.java |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/NoDeadCodeVerifyHandler.java Wed Jun 25 17:40:15 2014 +0200 +++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/NoDeadCodeVerifyHandler.java Wed Jun 25 17:58:51 2014 +0200 @@ -60,6 +60,7 @@ if (NDCV.getValue() != OFF) { StructuredGraph graph = extract(StructuredGraph.class, object); BasePhase<?> phase = extract(BasePhase.class, context); + assert phase != null : "a Phase context is required by " + getClass().getSimpleName(); if (graph != null) { List<Node> before = graph.getNodes().snapshot(); new DeadCodeEliminationPhase().run(graph); @@ -70,7 +71,7 @@ if (discovered.put(phase.getClass(), Boolean.TRUE) == null) { String message = extract(String.class, context); String prefix = message == null ? "" : message + ": "; - String phaseClass = phase == null ? null : phase.getClass().getName(); + String phaseClass = phase.getClass().getName(); GraalInternalError error = new GraalInternalError("%sfound dead nodes in %s (phase class=%s): %s", prefix, graph, phaseClass, before); if (NDCV.getValue() == INFO) { System.out.println(error.getMessage());