Saturday, April 25, 2009


As I mentioned in one of the previous posts, I have been outsourced to some project, which uses a home-made, rather naive web framework. This framework has something in common with Struts: it has an abstract Action class, that must be implemented by any action in the system. The main method from this class, that must be implemented by concrete actions, has signature of this shape:

abstract protected Result perform(...) throws ProcessDataException, NullPointerException;

So, how would you implement the "Hello World!" example in this framework? I guess, more or less this way:

public Result perform(...) throws ProcessDataException, NullPointerException {
throw new NullPointerException("Hello World!");

Well, this looks like a good candidate for The Daily WTF :)