mirror of https://github.com/apache/openjpa.git
Use safe and standard way to print a pc.toString() using Exceptions.toString(Object) when logging messages that may cause infinite loop.
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@509691 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e3f8a96205
commit
018cf3278a
|
@ -30,6 +30,7 @@ import org.apache.openjpa.meta.ClassMetaData;
|
|||
import org.apache.openjpa.meta.FieldMetaData;
|
||||
import org.apache.openjpa.meta.JavaTypes;
|
||||
import org.apache.openjpa.meta.ValueMetaData;
|
||||
import org.apache.openjpa.util.Exceptions;
|
||||
import org.apache.openjpa.util.Proxy;
|
||||
import org.apache.openjpa.util.UnsupportedException;
|
||||
|
||||
|
@ -399,7 +400,7 @@ public class DetachedStateManager
|
|||
// do not access the pc fields by implictly invoking _pc.toString()
|
||||
// may cause infinite loop if again tries to access unloaded field
|
||||
throw new IllegalStateException(_loc.get("unloaded-detached",
|
||||
_pc.getClass()+"@"+System.identityHashCode(_pc)).getMessage());
|
||||
Exceptions.toString(_pc)).getMessage());
|
||||
}
|
||||
|
||||
public boolean serializing() {
|
||||
|
|
Loading…
Reference in New Issue