On Mon, 17 Apr 2023 20:33:26 GMT, Doug Simon <dnsi...@openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/vm/VMSupport.java line 234:
>> 
>>> 232:      * Encodes a list of annotations to a byte array. The byte array 
>>> can be decoded with {@link #decodeAnnotations(byte[], AnnotationDecoder)}.
>>> 233:      */
>>> 234:     public static byte[] encodeAnnotations(Collection<Annotation> 
>>> annotations) {
>> 
>> I don't think it matters much in this use case, but it looks like  
>> encodeAnnotations could be changed to take a List rather than a Collection, 
>> as the comment implies.
>
> Just above (line 228) you can see a call to this method where the argument 
> comes from `Map.values()` whose type is `Collection` so I'd prefer to leave 
> it as is rather than have to convert the argument to a `List`.

Just above (line 228) you can see a call to this method where the argument 
comes from `Map.values()` whose type is `Collection` so I'd prefer to leave it 
as is rather than have to convert the argument to a `List`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/12810#discussion_r1169240392

Reply via email to