< prev index next >

src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameBorder.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -178,11 +178,11 @@
         int totalTextWidth = 0;
 
         int startXPosition = fThisLeftSideTotal;
         boolean wasTextShortened = false;
         // shorten the string to fit in the
-        if ((text != null) && !(text.equals(""))) {
+        if (text != null && !text.isEmpty()) {
             totalTextWidth = SwingUtilities.computeStringWidth(fm, text);
             final String clipString = "\u2026";
             if (totalTextWidth > availTextWidth) {
                 wasTextShortened = true;
                 totalTextWidth = SwingUtilities.computeStringWidth(fm, clipString);
< prev index next >