Replace "google.common.collect.Strings" API with jdk API (#6464)
This commit is contained in:
parent
47c6706a63
commit
838a62cc4a
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
package com.alibaba.nacos.common.utils;
|
package com.alibaba.nacos.common.utils;
|
||||||
|
|
||||||
import com.google.common.base.Strings;
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -194,7 +193,7 @@ public final class ConvertUtils {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
public static Boolean toBooleanObject(String str) {
|
public static Boolean toBooleanObject(String str) {
|
||||||
String formatStr = Strings.nullToEmpty(str).toLowerCase();
|
String formatStr = (str == null ? StringUtils.EMPTY : str).toLowerCase();
|
||||||
|
|
||||||
if (TRUE_SET.contains(formatStr)) {
|
if (TRUE_SET.contains(formatStr)) {
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user