Skip to main content

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



On Tue, Apr 26, 2022 at 10:58 AM Lukas Jungmann <lukas.jungmann@xxxxxxxxxx> wrote:
On 4/26/22 11:41 AM, Emily Jiang via ca-dev wrote:
>
>
> On Mon, Apr 25, 2022 at 4:21 PM Lukas Jungmann
> <lukas.jungmann@xxxxxxxxxx <mailto:lukas.jungmann@xxxxxxxxxx>> wrote:
>
>     On 4/25/22 4:12 PM, Emily Jiang via ca-dev wrote:
>      > Thank you Lukas!
>      > The annotation is not only for static analysis but also for
>     runtime as
>      > stated here
>      >
>     https://github.com/eclipse-ee4j/common-annotations-api/blob/master/spec/src/main/asciidoc/spec.adoc#jakartaannotationnonnull
>     <https://urldefense.com/v3/__https://github.com/eclipse-ee4j/common-annotations-api/blob/master/spec/src/main/asciidoc/spec.adoc*jakartaannotationnonnull__;Iw!!ACWV5N9M2RV99hQ!M26hjUIyRWCMXyadzfbBI1lbsfxdeM-OzB9e0NzaVTUXKUtSf9Zge4BdLMZmTCU2Sv0NVrpMVV4BfK4xQKE$>
>
>      >
>     <https://urldefense.com/v3/__https://github.com/eclipse-ee4j/common-annotations-api/blob/master/spec/src/main/asciidoc/spec.adoc*jakartaannotationnonnull__;Iw!!ACWV5N9M2RV99hQ!MiTOoQKpccM6OIFgwvftvJWVPw93GGeIZyu-jekS98JL9YJ9O6O8MpjtgKJJkUea97EcsIoWhryp1nHaKNc$
>     <https://urldefense.com/v3/__https://github.com/eclipse-ee4j/common-annotations-api/blob/master/spec/src/main/asciidoc/spec.adoc*jakartaannotationnonnull__;Iw!!ACWV5N9M2RV99hQ!MiTOoQKpccM6OIFgwvftvJWVPw93GGeIZyu-jekS98JL9YJ9O6O8MpjtgKJJkUea97EcsIoWhryp1nHaKNc$>>
>      > For the runtime bit, I think we need to ensure implementors
>     implement
>      > this. Right?
>
>     If my Awesome Spec decides to define usage if this annotation, it
>     should
>     have the TCK to verify the behavior. Or are you trying to say that the
>     Annotations TCK has to have a test to verify the behavior of the
>     @Priority?
>
> This is not regarding @Priority as it was covered by CDI TCKs. As far as
> I know, I don't see any tests for Nonnull or Nullable covered anywhere.

The point is:
CDI defines the behavior of @Priority => it has a test
REST defines the behavior of @Priority => it has a test
XML WS defines the behaviour of @Resource => it has a test
no one (AFAIK) currently defines the behaviour of new annotations in any
context => no one has a test

if Annotation spec has to have a test(s) for @Null/@Nullable, then it
must also have test(s) for @Priority, @Resource and others.

There should be test coverage for all of the annotations defined. Some tests might live in a different place if the annotation was defined for that spec usage such as @Priority. In the @Nonnull and @Nullable case, since no other specs pull in, this spec needs to cover the tests for these annotations. This is clearly a gap.

Does this make sense?

thanks,
--lukas

