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

Update usages of PassFailJFrame.Builder.rows

XMLWordPrintable

      It has become quite common to use the following code

      .rows((int) INSTRUCTIONS.lines().count() + 1)

      to set the number of rows for PassFailJFrame. Yet the `String.lines` method is not available in Java 8.

      During backport process, this code was replaced with
              INSTRUCTIONS.split("\n").length
      which is correct.

      Other tests use
              INSTRUCTIONS.length()/45
      which will produce the wrong number and the instruction text will not fit.


      After JDK-8340308 is backported to Java 8, these usages can be removed completely, as the PassFailJFrame framework will provide the expected default. If required, the number of rows can be adjusted by using the `rowsAdd` method.

            aivanov Alexey Ivanov
            aivanov Alexey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: