On Fri, 10 Nov 2023 07:19:42 GMT, Per Minborg <pminb...@openjdk.org> wrote:

> This PR proposes to use unnamed variables now that they have become available 
> in Java.
> 
> There is also a cosmetic cleanup making a switch rake smaller and where 
> variables are pre-calculated rather than spreading expressions around.

src/java.base/share/classes/jdk/internal/foreign/AbstractMemorySegmentImpl.java 
line 570:

> 568:                 case int[]    _ -> new HeapMemorySegmentImpl.OfInt(off, 
> base, len, readOnly, bufferScope);
> 569:                 case float[]  _ -> new 
> HeapMemorySegmentImpl.OfFloat(off, base, len, readOnly, bufferScope);
> 570:                 case long[]   _ ->  new 
> HeapMemorySegmentImpl.OfLong(off, base, len, readOnly, bufferScope);

Suggestion:

                case long[]   _ -> new HeapMemorySegmentImpl.OfLong(off, base, 
len, readOnly, bufferScope);

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16594#discussion_r1390729188

Reply via email to