From: <cg...@us...> - 2008-12-06 03:23:38
|
Revision: 5708 http://jython.svn.sourceforge.net/jython/?rev=5708&view=rev Author: cgroves Date: 2008-12-06 03:23:28 +0000 (Sat, 06 Dec 2008) Log Message: ----------- Pull the proxy class directly out of the type. Fixes test_jser2 Modified Paths: -------------- branches/newstyle-java-types/src/org/python/util/PythonObjectInputStream.java Modified: branches/newstyle-java-types/src/org/python/util/PythonObjectInputStream.java =================================================================== --- branches/newstyle-java-types/src/org/python/util/PythonObjectInputStream.java 2008-12-06 03:01:16 UTC (rev 5707) +++ branches/newstyle-java-types/src/org/python/util/PythonObjectInputStream.java 2008-12-06 03:23:28 UTC (rev 5708) @@ -9,6 +9,7 @@ import org.python.core.Py; import org.python.core.PyObject; import org.python.core.PyTuple; +import org.python.core.PyType; import org.python.core.__builtin__; public class PythonObjectInputStream extends ObjectInputStream { @@ -29,11 +30,8 @@ String mod = clsName.substring(0, idx); clsName = clsName.substring(idx + 1); PyObject module = importModule(mod); - PyObject pycls = module.__getattr__(clsName.intern()); - Object cls = pycls.__tojava__(Class.class); - if (cls != null && cls != Py.NoConversion) { - return (Class<?>)cls; - } + PyType pycls = (PyType)module.__getattr__(clsName.intern()); + return pycls.getProxyType(); } } try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |