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

PIT: NullPointerException thrown when specifying MediaTray attrib on Sol - NonCUPS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 6
    • 6
    • client-libs
    • 2d
    • b47
    • sparc
    • solaris_10
    • Verified

      I am creating a PrintRequestAttributeSet and adding a MediaTray.MANUAL attribute. I am calling PrintServiceLookup.lookupPrintServices() with a GIF DocFlavor and this attribute set. This method returns few printers on SolSparc10-Non CUPS mode.

      When I try to print a GIF image using one of the returned printers, I am getting the following exception:
      java.lang.NullPointerException
      at sun.print.UnixPrintService.getSupportedAttributeValues(UnixPrintService.java:698)
      at sun.print.RasterPrinterJob.setAttributes(RasterPrinterJob.java:1151)
      at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1287)
      at sun.print.UnixPrintJob.printableJob(UnixPrintJob.java:618)
      at sun.print.UnixPrintJob.print(UnixPrintJob.java:382)
      at BMPPrintingTest.main(BMPPrintingTest.java:77)

      This is not reproducible on Win32, Sol10-CUPS. This is not reproducible on Mustang-b41 with the same testcase. Hence it is a regression introduced in the PIT build.

      Here is the PIT build:
      java version "1.6.0-2d.pit-awt-blade"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-2d.pit-awt-blade-tdv_20_Jun_2005_00_52-b00)
      Java HotSpot(TM) Server VM (build 1.6.0-ea-b41, mixed mode)

      First of all, I am surprised to see a 'true' return value from isAttributeValueSupported(MediaTray.MANUAL) when MediaTray attribute category itself is not supported. I should not have got any printers while calling lookupPrintServices() in the first case.

      I have attached a sample test. Execute the sample test with the PIT build on SolSparc10-NonCUPS. You would see the above exception.

      ###@###.### 2005-06-22 08:45:26 GMT

            jgodinez Jennifer Godinez (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: