Enum.toString() is annotated as @NotNull in 2018.2 EAP

Answered

Enum.toString() is auto-annotated as @NotNull in 2018.2 EAP. The @NotNull/@Nullable inspections now reports that all overriding methods should be explicitly annotated with @NotNull. Is this intentional? I don't see any contract that Enum.toString() should not return null.

0

Please sign in to leave a comment.