backport to JDK6