One of my more interesting tasks of the past few weeks was to refactor an existing method to use Generics in a method's return type and simplify the readability of code that calls the method. The starting point was this method: public static Object getHandler(Class<?> aClass) throws HandlerException { if (handlerFactory == null) handlerFactory = new HandlerFactory(); return handlerFactory.getHandler(aClass); }
Musings on Tests, Quality, Tools, Projects and more. By Steve Page