mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad
This commit is contained in:
parent
df5b42f33b
commit
938b844088
95 changed files with 195 additions and 195 deletions
|
@ -2226,10 +2226,10 @@ public final class Locale implements Cloneable, Serializable {
|
|||
default:
|
||||
return Arrays.stream(stringList).reduce("",
|
||||
(s1, s2) -> {
|
||||
if (s1.equals("")) {
|
||||
if (s1.isEmpty()) {
|
||||
return s2;
|
||||
}
|
||||
if (s2.equals("")) {
|
||||
if (s2.isEmpty()) {
|
||||
return s1;
|
||||
}
|
||||
return MessageFormat.format(pattern, s1, s2);
|
||||
|
@ -3069,7 +3069,7 @@ public final class Locale implements Cloneable, Serializable {
|
|||
|
||||
private static boolean isSubtagIllFormed(String subtag,
|
||||
boolean isFirstSubtag) {
|
||||
if (subtag.equals("") || subtag.length() > 8) {
|
||||
if (subtag.isEmpty() || subtag.length() > 8) {
|
||||
return true;
|
||||
} else if (subtag.equals("*")) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue