JSR 354 forward compatible backport to JDK 7.