RFR: Classfile signature bang support [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Jan 21 16:12:22 UTC 2026
On Tue, 20 Jan 2026 21:23:41 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Support parsing ! signatures in ClassFile API.
>
> Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - Review, various cleanup
> - Merge branch 'bworld' of https://github.com/openjdk/valhalla into feature/cf-bang-sig
> - Classfile signature bang support
Looks good - I've left some doc notes and some test comments
src/java.base/share/classes/java/lang/classfile/Signature.java line 295:
> 293:
> 294: /**
> 295: * {@return a class or interface signature without an outer type}
Maybe we should say that, by default, the returned signature is NOT null marked?
src/java.base/share/classes/jdk/internal/classfile/impl/SignaturesImpl.java line 212:
> 210: boolean end = match(';');
> 211: if (end || match('.')) {
> 212: t = new ClassTypeSigImpl(RefTypeSig.NullMarker.UNSPECIFIED, Optional.ofNullable(t), className, null2Empty(argTypes));
Why not going through the `of` factory?
test/jdk/jdk/classfile/SignaturesTest.java line 409:
> 407: <:Ljava/lang/Object;>Ljava/lang/Object;
> 408: <>Ljava/lang/Object;
> 409: !Ljava/lang/Object;
Why is this "bad" ?
test/jdk/jdk/classfile/SignaturesTest.java line 411:
> 409: !Ljava/lang/Object;
> 410: Ljava/lang/Object;!Ljava/lang/Runnable;
> 411: <>Ljava/lang/Object;
This test line seems repeated? Or did you want to add a `!` here?
-------------
Marked as reviewed by mcimadamore (Committer).
PR Review: https://git.openjdk.org/valhalla/pull/1933#pullrequestreview-3688086862
PR Review Comment: https://git.openjdk.org/valhalla/pull/1933#discussion_r2713246252
PR Review Comment: https://git.openjdk.org/valhalla/pull/1933#discussion_r2713269249
PR Review Comment: https://git.openjdk.org/valhalla/pull/1933#discussion_r2713278798
PR Review Comment: https://git.openjdk.org/valhalla/pull/1933#discussion_r2713275824
More information about the valhalla-dev
mailing list