Restore compatibility with JDK 6.