On 4/21/2013 6:39 AM, Peter Levart wrote:
On 04/21/2013 04:52 AM, Mandy Chung wrote:
Hi Peter,
I want to give it some more thought and discuss with you next week.
As for the zero number of interface, I think it's a bug and it should
throw IAE if the given interfaces array is empty. Thanks for
finding it and I'll file a separate bug for that since it requires
spec update/clarification.
I think it's a feature. It's useful, since it forwards Object methods
to InvocationHandler (equals, hashCode, ...). Sometimes that's all you
need.
Do you have specific use case or know any existing applications doing
that? What's the reason one would prefer to create a proxy class with
InvocationHandler rather than defining its own class that implements
equals, hashCode, or toString() method?
Mandy