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

Per Minborg duke at openjdk.org
Mon Sep 19 09:34:57 UTC 2022


On Fri, 16 Sep 2022 10:36:31 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Per Minborg has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 15 commits:
>> 
>>  - Merge foreign-memaccess+abi
>>  - Fix import
>>  - Merge with foreign-memaccess+abi
>>  - Break out functionality into Utils
>>  - Reformat public interface declartions
>>  - Cleanup method parameters in internal classes
>>  - Cleanup method parameters in public classes
>>  - Rearrange code
>>  - Fix naming issue
>>  - Merge with foreign-memaccess+abi
>>  - ... and 5 more: https://git.openjdk.org/panama-foreign/compare/3e8ef17b...d8294460
>
> src/java.base/share/classes/java/lang/foreign/MemoryLayout.java line 282:
> 
>> 280:     }
>> 281: 
>> 282:     private static <Z> Z computePathOp(LayoutPath path,
> 
> I'm generally not too sure about this. Yes, if there's a lot of code it might be useful to move it out - but in this case it's a single method used in several other methods in this interface. Why is it bad to use a private static interface method for something like this?

ML is such a large file, it makes sense to move out as much as possible. The private method is an internal concern.

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

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


More information about the panama-dev mailing list