RFR: CODETOOLS-7902853: JMH: Fix lint and deprecation warnings

Niels Basjes github.com+240096+nielsbasjes at openjdk.java.net
Tue Mar 23 20:20:55 UTC 2021


On Mon, 15 Mar 2021 11:58:43 GMT, Niels Basjes <github.com+240096+nielsbasjes at openjdk.org> wrote:

>> Right. There are also three other places where these casts happen, grep for `new BenchmarkTaskResult` in the same file. I would also need to check how to regression-test this...
>
> Yes, I see them.
> I'll try to see what happens if I simply add the -Werror to the entire build, that is essentially what happens in my project.
> Note: I have submitted the OCA this morning; apparently this takes time.

I did some checks and tests.

I reverted my change (locally) and added `-Werror` to the compiler on the `jmh-core-it` which did not cause the same fail I have.

My best guess at this moment is that it is related to my project using Java 8 and 11, and this project explicitly uses java 1.7.

Also I get a (correct) warning about the usage of `Unsafe` (used to cause a segmentation fault in a test) which I was unsuccessful in suppressing.

Also in all of the three other situations the input field is a `double` that is then cast to a `long`, which seems fine to me.

-------------

PR: https://git.openjdk.java.net/jmh/pull/31


More information about the jmh-dev mailing list