default Optional.empty for Optional type (IDEA-174268)

This commit is contained in:
Anna Kozlova
2017-06-14 17:07:38 +03:00
parent 79b15d7356
commit f60676d110
4 changed files with 32 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
// "Implement methods" "true"
import java.util.Optional;
interface I<T> {
Optional<T> foo();
}
class Impl implements I<String> {
@Override
public Optional<String> foo() {
return Optional.empty();
}
}

View File

@@ -0,0 +1,8 @@
// "Implement methods" "true"
import java.util.Optional;
interface I<T> {
Optional<T> foo();
}
class I<caret>mpl implements I<String> {
}