Closed GoogleCodeExporter closed 9 years ago
Yes, it does that because after that it trieds to wrap the actual passed class
into
a Enhancer generated subclass, which of course will fail if the class is final.
Is a
solution to that? Maybe the ClassImposterizer can find the first available non
final
superclass of the passed class and enhance that one instead? The cost will be
of
course that it will narrow thenumber of methods available to be called through
the
closure, but then again, I suppose better that the fail safe
NullPointerException
thrown.
Hope that makes sense.
Regards
Georgios
Original comment by georgiad...@googlemail.com
on 26 Aug 2009 at 11:31
It is a well known limitation that lambdaj doesn't work with final classes.
Even to
look for the first available non final superclass it is not a viable workaround
since
it causes to throw a ClassCastException.
Original comment by mario.fu...@gmail.com
on 26 Aug 2009 at 11:55
Thanks,
It works with
1) of(new PrintStream(System.out))
or
2) of(System.out,PrintStream.class)
though, so that is fine.
Thanks
Georgios
Original comment by georgiad...@googlemail.com
on 26 Aug 2009 at 3:29
Original issue reported on code.google.com by
georgiad...@googlemail.com
on 26 Aug 2009 at 11:14