From: Peter B. <bri...@ma...> - 2001-08-12 05:19:29
|
Hi! I've noticed a problem related to jython classes derived from java classes. The problem occurs under the following circumstances: 1. A package derives a class A from a java class and overrides a method M of the java class but calls the original method at some point. 2. The same package derives a class B from class A, overrides the same method M but calls the corresponding method of A at some point. Then, when B.M is called, jython seems to go into an infinite loop. Here's a little program that reproduces the problem: ---------------------------------------------------- import java class spam(java.lang.Object): def hashCode(self): print 'spam' return java.lang.Object.hashCode(self) class eggs(spam): def hashCode(self): print 'eggs' return spam.hashCode(self) s=spam() e=eggs() print s.hashCode() # this one works print e.hashCode() # here we get stuck ---------------------------------------------------- This shouldn't be happening, right? Best, Peter |