fix test errors for openjdk