On Wed, 18 Oct 2023 12:09:28 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> 
wrote:

>> src/java.base/share/classes/jdk/internal/foreign/layout/AbstractLayout.java 
>> line 47:
>> 
>>> 45: import java.util.Optional;
>>> 46: import java.util.Set;
>>> 47: import java.util.function.Function;
>> 
>> There are quite a few new imports here. Is it possible some imports in 
>> `MemoryLayout` are now unused?
>
> No unused import here - these are just the imports required for the overrides 
> to compile successfully.

I mean in `MemoryLayout` from which these overrides were moved.

>> src/java.base/share/classes/jdk/internal/foreign/layout/AbstractLayout.java 
>> line 153:
>> 
>>> 151:     }
>>> 152: 
>>> 153:     public long scale(long offset, long index) {
>> 
>> Could you add `@Override` to these as well? I think it makes it clearer that 
>> these methods might be accessed through a super type.
>
> Would be nice - but note that `AbstractLayoutImpl` does not extend 
> `MemoryLayout`.

Ah, right...

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16224#discussion_r1363762975
PR Review Comment: https://git.openjdk.org/jdk/pull/16224#discussion_r1363762381

Reply via email to