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

PrintService, PrinterJob APIs do not throw any excptn when destination is a dir

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 1.4.0
    • client-libs
    • 2d
    • beta
    • x86
    • windows_xp
    • Verified

      I am printing some print data represented by a Printable object to a file which represents a directory. This application does not pop up any dialog and printing is done in the background. In this case, neither DocPrintJob nor PrinterJob throws any exception on win32 systems and No file is created. On Solaris and Linux, a PrinterException is thrown saying the destination is a directory. This must be done on win32 systems also.

      This is reproducible right from JDK1.4 on Win32 systems. I tested this with Win XP.

      I have attached 2 tests - one for PrintService APIs and other for PrinterJob. Pass any directory name as a command line arg and check whether any exception is thrown. If no exception is thrown, bug is reproduced.

            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: