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

getSupportedAttributeValues throws exception for selected MediaSizeName

XMLWordPrintable

    • 2d
    • beta2
    • generic
    • generic
    • Verified


      Attached here is a sample testcase for testing MediaPrintableArea
      attribute. Here, I select a MediaSizeName and then try to get all the
      supported MediaPrintableArea objects for a service formatted printable
      docflavor using the getSupportedAttributeValues method.
      I selected the first MediaSizeName here(which is na-letter in my case). But the
      testcase fails for any MediaSizeName that I select.
             
      The testcase was run on Solaris Sparc 7 and Windows 2000 and both have
      the same problem.
       
      The following exception is thrown when the program is run.
       
      java.lang.IllegalArgumentException: args must be +ve values at
       
      javax.print.attribute.standard.MediaPrintableArea.<init>(MediaPrintableArea.java
       :99) at
       
      sun.print.UnixPrintService.getSupportedAttributeValues(UnixPrintService.java:631
       ) at MediaPrintableAreaTest.print(MediaPrintableAreaTest.java:93)
               at MediaPrintableAreaTest.<init>(MediaPrintableAreaTest.java:61)
               at MediaPrintableAreaTest.main(MediaPrintableAreaTest.java:152)
       

      Source File: MediaPrintableAreaTest.java

            jgodinez Jennifer Godinez (Inactive)
            kbalasubsunw Kannan Balasubramanian (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: