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

StreamPrintServ.isAttributeValueSupported does not work properly for SheetCollat

    XMLWordPrintable

    Details

    • Subcomponent:
      2d
    • Understanding:
      Fix Understood
    • CPU:
      generic
    • OS:
      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

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

                  Dates

                  Created:
                  Updated:
                  Imported:
                  Indexed: