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) {
853853if (!localeValue .contains ("_" ) && !localeValue .contains (" " )) {
854854validateLocalePart (localeValue );
855855Locale resolved = Locale .forLanguageTag (localeValue );
856- if (resolved .getLanguage ().length () > 0 ) {
856+ if (! resolved .getLanguage ().isEmpty () ) {
857857return resolved ;
858858}
859859}
@@ -1182,7 +1182,7 @@ public static String[] tokenizeToStringArray(
11821182if (trimTokens ) {
11831183token = token .trim ();
11841184}
1185- if (!ignoreEmptyTokens || token .length () > 0 ) {
1185+ if (!ignoreEmptyTokens || ! token .isEmpty () ) {
11861186tokens .add (token );
11871187}
11881188}
@@ -1244,7 +1244,7 @@ public static String[] delimitedListToStringArray(
12441244result .add (deleteAny (str .substring (pos , delPos ), charsToDelete ));
12451245pos = delPos + delimiter .length ();
12461246}
1247- if (str .length () > 0 && pos <= str .length ()) {
1247+ if (! str .isEmpty () && pos <= str .length ()) {
12481248// Add rest of String, but not in case of empty input.
12491249result .add (deleteAny (str .substring (pos ), charsToDelete ));
12501250}
You can’t perform that action at this time.
0 commit comments