Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7903002

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • None
    • 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

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

              Created:
              Updated:
              Resolved: