Skip to content

Commit

Permalink
Replace "google.common.collect.Strings" API with jdk API (alibaba#6464)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZZQ001010 authored Jul 27, 2021
1 parent 47c6706 commit 838a62c
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.alibaba.nacos.common.utils;

import com.google.common.base.Strings;
import com.google.common.collect.Sets;

import java.util.HashSet;
Expand Down Expand Up @@ -194,7 +193,7 @@ public static boolean toBoolean(final String str) {
*/
@SuppressWarnings("all")
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)) {
return true;
Expand Down

0 comments on commit 838a62c

Please sign in to comment.