Merge
authorroland
Thu, 02 Apr 2015 10:38:36 +0000
changeset 30214 7037da36374a
parent 30212 c623f227022e (current diff)
parent 30213 79c4cfb7f7cf (diff)
child 30215 24fb50d99dc3
Merge
--- a/hotspot/src/share/vm/opto/castnode.cpp	Thu Apr 02 11:28:55 2015 +0200
+++ b/hotspot/src/share/vm/opto/castnode.cpp	Thu Apr 02 10:38:36 2015 +0000
@@ -216,16 +216,13 @@
   const Type *result = _type;
   if( in_type != NULL && my_type != NULL ) {
     TypePtr::PTR   in_ptr    = in_type->ptr();
-    if( in_ptr == TypePtr::Null ) {
+    if (in_ptr == TypePtr::Null) {
       result = in_type;
-    } else if( in_ptr == TypePtr::Constant ) {
-      // Casting a constant oop to an interface?
-      // (i.e., a String to a Comparable?)
-      // Then return the interface.
+    } else if (in_ptr == TypePtr::Constant) {
       const TypeOopPtr *jptr = my_type->isa_oopptr();
-      assert( jptr, "" );
-      result =  (jptr->klass()->is_interface() || !in_type->higher_equal(_type))
-      ? my_type->cast_to_ptr_type( TypePtr::NotNull )
+      assert(jptr, "");
+      result = !in_type->higher_equal(_type)
+      ? my_type->cast_to_ptr_type(TypePtr::NotNull)
       : in_type;
     } else {
       result =  my_type->cast_to_ptr_type( my_type->join_ptr(in_ptr) );