diff src/share/vm/opto/cfgnode.cpp @ 1335:ae4032fb0a5b

6894807: No ClassCastException for HashAttributeSet constructors if run with -Xcomp Summary: Return interface klass type if it is exact. Reviewed-by: never
author kvn
date Thu, 21 Jan 2010 10:07:59 -0800
parents ce590301ae2a
children 1a1603f975b5
line wrap: on
line diff
--- a/src/share/vm/opto/cfgnode.cpp	Thu Dec 03 14:20:22 2009 -0800
+++ b/src/share/vm/opto/cfgnode.cpp	Thu Jan 21 10:07:59 2010 -0800
@@ -956,6 +956,7 @@
     }
     if( jtkp && ttkp ) {
       if( jtkp->is_loaded() &&  jtkp->klass()->is_interface() &&
+          !jtkp->klass_is_exact() && // Keep exact interface klass (6894807)
           ttkp->is_loaded() && !ttkp->klass()->is_interface() ) {
         assert(ft == ttkp->cast_to_ptr_type(jtkp->ptr()) ||
                ft->isa_narrowoop() && ft->make_ptr() == ttkp->cast_to_ptr_type(jtkp->ptr()), "");