Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-4477

parseURI in org.apache.camel.component.printer.PrinterConfiguration leaves a prefixed "/" on the printername attribute which should be removed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.8.1
    • 2.7.4, 2.8.2, 2.9.0
    • camel-printer
    • None
    • Windows 7 64-bit, jdk 1.6.0_20

    • Novice

    Description

      in PrinterConfiguration.parseURI(), the line:

      setPrintername(uri.getPath());

      ends up leaving the starting "/" which is not really a part of the printer's name. When the PrinterProducer later searches for the matching PrintService, it attempts to recreate the printer path from the host name and the printer name with the following:

      setPrinter("\\\\" + config.getHostname() + "
      " + config.getPrintername());

      which ends up with a string like: \\<HostName>\/<printer> because the leading "/" was not removed from the printer name, and which leads to the printer never being found.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            denis@denisrobert.net Denis Robert
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: