Message775

Author cgroves
Recipients
Date 2006-08-12.02:02:47
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=1174327

The reported exception disappeared between the time this bug
was reported and now.  Interestingly, it's broken in a
different way now.  When you call call remove on a
synchronized list with an int, it calls the remove from
Collection that takes an object instead of the remove from
List that takes an int as the way the Jython java primitive
coercion would make it work normally.  This is because the
synchronized list class doesn't contain the remove method,
and its somewhat convoluted inheritance hierarchy leads
PyJavaClass's lookup to Collection's remove and doesn't
check for remove in other bases. Since the remove(int)
method is in the List interface the wrong method gets called. 

ype's patch 642483 mentioned below has the right idea to fix
this.  It adds all of the methods from the interfaces of the
proxy class to the PyJavaClass directly.  This lets the
superclass handle the method if it can, but if not, it makes
a PyReflectedFunction containing all the relevant argument
variations.  There was a slight but in it though, so I've
attached a fixed version of the patch to this bug.
History
Date User Action Args
2008-02-20 17:17:11adminlinkissue628315 messages
2008-02-20 17:17:11admincreate