jakartaee / common-annotations-api

Jakarta Annotations
https://eclipse.org/ee4j/ca
Other
53 stars 40 forks source link

Add Nullable and NotNull annotations #89

Closed tomas-langer closed 3 years ago

tomas-langer commented 3 years ago

It would be great to include at least @Nullable and @NotNull annotations in the specification.

Ladicek commented 3 years ago

There's a PR for the whole JSR-305 already (#5), though looking at that, it seems quite complex and perhaps even somewhat overlapping with Jakarta Bean Validation. I'm a simple man, I'd really like to have just @Nullable and @NonNull :-)

(Funny thing is that there are at least 3 common spellings of the latter: @Nonnull, @NonNull, @NotNull.)

tomas-langer commented 3 years ago

I have gone with the Nonnull spelling, as that is what is quite often used by the jsr-305 builds by various tools.

scottmarlow commented 3 years ago

Is there a 2.1 SPEC API release planned for the Jakarta EE 10 release? https://jakarta.ee/specifications/annotations/ does not list 2.1 and https://eclipse-ee4j.github.io/jakartaee-platform/jakartaee10/JakartaEE10ReleasePlan lists 2.0 currently.

I first heard about 2.1 in a comment entered in TCK Coordination spreadsheet https://docs.google.com/spreadsheets/d/146JPntf-16sBLuSJDjuuTR8oosz-BfEE1x1TcP9Ode4/edit?disco=AAAAQnrxEwM

Also note that https://docs.google.com/spreadsheets/d/1YTUpfdLZZrk2_UGwoX2w0seOCueRO3sQJIjWxpDAa7g/edit?pli=1#gid=35969432 lists the SPEC APIs to be considered for EE 10 release but I also do not see a new release of Jakarta Annotations mentioned there.

Ladicek commented 3 years ago

Ah we absolutely need 2.1 to happen for CDI 4.0. Not because of this change, but because of #87.

m0mus commented 3 years ago

Yes, we planning to release 2.1 for Jakarta EE 10.

kevinb9n commented 2 years ago

I realize this is already done, but I wanted to make anyone still seeing this aware of the JSpecify project, http://jspecify.org.

We've been working hard on very precisely specified nullness annotations, with consensus from major tool vendors who will work toward supporting those semantics.