On Fri, 19 Jul 2024 22:30:00 GMT, ExE Boss <d...@openjdk.org> wrote:

>> Adam Sotona has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   nit change
>
> src/java.base/share/classes/jdk/internal/classfile/impl/ClassFileImpl.java 
> line 138:
> 
>> 136:             return VerifierImpl.verify(model, 
>> classHierarchyResolverOption().classHierarchyResolver(), null);
>> 137:         } catch (IllegalArgumentException verifierInitializationError) {
>> 138:             return List.of(new 
>> VerifyError(verifierInitializationError.getMessage()));
> 
> Note that the list returned by `VerifierImpl.verify(…)` is mutable, whereas 
> `List.of(…)` is unmodifiable.

Good observation; we should check that all collection-returning APIs in 
ClassFile API are immutable.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20241#discussion_r1685246312

Reply via email to