Message6592
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. |
|
Date |
User |
Action |
Args |
2011-07-31 17:46:40 | dominik | set | recipients:
+ dominik |
2011-07-31 17:46:40 | dominik | set | messageid: <1312134400.28.0.915998554429.issue1785@psf.upfronthosting.co.za> |
2011-07-31 17:46:40 | dominik | link | issue1785 messages |
2011-07-31 17:46:39 | dominik | create | |
|