Skip to content

Commit db2f6dc

Browse files
committed
WELD-2817 Change how SerializableContextualInstanceImpl#toString operates to avoid possible SO on collections storing cyclical references
1 parent 0389f57 commit db2f6dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

impl/src/main/java/org/jboss/weld/contexts/SerializableContextualInstanceImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ public CreationalContext<I> getCreationalContext() {
5959

6060
@Override
6161
public String toString() {
62-
return "Bean: " + contextual + "; Instance: " + instance + "; CreationalContext: " + creationalContext;
62+
return "Bean: " + contextual + "; Instance: " + instance.getClass().getName() + "@"
63+
+ Integer.toHexString(instance.hashCode()) + "; CreationalContext: " + creationalContext;
6364
}
6465

6566
}

0 commit comments

Comments
 (0)