Closed GoogleCodeExporter closed 8 years ago
Hi,
That would be cool, however this not doable atm, the Java compiler won't allow
this. It's more of a Java platform related topic.
I'll invalidate the issue as it's not related to mockito, but to Java in
general, though if anywhere in JDK 27 this feature is available maybe we will
most ertainly use this feature :)
Cheers,
Brice
Original comment by brice.du...@gmail.com
on 25 Oct 2012 at 12:09
Hi Brice,
Thanks for your quick replay :)
Is there any link to understand why this is not possible by the Java compiler ?
Just curious...
Regards,
Original comment by mohamed....@gmail.com
on 25 Oct 2012 at 12:22
The compiler include in a method signature, the name, the args, and the return
type; if the signature don't match an existing method then the compiler will
issue an error. But worst, if an actual method exists in the code with just 1
argument, then the calling code will use the wrong method
Object foo(B, C, List, int) <-- don't match --> Object foo(Object)
Original comment by brice.du...@gmail.com
on 25 Oct 2012 at 9:56
Original issue reported on code.google.com by
mohamed....@gmail.com
on 25 Oct 2012 at 12:02