--- old/src/java.desktop/unix/classes/sun/print/UnixPrintJob.java 2019-05-02 04:36:24.000000000 -0700 +++ new/src/java.desktop/unix/classes/sun/print/UnixPrintJob.java 2019-05-02 04:36:23.000000000 -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 @@ -394,7 +394,7 @@ String repClassName = flavor.getRepresentationClassName(); String val = flavor.getParameter("charset"); String encoding = "us-ascii"; - if (val != null && !val.equals("")) { + if (val != null && !val.isEmpty()) { encoding = val; } @@ -733,7 +733,7 @@ } catch (SecurityException se) { } - if (userName == null || userName.equals("")) { + if (userName == null || userName.isEmpty()) { RequestingUserName ruName = (RequestingUserName)reqSet.get(RequestingUserName.class); if (ruName != null) { @@ -865,15 +865,15 @@ int n = 0; // conveniently "lp" is the default destination for both lp and lpr. - 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; }