From: <no...@so...> - 2001-01-02 22:42:52
|
Bug #127340, was updated on 2001-Jan-02 14:42 Here is a current snapshot of the bug. Project: Jython Category: None Status: Open Resolution: None Bug Group: None Priority: 5 Submitted by: njcarriero Assigned to : nobody Summary: Problem with serializable method parameters Details: An object crossing from jython to java seems to lose its identity if passed as a serializable object . The following illustrates the problem. ==== Output from java ==== [carriero@callisto kinase-search]$ java TellMeMore class java.util.Hashtable {zwei=two, uno=one} class java.util.Hashtable {zwei=two, uno=one} ==== Output from jython 2.0b1 ==== [carriero@callisto kinase-search]$ /home/carriero/jython/jython-2.0b1/jython tmm.py class java.util.Hashtable {zwei=two, uno=one} class org.python.core.PyJavaInstance org.python.core.PyJavaInstance@38ed7d ==== Python source ==== from java.util import * import TellMeMore h = Hashtable() h.put("uno", "one") h.put("zwei", "two") tmm = TellMeMore() tmm.TellMeMoreO(h) tmm.dump() tmm.TellMeMoreS(h) tmm.dump() ==== Java source ==== import java.io.*; import java.util.*; public class TellMeMore { Object o; public void TellMeMoreS(Serializable o) { this.o = o; } public void TellMeMoreO(Object o) { this.o = o; } public void dump() { System.out.println(o.getClass()); System.out.println(o.toString()); } public static void main(String args[]) { Hashtable h = new Hashtable(); h.put("uno", "one"); h.put("zwei", "two"); TellMeMore tmm = new TellMeMore(); tmm.TellMeMoreO(h); tmm.dump(); tmm.TellMeMoreS(h); tmm.dump(); } } For detailed info, follow this link: http://sourceforge.net/bugs/?func=detailbug&bug_id=127340&group_id=12867 |