Message6592

Author dominik
Recipients dominik
Date 2011-07-31.17:46:39
SpamBayes Score 2.0736968e-11
Marked as misclassified No
Message-id <1312134400.28.0.915998554429.issue1785@psf.upfronthosting.co.za>
In-reply-to
Content
I have a Java interface:
---
public interface JavaInterface {
    Object add(Object a, Object b);
    void multiply(Object a, Object b);
}
---

I also have a Jython implementation which implements only the "add" method, but not the "multiply" method:
---
class JythonImpl(JavaInterface):

    def __init__ (self):
        pass

    def add(self, a, b):
        return a + b

if __name__ == "__main__":
    jythonClass = JythonImpl()
    try:
        print jythonClass.multiply(10, 20)
    except Exception, e:
        print e
---

The 'jythonClass.multiply(10, 20)' statement above should throw an 'abstract method "multiply" not implemented' exception, but it doesn't when using Jython 2.5.*. Instead it returns None.

The old Jython 2.2.1 did throw the mentioned exception in such case.
History
Date User Action Args
2011-07-31 17:46:40dominiksetrecipients: + dominik
2011-07-31 17:46:40dominiksetmessageid: <1312134400.28.0.915998554429.issue1785@psf.upfronthosting.co.za>
2011-07-31 17:46:40dominiklinkissue1785 messages
2011-07-31 17:46:39dominikcreate