< prev index next >

src/java.desktop/share/classes/sun/print/PrintJob2D.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 681,691 **** attributes.add(defaultDest); } else { URI uri = null; try { if (fileName != null) { ! if (fileName.equals("")) { fileName = "."; } } else { // defaultDest should not be null. The following code // is only added to safeguard against a possible --- 681,691 ---- attributes.add(defaultDest); } else { URI uri = null; try { if (fileName != null) { ! if (fileName.isEmpty()) { fileName = "."; } } else { // defaultDest should not be null. The following code // is only added to safeguard against a possible
*** 1231,1253 **** props.setProperty(DEST_PROP, (jobAttributes.getDestination() == DestinationType.PRINTER) ? PRINTER : FILE); str = jobAttributes.getPrinter(); ! if (str != null && !str.equals("")) { props.setProperty(PRINTER_PROP, str); } str = jobAttributes.getFileName(); ! if (str != null && !str.equals("")) { props.setProperty(FILENAME_PROP, str); } int copies = jobAttributes.getCopies(); if (copies > 0) { props.setProperty(NUMCOPIES_PROP, "" + copies); } str = this.options; ! if (str != null && !str.equals("")) { props.setProperty(OPTIONS_PROP, str); } props.setProperty(ORIENT_PROP, (pageAttributes.getOrientationRequested() == OrientationRequestedType.PORTRAIT) --- 1231,1253 ---- props.setProperty(DEST_PROP, (jobAttributes.getDestination() == DestinationType.PRINTER) ? PRINTER : FILE); str = jobAttributes.getPrinter(); ! if (str != null && !str.isEmpty()) { props.setProperty(PRINTER_PROP, str); } str = jobAttributes.getFileName(); ! if (str != null && !str.isEmpty()) { props.setProperty(FILENAME_PROP, str); } int copies = jobAttributes.getCopies(); if (copies > 0) { props.setProperty(NUMCOPIES_PROP, "" + copies); } str = this.options; ! if (str != null && !str.isEmpty()) { props.setProperty(OPTIONS_PROP, str); } props.setProperty(ORIENT_PROP, (pageAttributes.getOrientationRequested() == OrientationRequestedType.PORTRAIT)
< prev index next >