google / caliper

Micro-benchmarking library for Java
Apache License 2.0
816 stars 109 forks source link

Check for problems with ByteBuffer covariant return types when building with JDK 9+ #432

Open cpovirk opened 4 years ago

cpovirk commented 4 years ago

Caliper uses ByteBuffer, so building it with JDK 9+ may make it fail at runtime under Java 8 or lower, similar to:

But I haven't checked any more detail than that.

cpovirk commented 4 years ago

Probably at least one affected line:

https://github.com/google/caliper/blob/f1e9f00db3233914056d168e9bded0d84fb73e59/caliper-util/src/main/java/com/google/caliper/util/Uuids.java#L41

cpovirk commented 2 years ago

(#458 will fix the current error, but I'll leave this open to track automatically detecting any future such problems.)