backported the fix for JDK-7146533
2 files changed