< prev index next >

src/java.desktop/unix/classes/sun/print/IPPPrintService.java

Print this page

        

*** 319,329 **** IPPPrintService(String name, URL url) { if ((name == null) || (url == null)){ throw new IllegalArgumentException("null uri or printer name"); } ! printer = name; supportedDocFlavors = null; supportedCats = null; mediaSizeNames = null; customMediaSizeNames = null; mediaTrays = null; --- 319,333 ---- IPPPrintService(String name, URL url) { if ((name == null) || (url == null)){ throw new IllegalArgumentException("null uri or printer name"); } ! try { ! printer = java.net.URLDecoder.decode(name, "UTF-8"); ! } catch (java.io.UnsupportedEncodingException e) { ! System.out.println("Unsupported Encoding Exception"); ! } supportedDocFlavors = null; supportedCats = null; mediaSizeNames = null; customMediaSizeNames = null; mediaTrays = null;
*** 349,368 **** IPPPrintService(String name, String uriStr, boolean isCups) { if ((name == null) || (uriStr == null)){ throw new IllegalArgumentException("null uri or printer name"); } ! printer = name; supportedDocFlavors = null; supportedCats = null; mediaSizeNames = null; customMediaSizeNames = null; mediaTrays = null; cps = null; init = false; defaultMediaIndex = -1; try { myURL = new URL(uriStr.replaceFirst("ipp", "http")); } catch (Exception e) { IPPPrintService.debug_println(debugPrefix+ " IPPPrintService, myURL="+ --- 353,377 ---- IPPPrintService(String name, String uriStr, boolean isCups) { if ((name == null) || (uriStr == null)){ throw new IllegalArgumentException("null uri or printer name"); } ! try { ! printer = java.net.URLDecoder.decode(name, "UTF-8"); ! } catch (java.io.UnsupportedEncodingException e) { ! System.out.println("Unsupported Encoding Exception"); ! } supportedDocFlavors = null; supportedCats = null; mediaSizeNames = null; customMediaSizeNames = null; mediaTrays = null; cps = null; init = false; defaultMediaIndex = -1; try { + myURL = new URL(uriStr.replaceFirst("ipp", "http")); } catch (Exception e) { IPPPrintService.debug_println(debugPrefix+ " IPPPrintService, myURL="+
< prev index next >