On Wed, 22 May 2024 21:03:57 GMT, Jorn Vernee <jver...@openjdk.org> wrote:

>> Maurizio Cimadamore has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Fix typo in javadoc
>
> src/java.base/share/classes/java/lang/invoke/X-VarHandleSegmentView.java.template
>  line 123:
> 
>> 121:     static $type$ get(VarHandle ob, Object obb, long base) {
>> 122:         VarHandleSegmentViewBase handle = (VarHandleSegmentViewBase)ob;
>> 123:         AbstractMemorySegmentImpl bb = checkReadOnly(obb, true);
> 
> For getter methods, which pass a constant `true` here, `checkReadOnly` 
> essentially just does a null check and cast on the segment. Not sure if it's 
> worth simplifying... (I'm happy if you want to leave it like this as well)

I'll leave it for now. There's always a trade-off with these generated 
templates...

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19251#discussion_r1618694460

Reply via email to