Skip to content

Commit

Permalink
Resolve #697 Fix stack overflow in entity toString()
Browse files Browse the repository at this point in the history
  • Loading branch information
npurushe committed Oct 7, 2017
1 parent 00e72c6 commit 9f3b6c6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion requery/src/main/java/io/requery/proxy/EntityProxy.java
Expand Up @@ -420,7 +420,13 @@ public String toString() {
sb.append(", ");
}
Object value = get(attribute, false);
sb.append(value == null ? "null" : value.toString());
if (value == null) {
sb.append("null");
} else if (attribute.isAssociation()) {
sb.append(value.getClass().getName());
} else {
sb.append(value.toString());
}
index++;
}
sb.append("]");
Expand Down

0 comments on commit 9f3b6c6

Please sign in to comment.