Make compatible with Java 6