DFA Optional.orElse handling improved (splitting states)

This commit is contained in:
Tagir Valeev
2017-03-27 13:18:00 +07:00
parent 58dc190a9d
commit a03fffe024
2 changed files with 13 additions and 4 deletions
@@ -42,4 +42,11 @@ class OptionalOrElse {
return "";
}
}
void isPresentCheck(Optional<String> opt) {
String result = opt.orElse(null);
if(<warning descr="Condition 'result == null && opt.isPresent()' is always 'false'">result == null && <warning descr="Condition 'opt.isPresent()' is always 'false' when reached">opt.isPresent()</warning></warning>) {
System.out.println("Impossible");
}
}
}