8289558: Need spec clarification of j.l.foreign.*Layout

Reviewed-by: psandoz, jvernee
This commit is contained in:
Maurizio Cimadamore 2022-07-07 09:08:09 +00:00
parent 8dd94a2c14
commit 889150b47a
5 changed files with 37 additions and 34 deletions

View file

@ -143,10 +143,9 @@ public final class GroupLayout extends AbstractLayout implements MemoryLayout {
if (!super.equals(other)) {
return false;
}
if (!(other instanceof GroupLayout g)) {
return false;
}
return kind.equals(g.kind) && elements.equals(g.elements);
return other instanceof GroupLayout otherGroup &&
kind == otherGroup.kind &&
elements.equals(otherGroup.elements);
}
/**