>
>     thanks,
>     --lukas
>
>
>      > Thanks
>      > Emily
>      >
>      > On Mon, Apr 25, 2022 at 12:33 PM Lukas Jungmann
>      > <lukas.jungmann@xxxxxxxxxx <mailto:lukas.jungmann@xxxxxxxxxx>
>     <mailto:lukas.jungmann@xxxxxxxxxx
>     <mailto:lukas.jungmann@xxxxxxxxxx>>> wrote:
>      >
>      >     On 4/25/22 1:02 PM, Emily Jiang via ca-dev wrote:
>      >      > In Jakarta Common Annotations 2.1, the annotation @Notnull and
>      >     @Nullable
>      >      > were added to the specification via the issue 90
>      >      >
>      >   
>       <https://urldefense.com/v3/__https://github.com/eclipse-ee4j/common-annotations-api/pull/90/files__;!!ACWV5N9M2RV99hQ!NpP1EQQdUk20hOCJBPJOkqQ0WzPCXRCKCInrRfXh_1lBuDSViSvWRWc0CWe_EmAEr73KmttuljI_pOuua3A$ <https://urldefense.com/v3/__https://github.com/eclipse-ee4j/common-annotations-api/pull/90/files__;!!ACWV5N9M2RV99hQ!NpP1EQQdUk20hOCJBPJOkqQ0WzPCXRCKCInrRfXh_1lBuDSViSvWRWc0CWe_EmAEr73KmttuljI_pOuua3A$>
>      >   
>       <https://urldefense.com/v3/__https://github.com/eclipse-ee4j/common-annotations-api/pull/90/files__;!!ACWV5N9M2RV99hQ!NpP1EQQdUk20hOCJBPJOkqQ0WzPCXRCKCInrRfXh_1lBuDSViSvWRWc0CWe_EmAEr73KmttuljI_pOuua3A$ <https://urldefense.com/v3/__https://github.com/eclipse-ee4j/common-annotations-api/pull/90/files__;!!ACWV5N9M2RV99hQ!NpP1EQQdUk20hOCJBPJOkqQ0WzPCXRCKCInrRfXh_1lBuDSViSvWRWc0CWe_EmAEr73KmttuljI_pOuua3A$>>>.
>      >
>      >      >
>      >      >
>      >      > Normally for other annotations defined in Jakarta Common
>      >     Annotations,
>      >      > the implementations were provided by other specifications.
>      >
>      >     I do not think the statement applies to @Generated (which is
>     similar to
>      >     if not the same as javax.annotation.processing.Generated).
>      >     @Notnull/@Nullable are in the same group - they may be useful
>     to static
>      >     analysis tools and to improve code readability
>      >
>      >        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?
>      >
>      >     AFAIK there is only signature test available in Jakarta
>     Annotations
>      >     TCK[1]. Should your question be about ie @Priority - take the
>     spec
>      >     which
>      >     defines its usage and check its TCK (can be ie CDI, REST,..)
>      >
>      >     thanks,
>      >     --lukas
>      >
>      >     [1]:
>      >
>     https://download.eclipse.org/jakartaee/annotations/2.1/jakarta-annotations-tck-2.1.0.zip
>     <https://urldefense.com/v3/__https://download.eclipse.org/jakartaee/annotations/2.1/jakarta-annotations-tck-2.1.0.zip__;!!ACWV5N9M2RV99hQ!M26hjUIyRWCMXyadzfbBI1lbsfxdeM-OzB9e0NzaVTUXKUtSf9Zge4BdLMZmTCU2Sv0NVrpMVV4BpikUXP8$>
>      >   
>       <https://urldefense.com/v3/__https://download.eclipse.org/jakartaee/annotations/2.1/jakarta-annotations-tck-2.1.0.zip__;!!ACWV5N9M2RV99hQ!MiTOoQKpccM6OIFgwvftvJWVPw93GGeIZyu-jekS98JL9YJ9O6O8MpjtgKJJkUea97EcsIoWhryp6yfuU_U$ <https://urldefense.com/v3/__https://download.eclipse.org/jakartaee/annotations/2.1/jakarta-annotations-tck-2.1.0.zip__;!!ACWV5N9M2RV99hQ!MiTOoQKpccM6OIFgwvftvJWVPw93GGeIZyu-jekS98JL9YJ9O6O8MpjtgKJJkUea97EcsIoWhryp6yfuU_U$>>
>      >      >
>      >      > --
>      >      > Thanks
>      >      > Emily
>      >      >
>      >      >
>      >      > _______________________________________________
>      >      > ca-dev mailing list
>      >      > ca-dev@xxxxxxxxxxx <mailto:ca-dev@xxxxxxxxxxx>
>     <mailto:ca-dev@xxxxxxxxxxx <mailto:ca-dev@xxxxxxxxxxx>>
>      >      > To unsubscribe from this list, visit
>      >
>     https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/ca-dev__;!!ACWV5N9M2RV99hQ!NpP1EQQdUk20hOCJBPJOkqQ0WzPCXRCKCInrRfXh_1lBuDSViSvWRWc0CWe_EmAEr73KmttuljI_XDZ3jww$
>     <https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/ca-dev__;!!ACWV5N9M2RV99hQ!NpP1EQQdUk20hOCJBPJOkqQ0WzPCXRCKCInrRfXh_1lBuDSViSvWRWc0CWe_EmAEr73KmttuljI_XDZ3jww$>
>      >   
>       <https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/ca-dev__;!!ACWV5N9M2RV99hQ!NpP1EQQdUk20hOCJBPJOkqQ0WzPCXRCKCInrRfXh_1lBuDSViSvWRWc0CWe_EmAEr73KmttuljI_XDZ3jww$ <https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/ca-dev__;!!ACWV5N9M2RV99hQ!NpP1EQQdUk20hOCJBPJOkqQ0WzPCXRCKCInrRfXh_1lBuDSViSvWRWc0CWe_EmAEr73KmttuljI_XDZ3jww$>>
>      >
>      >     _______________________________________________
>      >     ca-dev mailing list
>      > ca-dev@xxxxxxxxxxx <mailto:ca-dev@xxxxxxxxxxx>
>     <mailto:ca-dev@xxxxxxxxxxx <mailto:ca-dev@xxxxxxxxxxx>>
>      >     To unsubscribe from this list, visit
>      > https://www.eclipse.org/mailman/listinfo/ca-dev
>     <https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/ca-dev__;!!ACWV5N9M2RV99hQ!M26hjUIyRWCMXyadzfbBI1lbsfxdeM-OzB9e0NzaVTUXKUtSf9Zge4BdLMZmTCU2Sv0NVrpMVV4BvauEL0M$>
>      >   
>       <https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/ca-dev__;!!ACWV5N9M2RV99hQ!MiTOoQKpccM6OIFgwvftvJWVPw93GGeIZyu-jekS98JL9YJ9O6O8MpjtgKJJkUea97EcsIoWhrypN42BF6E$ <https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/ca-dev__;!!ACWV5N9M2RV99hQ!MiTOoQKpccM6OIFgwvftvJWVPw93GGeIZyu-jekS98JL9YJ9O6O8MpjtgKJJkUea97EcsIoWhrypN42BF6E$>>
>      >
>      >
>      >
>      > --
>      > Thanks
>      > Emily
>      >
>      >
>      > _______________________________________________
>      > ca-dev mailing list
>      > ca-dev@xxxxxxxxxxx <mailto:ca-dev@xxxxxxxxxxx>
>      > To unsubscribe from this list, visit
>     https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/ca-dev__;!!ACWV5N9M2RV99hQ!MiTOoQKpccM6OIFgwvftvJWVPw93GGeIZyu-jekS98JL9YJ9O6O8MpjtgKJJkUea97EcsIoWhrypN42BF6E$
>     <https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/ca-dev__;!!ACWV5N9M2RV99hQ!MiTOoQKpccM6OIFgwvftvJWVPw93GGeIZyu-jekS98JL9YJ9O6O8MpjtgKJJkUea97EcsIoWhrypN42BF6E$>
>
>     _______________________________________________
>     ca-dev mailing list
>     ca-dev@xxxxxxxxxxx <mailto:ca-dev@xxxxxxxxxxx>
>     To unsubscribe from this list, visit
>     https://www.eclipse.org/mailman/listinfo/ca-dev
>     <https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/ca-dev__;!!ACWV5N9M2RV99hQ!M26hjUIyRWCMXyadzfbBI1lbsfxdeM-OzB9e0NzaVTUXKUtSf9Zge4BdLMZmTCU2Sv0NVrpMVV4BvauEL0M$>
>
>
>
> --
> Thanks
> Emily
>
>
> _______________________________________________
> ca-dev mailing list
> ca-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/ca-dev__;!!ACWV5N9M2RV99hQ!M26hjUIyRWCMXyadzfbBI1lbsfxdeM-OzB9e0NzaVTUXKUtSf9Zge4BdLMZmTCU2Sv0NVrpMVV4BvauEL0M$

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


--
Thanks
Emily


Back to the top