Adapt to deprecation of StringUtils.isEmpty(Object)
See gh-23774
This commit is contained in:
@@ -296,11 +296,11 @@ public final class ConditionMessage {
|
||||
* @return a built {@link ConditionMessage}
|
||||
*/
|
||||
public ConditionMessage because(String reason) {
|
||||
if (StringUtils.isEmpty(reason)) {
|
||||
return new ConditionMessage(ConditionMessage.this, this.condition);
|
||||
if (StringUtils.hasLength(reason)) {
|
||||
return new ConditionMessage(ConditionMessage.this,
|
||||
StringUtils.hasLength(this.condition) ? this.condition + " " + reason : reason);
|
||||
}
|
||||
return new ConditionMessage(ConditionMessage.this,
|
||||
StringUtils.isEmpty(this.condition) ? reason : this.condition + " " + reason);
|
||||
return new ConditionMessage(ConditionMessage.this, this.condition);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ public class EntityScanPackages {
|
||||
}
|
||||
if (packagesToScan.isEmpty()) {
|
||||
String packageName = ClassUtils.getPackageName(metadata.getClassName());
|
||||
Assert.state(!StringUtils.isEmpty(packageName), "@EntityScan cannot be used with the default package");
|
||||
Assert.state(StringUtils.hasLength(packageName), "@EntityScan cannot be used with the default package");
|
||||
return Collections.singleton(packageName);
|
||||
}
|
||||
return packagesToScan;
|
||||
|
||||
Reference in New Issue
Block a user