cast is actually required in JDK 1.6