--- old/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java 2019-05-02 04:36:11.000000000 -0700 +++ new/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java 2019-05-02 04:36:10.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -233,7 +233,7 @@ */ protected Dimension getCaptionSize() { String s = getTargetLabel(); - if (s.equals("")) { + if (s.isEmpty()) { return null; } Graphics g = getGraphics(); @@ -260,7 +260,7 @@ */ protected void paintCaption(Graphics g, Rectangle rect) { String s = getTargetLabel(); - if (s.equals("")) { + if (s.isEmpty()) { return; } g.setFont(getTargetFont());