I upgraded Gradle to 8.8, and Spotless no longer finds any violations with openjdk21.
However, I'm seeing several test failures due to Mockito being unable to mock certain standard library classes. It seems that for some strange reason, mockito-inline in the central maven repo is stuck on 5.2.0...