1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
// Test case for Issue 366:
// https://github.com/typetools/checker-framework/issues/366
// but amended for Issue 1098:
// https://github.com/typetools/checker-framework/issues/1098
import java.util.Optional;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
class Issue366 {
static Optional<@NonNull String> getPossiblyEmptyString() {
return Optional.ofNullable(null);
}
static Optional<@Nullable String> getPossiblyEmptyString2() {
return Optional.ofNullable(null);
}
}
|