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

Typo in javax.print.PrintService: HashPrintRequestHashAttributeSet

XMLWordPrintable

    • 2d
    • b92
    • x86
    • windows_xp

      Name: rmT116609 Date: 03/10/2004


      A DESCRIPTION OF THE PROBLEM :
         DocFlavor flavor = DocFlavor.INPUT_STREAM.POSTSCRIPT;
         PrintRequestAttributeSet aset = new HashPrintRequestHashAttributeSet();
         aset.add(MediaSizeName.ISO_A4);
         PrintService[] pservices =
                       PrintServiceLookup.lookupPrintServices(flavor, aset);
         if (pservices.length > 0) {
             DocPrintJob pj = pservices[0].createPrintJob();
             // InputStreamDoc is an implementation of the Doc interface //
             Doc doc = new InputStreamDoc("test.ps", flavor);
             try {
                   pj.print(doc, aset);
              } catch (PrintException e) {
              }
         }

      on line 2:

      PrintRequestAttributeSet aset = new HashPrintRequestHashAttributeSet();

      the object:

      HashPrintRequestHashAttributeSet()

      should be:

      HashPrintRequestAttributeSet()

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      HashPrintRequestAttributeSet()
      ACTUAL -
      HashPrintRequestHashAttributeSet()

      URL OF FAULTY DOCUMENTATION :
      http://java.sun.com/j2se/1.4.2/docs/api/javax/print/PrintService.html
      http://java.sun.com/j2se/1.5.0/docs/api/javax/print/PrintService.html
      (Incident Review ID: 242851)
      ======================================================================

            jgodinez Jennifer Godinez (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: