backported the fix for JDK-7087869
2 files changed