Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jakartaee-platform-dev] Notnull and Nullable annotations on the Jakarta Annotation spec

Hi

Annotations are optional but I think it is not good to depend on an abandonned spec and strictly speaking, these annotations shouldnt be kept in the code (retention shouldnt be runtime, worse case CLASS as needed by the consuming tools).
That said, since it is not EE annotations but really SE annotations - EE only does not help since it will have holes in the nullability path which means the tools consuming these annotations can't deduce anything from it - so it should be kept off jakarta.annotations which is a runtime bundle and these annotations are not - even the javadoc explicitly states it - IMHO.
Last point is that it is quite misleading in ee-api bundle since bean validations does not know about that.

Hope it helps.

Romain Manni-Bucau
@rmannibucau |  Blog | Old BlogGithub | LinkedIn | Book


Le lun. 25 avr. 2022 à 13:03, Emily Jiang via jakartaee-platform-dev <jakartaee-platform-dev@xxxxxxxxxxx> a écrit :
In Jakarta Common Annotations 2.1, the annotation @Notnull and @Nullable were added to the specification via the issue 90

Normally for other annotations defined in Jakarta Common Annotations, the implementations were provided by other specifications. For the above new annotations, does it mean the implementation for common annotations needs to provide the implementation as I was not sure which specifications pull in these annotations? Does anyone know where the TCKs are for validating the implementation?

--
Thanks
Emily

_______________________________________________
jakartaee-platform-dev mailing list
jakartaee-platform-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev

Back to the top