Deprecate StringUtils.isEmpty(Object) and replace remaining usage

Closes gh-25945
This commit is contained in:
Juergen Hoeller
2020-10-21 16:09:26 +02:00
parent 07769ddcc6
commit 621295dbd8
8 changed files with 13 additions and 15 deletions

View File

@@ -24,7 +24,6 @@ import org.springframework.expression.spel.CodeFlow;
import org.springframework.expression.spel.ExpressionState;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
/**
* Represents the elvis operator ?:. For an expression "a?:b" if a is not null, the value
@@ -52,7 +51,7 @@ public class Elvis extends SpelNodeImpl {
public TypedValue getValueInternal(ExpressionState state) throws EvaluationException {
TypedValue value = this.children[0].getValueInternal(state);
// If this check is changed, the generateCode method will need changing too
if (!StringUtils.isEmpty(value.getValue())) {
if (value.getValue() != null && !"".equals(value.getValue())) {
return value;
}
else {