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
  • From: Lukas Jungmann <lukas.jungmann@xxxxxxxxxx>
  • Date: Tue, 26 Apr 2022 11:58:02 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eGCQWhaP3ovIHVCM0HTzR/CW20MdGDhyvEWZdpDwmx4=; b=Tew5fHrgiQPwmWuibz5LeDLUGeg3oKaIwPeRVOcmRZP/baapfC+eK6QYEm8IT4MmghK5A1DpfBVAdUU1lhjDIUDlx+3UugOOK30P/CKmJj4yc+2uKF2RasRNHnzqxLm1Zj3Eeiskf/Mz1xZ8FsVxeyVBInDsoenwACpNfXQzX1TxIcXQgNrQKK4Xu23y6cEwzjTDxEBecukxlwGGlSBHvgAcwetPs9B2vmT4sECR0jTLQ6iCgeipGjX+8XZxc+1AoOc3c7fSjT4XWgY4OOgAUsxD7pJCMSa9ZwV35IrjqeWyRVMfObNhdgQlooeUYwgaSiDlzVOxIRy6KsKg/fB3ww==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wg9WX4maC7EJpFYxjKm3lfO2n1NrtQYYiL1u0kcI2qLec8BBijPanmfxhM5TUqH1B1a7JFz8x90isQ2BFrAnUdgckBR0iQRn+RcoX7IPJmv6N9J5d4tf3EcBGDakysFqZ+UpnoM2E16B8qHTNK50+ubStoMFN2kUg2fFtxty/35OWqhIr7jSCe7QkAYGR1kbe4HSUHYB0TLLh7ryq8BftlqbpyShcbW5Atbh7Uz52ugzex8Lw4Mjg0q3tQa6Eig8tzCupN99IYEcGOPRWxN8ou0a1obxmuxJnRGUtwGRfvkrUo4przIhAllIMQ319HrkyC4JBdDOUZBP5zx4ztxGmw==
  • Delivered-to: ca-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/ca-dev/>
  • List-help: <mailto:ca-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/ca-dev>, <mailto:ca-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/ca-dev>, <mailto:ca-dev-request@eclipse.org?subject=unsubscribe>
  • User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.8.1

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.

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$



Back to the top