work around scala/bug#11125
work around scala/bug#11125

this is for the Scala community build, where we want to be able
to build everything on JDK 11 to help test Scala

xuwei-k/scalacheck,rickynils/scalacheck