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

StreamPrintService.isAttributeValueSupported does not work properly for SheetCollate

    XMLWordPrintable

Details

    • 2d
    • b05
    • generic
    • generic

    Backports

      Description

        As far as any print service is concerned, isAttributeValueSupported must always return true for any attribute value that is returned by getSupportedAttributeValues if the context is same (such as DocFlavor and the optional attribute set). StreamPrintService.getSupportedAttributeValues() returns SheetCollate.UNCOLLATED as the supported value for any Doc Flavor which is not SERVICE_FORMATTED. But when querying with isAttributeValueSupported() with the same attribute value and the same DocFlavor, this method returns false. When I looked into the source code, it is pretty clear that isAttributeValueSupported always returns false when the DocFlavor is not SerivceFormatted.Pageable or Printable regardless of what SheetCollate value is passed to this method. It must also consider the attribute value before actually returning true or false.

        This bug is reproducible on windows as well as Solaris, right from JDK1.4.0.

        I have attached a sample code which would print the supported values returned by getSupportedAttributeValues() and the boolean value returned by isAttributeValueSupported for each supported value.

        Attachments

          Issue Links

            Activity

              People

                prr Philip Race
                pmohansunw Praveen Mohan (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: