Skip to content

Commit

Permalink
fixed files form Lang #34
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 7a7e850 commit 40fe634
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public abstract class ToStringStyle implements Serializable {
* @return Set the registry of objects being traversed
*/
static Map<Object, Object> getRegistry() {
return REGISTRY.get() != null ? REGISTRY.get() : Collections.<Object, Object>emptyMap();
return REGISTRY.get();
}

/**
Expand All @@ -161,7 +161,7 @@ static Map<Object, Object> getRegistry() {
*/
static boolean isRegistered(Object value) {
Map<Object, Object> m = getRegistry();
return m.containsKey(value);
return m != null && m.containsKey(value);
}

/**
Expand Down

0 comments on commit 40fe634

Please sign in to comment.