JMH: StrictFP tests fail with JDK 17+ due to new warnings

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: tools
    • None
    • jmh

      Fails like this:

      @BenchmarkMode(Mode.All)
      public strictfp class StrictFPClassTest {

          @Benchmark
          public void test() {
              // intentionally blank
          }

          @Test
          public void compileTest() {
              CompileTest.assertOK(this.getClass());
          }

      }
      WARNING at line 34: as of release 17, all floating-point expressions are evaluated strictly and 'strictfp' is not required
      WARNING at line 34: as of release 17, all floating-point expressions are evaluated strictly and 'strictfp' is not required
      WARNING at line 34: as of release 17, all floating-point expressions are evaluated strictly and 'strictfp' is not required
      WARNING at line 34: as of release 17, all floating-point expressions are evaluated strictly and 'strictfp' is not required
      ERROR at line -1: warnings found and -Werror specified

            Assignee:
            Aleksey Shipilev
            Reporter:
            Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: