File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
spring-core/src/main/java/org/springframework/util Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -853,7 +853,7 @@ public static Locale parseLocale(String localeValue) {
853
853
if (!localeValue .contains ("_" ) && !localeValue .contains (" " )) {
854
854
validateLocalePart (localeValue );
855
855
Locale resolved = Locale .forLanguageTag (localeValue );
856
- if (resolved .getLanguage ().length () > 0 ) {
856
+ if (! resolved .getLanguage ().isEmpty () ) {
857
857
return resolved ;
858
858
}
859
859
}
@@ -1182,7 +1182,7 @@ public static String[] tokenizeToStringArray(
1182
1182
if (trimTokens ) {
1183
1183
token = token .trim ();
1184
1184
}
1185
- if (!ignoreEmptyTokens || token .length () > 0 ) {
1185
+ if (!ignoreEmptyTokens || ! token .isEmpty () ) {
1186
1186
tokens .add (token );
1187
1187
}
1188
1188
}
@@ -1244,7 +1244,7 @@ public static String[] delimitedListToStringArray(
1244
1244
result .add (deleteAny (str .substring (pos , delPos ), charsToDelete ));
1245
1245
pos = delPos + delimiter .length ();
1246
1246
}
1247
- if (str .length () > 0 && pos <= str .length ()) {
1247
+ if (! str .isEmpty () && pos <= str .length ()) {
1248
1248
// Add rest of String, but not in case of empty input.
1249
1249
result .add (deleteAny (str .substring (pos ), charsToDelete ));
1250
1250
}
You can’t perform that action at this time.
0 commit comments