Closed GoogleCodeExporter closed 8 years ago
It is definitively not possible to use the of() method on a private method.
This is
due to a limitation of the proxy mechanism employed. I will update the wiki
page with
this limitation.
Thank you
Mario
Original comment by mario.fu...@gmail.com
on 24 Nov 2009 at 3:40
I am well aware that you cannot override a private method. But I still think
that the
current handling is not proper. An explanatory exception should be thrown
instead of
strange behavior. We lost a day or two pinpointing what exactly was going on --
the
problem we saw was a NullPointerException due to quite an elaborate sequence of
events started by the immediate invocation of the private method.
Original comment by marko.to...@gmail.com
on 24 Nov 2009 at 5:12
I agree. I will check if it is possible to throw a more meaningful exception in
that
case.
Original comment by mario.fu...@gmail.com
on 24 Nov 2009 at 5:40
Unfortunately, since it is not possible to intercept the invocation of a private
method, it is also not possible to report this wrong closure usage in a more
meaningful way.
Original comment by mario.fu...@gmail.com
on 7 Feb 2010 at 11:23
Original issue reported on code.google.com by
marko.to...@gmail.com
on 24 Nov 2009 at 3:13Attachments: