--- old/src/java.desktop/share/classes/sun/print/PSPrinterJob.java 2019-05-02 04:35:46.000000000 -0700 +++ new/src/java.desktop/share/classes/sun/print/PSPrinterJob.java 2019-05-02 04:35:45.000000000 -0700 @@ -1,5 +1,5 @@ /* - * 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 @@ -1594,15 +1594,15 @@ 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; }