[foreign-memaccess+abi] RFR: 8293510: Code style issues in the foreign API [v2]

Per Minborg duke at openjdk.org
Mon Sep 19 09:55:15 UTC 2022


On Fri, 16 Sep 2022 15:44:42 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/foreign/AbstractMemorySegmentImpl.java line 77:
>> 
>>> 75: 
>>> 76:     @ForceInline
>>> 77:     AbstractMemorySegmentImpl(long length,
>> 
>> Here I'm a bit puzzled. Looking at other JDK code, I don't see this rule being applied consistently. I think I'm ok with breaking up long parameter lists (an example of that below) - but doing that for all method decls seems a bit too much IMHO.
>
> Agree, we should follow the style used in the rest of the jdk code, at least in java.base.

The principle used in this PR is the same as in `java.util.stream.Stream` where methods with 0 <= x <= 2 parameters are on the same line and methods with > 2 parameters are on separate vertical lines.

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

PR: https://git.openjdk.org/panama-foreign/pull/721


More information about the panama-dev mailing list