--- old/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java 2019-05-02 04:35:00.000000000 -0700 +++ new/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java 2019-05-02 04:34:59.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -716,7 +716,7 @@ private void paintAccText(Graphics g, MenuItemLayoutHelper lh, MenuItemLayoutHelper.LayoutResult lr) { - if (!lh.getAccText().equals("")) { + if (!lh.getAccText().isEmpty()) { ButtonModel model = lh.getMenuItem().getModel(); g.setFont(lh.getAccFontMetrics().getFont()); if (!model.isEnabled()) { @@ -754,7 +754,7 @@ private void paintText(Graphics g, MenuItemLayoutHelper lh, MenuItemLayoutHelper.LayoutResult lr) { - if (!lh.getText().equals("")) { + if (!lh.getText().isEmpty()) { if (lh.getHtmlView() != null) { // Text is HTML lh.getHtmlView().paint(g, lr.getTextRect());