src/java.desktop/share/classes/sun/print/PrintJob2D.java
changeset 54871 c2e4aef5edf2
parent 52248 2e330da7cbf4
--- a/src/java.desktop/share/classes/sun/print/PrintJob2D.java	Tue May 07 11:52:28 2019 -0700
+++ b/src/java.desktop/share/classes/sun/print/PrintJob2D.java	Tue May 07 18:18:54 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -683,7 +683,7 @@
                 URI uri = null;
                 try {
                     if (fileName != null) {
-                        if (fileName.equals("")) {
+                        if (fileName.isEmpty()) {
                             fileName = ".";
                         }
                     } else {
@@ -1233,11 +1233,11 @@
             (jobAttributes.getDestination() == DestinationType.PRINTER) ?
                           PRINTER : FILE);
         str = jobAttributes.getPrinter();
-        if (str != null && !str.equals("")) {
+        if (str != null && !str.isEmpty()) {
             props.setProperty(PRINTER_PROP, str);
         }
         str = jobAttributes.getFileName();
-        if (str != null && !str.equals("")) {
+        if (str != null && !str.isEmpty()) {
             props.setProperty(FILENAME_PROP, str);
         }
         int copies = jobAttributes.getCopies();
@@ -1245,7 +1245,7 @@
             props.setProperty(NUMCOPIES_PROP, "" + copies);
         }
         str = this.options;
-        if (str != null && !str.equals("")) {
+        if (str != null && !str.isEmpty()) {
             props.setProperty(OPTIONS_PROP, str);
         }
         props.setProperty(ORIENT_PROP,