< prev index next >
src/java.desktop/share/classes/sun/print/PSPrinterJob.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -1592,19 +1592,19 @@
int pFlags = 0;
String[] execCmd;
int ncomps = 2; // minimum number of print args
int n = 0;
- if (printer != null && !printer.equals("") && !printer.equals("lp")) {
+ if (printer != null && !printer.isEmpty() && !printer.equals("lp")) {
pFlags |= PRINTER;
ncomps+=1;
}
- if (options != null && !options.equals("")) {
+ if (options != null && !options.isEmpty()) {
pFlags |= OPTIONS;
ncomps+=1;
}
- if (jobTitle != null && !jobTitle.equals("")) {
+ if (jobTitle != null && !jobTitle.isEmpty()) {
pFlags |= JOBTITLE;
ncomps+=1;
}
if (copies > 1) {
pFlags |= COPIES;
< prev index next >