Hacker News new | ask | show | jobs
by mrkeen 1300 days ago
I tried:

    @Test
    public void foo() {
        bar(null);
    }

    void bar(@NonNull String param) {
        System.out.println(param);
    }
All versions of that annotation let the null right through. I tried with:

    import lombok.NonNull;
    import javax.validation.constraints.NotNull;
    import io.micronaut.core.annotation.NonNull;
    import org.springframework.lang.NonNull;
    import reactor.util.annotation.NonNull;
1 comments