Skip to content

Commit 3194a0d

Browse files
committed
Polishing.
Move off deprecated StringUtils.isEmpty. See #1098
1 parent 01c6350 commit 3194a0d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/CassandraEntityClassScanner.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import org.springframework.data.cassandra.core.mapping.Table;
3131
import org.springframework.lang.Nullable;
3232
import org.springframework.util.ClassUtils;
33-
import org.springframework.util.StringUtils;
33+
import org.springframework.util.ObjectUtils;
3434

3535
/**
3636
* Scans packages for Cassandra entities. The entity scanner scans for entity classes annotated with
@@ -208,7 +208,7 @@ protected Set<Class<?>> scanBasePackageForEntities(String basePackage) throws Cl
208208

209209
HashSet<Class<?>> classes = new HashSet<>();
210210

211-
if (StringUtils.isEmpty(basePackage)) {
211+
if (ObjectUtils.isEmpty(basePackage)) {
212212
return classes;
213213
}
214214

spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/DefaultColumnTypeResolver.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
import org.springframework.data.util.TypeInformation;
4646
import org.springframework.lang.Nullable;
4747
import org.springframework.util.Assert;
48-
import org.springframework.util.StringUtils;
48+
import org.springframework.util.ObjectUtils;
4949

5050
import com.datastax.oss.driver.api.core.CqlIdentifier;
5151
import com.datastax.oss.driver.api.core.data.TupleValue;
@@ -104,7 +104,7 @@ public CassandraColumnType resolve(CassandraPersistentProperty property) {
104104

105105
CassandraType annotation = property.getRequiredAnnotation(CassandraType.class);
106106

107-
if (annotation.type() == Name.UDT && StringUtils.isEmpty(annotation.userTypeName())) {
107+
if (annotation.type() == Name.UDT && ObjectUtils.isEmpty(annotation.userTypeName())) {
108108
throw new InvalidDataAccessApiUsageException(
109109
String.format("Expected user type name in property ['%s'] of type ['%s'] in entity [%s]",
110110
property.getName(), property.getType(), property.getOwner().getName()));
@@ -251,7 +251,7 @@ public CassandraColumnType resolve(CassandraType annotation) {
251251
return ColumnType.tupleOf(DataTypes.tupleOf(dataTypes));
252252
case UDT:
253253

254-
if (StringUtils.isEmpty(annotation.userTypeName())) {
254+
if (ObjectUtils.isEmpty(annotation.userTypeName())) {
255255
throw new InvalidDataAccessApiUsageException(
256256
"Cannot resolve user type for @CassandraType(type=UDT) without userTypeName");
257257
}

0 commit comments

Comments
 (0)