This is a fix for null pointers that are not carefully dealt with. Added assertions to prevent it from happening again. External bug: Not available. JBS: https://jbs.oracle.com/bugs/browse/JDK-8017478 Webrev: http://cr.openjdk.java.net/~zgu/8017478/webrev.00/ Thanks, -Zhengyu