IDEA-164016 Replace Optional.isPresent() checks with functional-style expressions fix produces non-compilable code

This commit is contained in:
Tagir Valeev
2016-11-21 14:47:02 +07:00
parent f60c60c661
commit 3fa339e3dd
2 changed files with 15 additions and 5 deletions
@@ -0,0 +1,11 @@
// "Replace Optional.isPresent() condition with functional style expression" "false"
import java.util.*;
public class Main {
public void testOptional(Optional<String> str) {
if (str.isPrese<caret>nt()) {
str.get();
}
}
}