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

[macos13] JTablePrintPageRangesTest fails to print when page number 1 is not given in range

XMLWordPrintable

    • 2d
    • generic
    • os_x

      JTablePrintPageRangesTest fails to print when page number 1 is not there in range option MacOS 13 x64. This is not reproducible in MacOS 12 x64

      This is noticed while baselining Mac OS 13 (x64) platform. The failing test link is given in comment. Basically this test tries to give different values to PageRanges object and prints the corresponding pages of JTable. It prints the JTable after setting some attributes using the below sample code piece.

      PageRanges curPageRange = new PageRanges(1,3);
      PrintRequestAttributeSet attr = new HashPrintRequestAttributeSet();
      attr.add(curPageRange);
      jTable.print(printMode, headerFormat, footerFormat, showPrintDialog, attr, true);

      The variable here is curPageRange, and I have given some usecases with different PageRanges. So it is evident from the usecases that whenever page 1 is not present in the PageRanges attribute, it's not working properly.


      Usecases:

      Success cases:
      1. new PageRanges(1,3), - success printing 3 pages
      2. new PageRanges("1,2,3"), - success printing 3 pages
      3. new PageRanges(new int[][]{ {1,2}, {4} }) - success correctly printing 3 pages in two tasks(1 print 2 pages and other 1 page)
      4. new PageRanges(new int[][]{ {1,2}, {4} }) - success correctly printing 3 pages in two tasks(1 print 2 pages and other 1 page)
      5. new PageRanges("1,5"), - success correctly printing 2 pages in two tasks(1 print 1 pages and other 1 page)
      6. new PageRanges(1,5), - success printing 5 pages
      7. new PageRanges(1), - success printing 1 page
      8. new PageRanges("1,6,4"), - success printing 3 pages in 3 tasks
      9. new PageRanges(new int[][]{ {1,2}, {4}, {6,7} }) - success printing 5 pages, in 2 + 1 +2 tasks

      Failure cases:
      1. new PageRanges(2,3), - fail - printing 1 page only
      2. new PageRanges("3"), - fail- prints nothing
      3. new PageRanges("2,5"), - fail- prints nothing
      4. new PageRanges(3,5), - fail - printing 1 page only
      5. new PageRanges(2), - fail- prints nothing
      6. new PageRanges(new int[][]{ {2,3}, {5} }) - fail - printing 1 page only
      7. new PageRanges(3), - fail- prints nothing
      8. new PageRanges(4, 6), - fail- prints nothing

            psadhukhan Prasanta Sadhukhan
            mvs Manukumar V S
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: