Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use byte padding to avoid fields re-ordering on JDK 15 and above #3168

Merged
merged 12 commits into from
Aug 29, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ public void objectPadding() {
"error"
);

assertThat(paddingSizes).containsExactly(120L, 128L, 128L);
assertThat(paddingSizes).containsExactly(128L, 128L, 128L);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void shouldNotRemoveElementOnPeek() {

@Test
@Tag("slow")
void objectPadding() {
public void objectPadding() {
lantalex marked this conversation as resolved.
Show resolved Hide resolved
ClassLayout layout = ClassLayout.parseClass(SpscArrayQueue.class);

AtomicLong currentPaddingSize = new AtomicLong();
Expand Down Expand Up @@ -162,6 +162,6 @@ void objectPadding() {
"[padding]"
);

assertThat(paddingSizes).containsExactly(124L, 128L, 128L);
assertThat(paddingSizes).containsExactly(132L, 128L, 128L);
lantalex marked this conversation as resolved.
Show resolved Hide resolved
}
}