--- a/src/java.base/share/classes/java/text/MessageFormat.java Thu Dec 13 16:14:07 2018 +0100
+++ b/src/java.base/share/classes/java/text/MessageFormat.java Thu Dec 13 15:31:05 2018 +0100
@@ -1330,7 +1330,7 @@
}
arg = null;
}
- if (arg != null && arg.length() > 0) {
+ if (arg != null && !arg.isEmpty()) {
result.append(arg);
characterIterators.add(
createAttributedCharacterIterator(
@@ -1476,7 +1476,7 @@
// now get the format
Format newFormat = null;
- if (segments[SEG_TYPE].length() != 0) {
+ if (!segments[SEG_TYPE].isEmpty()) {
int type = findKeyword(segments[SEG_TYPE], TYPE_KEYWORDS);
switch (type) {
case TYPE_NULL: