From: Bryan W. <Bry...@wa...> - 2004-06-04 21:15:43
|
i really hope someone can help me eliminate these warnings. i posted this question 2 month ago, but nobody replied :( this code is now going into the production build system and we can't have warnings. i'm surprised that jython is using it's own deprecated methods. am i declaring the methods incorrectly? or is there a way to turn off just the jython warnings? these jython java files are part of a larger java project so i can't simply compile the entire project with no deprecated warnings. =20 [javac] Fb2x.java:94: warning: jgetattr(org.python.core.PyProxy,java.lang.String) in org.python.core.Py has been deprecated [javac] PyObject inst =3D Py.jgetattr(this, = "get_remainder"); [javac] ^ [javac] Fb2x.java:95: warning: tojava(org.python.core.PyObject,java.lang.Class) in org.python.core.Py has been deprecated [javac] return (java.lang.String)Py.tojava(inst._jcall(new Object[]{}), java.lang.String.class); [javac] ^ [javac] Fb2x.java:99: warning: jgetattr(org.python.core.PyProxy,java.lang.String) in org.python.core.Py has been deprecated [javac] PyObject inst =3D Py.jgetattr(this, "fb2x"); =20 =20 ### here is the jython source code that is producing the above warnings: =20 =20 import java import fb =20 class Fb2x(java.lang.Object): def fb2x(self, fb_config, mgr): '@sig public void fb2x(String fb_config, PropertyManager mgr)' self.f =3D fb.FB(fb_config) self.f.convert(mgr) =20 def get_remainder(self): '@sig public String get_remainder()' return '\n'.join(self.f.remainder()) =20 =20 ### here is the generated java code the jython generates =20 public java.lang.String get_remainder() { PyObject inst =3D Py.jgetattr(this, "get_remainder"); ### LINE 94 return (java.lang.String)Py.tojava(inst._jcall(new Object[] {}), java.lang.String.class); ### LINE 95 } =20 public void fb2x(java.lang.String fb_config, com.watchguard.vpm.config.IPropertyManager mgr) { PyObject inst =3D Py.jgetattr(this, "fb2x"); ### LINE 99 inst._jcall(new Object[] {fb_config, mgr}); } =20 =20 =20 thanks, =20 bryan |