RFR: 8323707: Adjust Classfile API's type arg model to better represent the embodied type

ExE Boss duke at openjdk.org
Sun Jan 14 16:33:37 UTC 2024


On Mon, 6 Nov 2023 07:30:41 GMT, Chen Liang <liach at openjdk.org> wrote:

> API changes as discussed on the mailing list: https://mail.openjdk.org/pipermail/classfile-api-dev/2023-November/000419.html
> 
> Additional questions:
> 1. Whether to rename `WildcardIndicator.DEFAULT` to `NONE`

src/java.base/share/classes/jdk/internal/classfile/Signature.java line 252:

> 250:         public static TypeArg.Bounded bounded(Bounded.WildcardIndicator wildcard, RefTypeSig boundType) {
> 251:             return new SignaturesImpl.TypeArgImpl(wildcard, boundType);
> 252:         }

Suggestion:

        public static TypeArg.Bounded bounded(Bounded.WildcardIndicator wildcard, RefTypeSig boundType) {
            requireNonNull(wildcard);
            requireNonNull(boundType);
            return new SignaturesImpl.TypeArgImpl(wildcard, boundType);
        }

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16517#discussion_r1405426776


More information about the core-libs-dev mailing list