diff --git a/projects/Lang/34/org/apache/commons/lang3/builder/ToStringStyle.java b/projects/Lang/34/org/apache/commons/lang3/builder/ToStringStyle.java index aa1f448..26214ed 100644 --- a/projects/Lang/34/org/apache/commons/lang3/builder/ToStringStyle.java +++ b/projects/Lang/34/org/apache/commons/lang3/builder/ToStringStyle.java @@ -145,7 +145,7 @@ public abstract class ToStringStyle implements Serializable { * @return Set the registry of objects being traversed */ static Map getRegistry() { - return REGISTRY.get() != null ? REGISTRY.get() : Collections.emptyMap(); + return REGISTRY.get(); } /** @@ -161,7 +161,7 @@ static Map getRegistry() { */ static boolean isRegistered(Object value) { Map m = getRegistry(); - return m.containsKey(value); + return m != null && m.containsKey(value); } /**