Mercurial > hg > graal-compiler
changeset 23265:1239452bbde2
Use isPresent with Optional type
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Tue, 05 Jan 2016 17:06:06 -0800 |
parents | c95a2eaf97e1 |
children | f78e658f5c43 |
files | graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/GraphChangeMonitoringPhase.java |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/GraphChangeMonitoringPhase.java Tue Jan 05 17:05:35 2016 -0800 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/GraphChangeMonitoringPhase.java Tue Jan 05 17:06:06 2016 -0800 @@ -81,7 +81,7 @@ * Ignore LogicConstantNode since those are sometimes created and deleted as part of running * a phase. */ - if (listener.getNodes().stream().filter(e -> !(e instanceof LogicConstantNode)).findFirst().get() != null) { + if (listener.getNodes().stream().filter(e -> !(e instanceof LogicConstantNode)).findFirst().isPresent()) { /* rerun it on the real graph in a new Debug scope so Dump and Log can find it. */ listener = new HashSetNodeEventListener(); try (NodeEventScope s = graph.trackNodeEvents(listener)) {