Callable and Supplier
– never shall the two meet!?

Let’s say we have this clever little legacy API method:

Now, we discover Java 8’s neat Supplier functional interface. As a courtesy to our users, we decide we would like to accept those as well. Does this work?
A naïve addition gives us:

So far so good? Well, what happens if we try to call this?
Continue reading

Ugly multiple inheritance in Java

Let’s say we have two classes:

Let’s imagine that the methods are really big and complex and for some horrid reason we want to inherit from both classes.
Continue reading