Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8338340

[TestBug] fix varargs parameter type warnings

XMLWordPrintable

    • b10

      A number of tests produce vararg parameter type warnings when enabled in Eclipse ("Inexact type match vararg arguments").

      Apparently, this would cause a build error in the main build. Is it disabled in tests (build.gradle:553)? Should we enable the warning/error in tests?

      ```
      Description Resource Location
      Type null of the last argument to method mouseClick(MouseButton...) doesn't exactly match the vararg parameter type. Cast to MouseButton[] to confirm the non-varargs invocation, or pass individual arguments of type MouseButton for a varargs invocation. RobotTest.java line 491
      Type null of the last argument to method mousePress(MouseButton...) doesn't exactly match the vararg parameter type. Cast to MouseButton[] to confirm the non-varargs invocation, or pass individual arguments of type MouseButton for a varargs invocation. RobotTest.java line 447
      Type null of the last argument to method mouseRelease(MouseButton...) doesn't exactly match the vararg parameter type. Cast to MouseButton[] to confirm the non-varargs invocation, or pass individual arguments of type MouseButton for a varargs invocation. RobotTest.java line 469
      Type String[] of the last argument to method format(String, Object...) doesn't exactly match the vararg parameter type. Cast to Object[] to confirm the non-varargs invocation, or pass individual arguments of type Object for a varargs invocation. FileReaderTest.java line 229
      ```

            kcr Kevin Rushforth
            angorya Andy Goryachev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: