Java 6 backport