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:
Pinaki Poddar 2007-02-20 18:08:22 +00:00
parent e3f8a96205
commit 018cf3278a
1 changed files with 2 additions and 1 deletions

View File

@ -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() {