On Wed, 21 Jan 2026 16:07:23 GMT, Maurizio Cimadamore <[email protected]> 
wrote:

>> 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
>
> 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?

I think the old code tries to avoid defensive copy of `argTypes` to save some 
resources.

> 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" ?

This is a "bad" class signature; class signature is `superclass [interfaces]` 
so this is using a `!` type in a superclass.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1933#discussion_r2713303450
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1933#discussion_r2713299796

Reply via email to