Skip to content

Commit 7f1267c

Browse files
committed
last String.replaceAll for fast RegExp
1 parent d2fe01d commit 7f1267c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sources/net.sf.j2s.java.core/src/javax/swing/SwingUtilities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ private static String layoutCompoundLabelImpl(
10131013
textR.width = 1;
10141014
textR.height = fm.getHeight();
10151015
} else {
1016-
String t = text.replace(' ', '\u00A0'); // no-break space
1016+
String t = text.replaceAll(" ","\u00A0"); // no-break space
10171017
if (t != text && /** @j2sNative ui.textNode.innerHTML != t || */false)
10181018
DOMNode.setAttr(ui.textNode, "innerHTML", t);
10191019
Dimension d = ui.getHTMLSize(ui.textNode);

0 commit comments

Comments
 (0)