Remove use of org.springframework.util.ObjectUtils.
Provide private implementation of nullSafeClassName(:Object).
This commit is contained in:
@@ -26,7 +26,6 @@ import org.apache.geode.pdx.PdxInstance;
|
|||||||
import org.apache.geode.pdx.PdxInstanceFactory;
|
import org.apache.geode.pdx.PdxInstanceFactory;
|
||||||
|
|
||||||
import org.springframework.geode.cache.SimpleCacheResolver;
|
import org.springframework.geode.cache.SimpleCacheResolver;
|
||||||
import org.springframework.util.ObjectUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link PdxInstanceBuilder} class is a <a href="https://en.wikipedia.org/wiki/Builder_pattern">Builder</a>
|
* The {@link PdxInstanceBuilder} class is a <a href="https://en.wikipedia.org/wiki/Builder_pattern">Builder</a>
|
||||||
@@ -178,12 +177,16 @@ public class PdxInstanceBuilder {
|
|||||||
.orElseThrow(() -> {
|
.orElseThrow(() -> {
|
||||||
|
|
||||||
String message = String.format("Expected an instance of PDX but was an instance of type [%s];"
|
String message = String.format("Expected an instance of PDX but was an instance of type [%s];"
|
||||||
+ " Was PDX read-serialized set to true", ObjectUtils.nullSafeClassName(resolvedSource.get()));
|
+ " Was PDX read-serialized set to true", nullSafeClassName(resolvedSource.get()));
|
||||||
|
|
||||||
return new IllegalArgumentException(message);
|
return new IllegalArgumentException(message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String nullSafeClassName(Object target) {
|
||||||
|
return target != null ? target.getClass().getName() : null;
|
||||||
|
}
|
||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
public interface Factory {
|
public interface Factory {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user