diff --git a/java/java.hints/src/org/netbeans/modules/java/hints/introduce/ScanStatement.java b/java/java.hints/src/org/netbeans/modules/java/hints/introduce/ScanStatement.java index f6f6a0001a85..46e9ca835295 100644 --- a/java/java.hints/src/org/netbeans/modules/java/hints/introduce/ScanStatement.java +++ b/java/java.hints/src/org/netbeans/modules/java/hints/introduce/ScanStatement.java @@ -244,7 +244,7 @@ private boolean isMethodCode() { @Override public Void visitReturn(ReturnTree node, Void p) { - if ((isMethodCode() || isLambda) && phase == PHASE_INSIDE_SELECTION) { + if (isMethodCode() && phase == PHASE_INSIDE_SELECTION) { selectionExits.add(getCurrentPath()); hasReturns = true; }