--- old/src/share/vm/opto/cfgnode.cpp 2017-07-14 16:33:37.073651974 +0200 +++ new/src/share/vm/opto/cfgnode.cpp 2017-07-14 16:33:36.985651979 +0200 @@ -944,15 +944,10 @@ const TypeInstPtr* ttip = (ttp != NULL) ? ttp->isa_instptr() : NULL; const TypeKlassPtr* ttkp = (ttp != NULL) ? ttp->isa_klassptr() : NULL; bool is_intf = false; - if (ttip != NULL) { - ciKlass* k = ttip->klass(); - if (k->is_loaded() && k->is_interface()) - is_intf = true; - } - if (ttkp != NULL) { - ciKlass* k = ttkp->klass(); - if (k->is_loaded() && k->is_interface()) - is_intf = true; + if (ttip != NULL && ttip->is_loaded() && ttip->klass()->is_interface()) { + is_intf = true; + } else if (ttkp != NULL && ttkp->is_loaded() && ttkp->klass()->is_interface()) { + is_intf = true; } // Default case: merge all inputs @@ -1009,9 +1004,9 @@ // be 'I' or 'j/l/O'. Thus we'll pick 'j/l/O'. If this then flows // into a Phi which "knows" it's an Interface type we'll have to // uplift the type. - if (!t->empty() && ttip && ttip->is_loaded() && ttip->klass()->is_interface()) { + if (!t->empty() && ttip != NULL && ttip->is_loaded() && ttip->klass()->is_interface()) { assert(ft == _type, ""); // Uplift to interface - } else if (!t->empty() && ttkp && ttkp->is_loaded() && ttkp->klass()->is_interface()) { + } else if (!t->empty() && ttkp != NULL && ttkp->is_loaded() && ttkp->klass()->is_interface()) { assert(ft == _type, ""); // Uplift to interface } else { // We also have to handle 'evil cases' of interface- vs. class-arrays