Getting code to build with JDK5 with no warnings.