Hacker News new | ask | show | jobs
by nigerianbrince 1301 days ago

    @NonNull
    Optional<@NonNull String> getMiddleName() {
        return null; // error
    }
1 comments

Or even just setting the default to non-nullable with any static analysis checker.