--- a/hotspot/src/share/vm/opto/graphKit.cpp Tue Mar 03 18:01:27 2015 +0100
+++ b/hotspot/src/share/vm/opto/graphKit.cpp Mon Mar 23 22:08:14 2015 +0100
@@ -3024,12 +3024,7 @@
// We may not have profiling here or it may not help us. If we have
// a speculative type use it to perform an exact cast.
ciKlass* spec_obj_type = obj_type->speculative_type();
- if (spec_obj_type != NULL ||
- (data != NULL &&
- // Counter has never been decremented (due to cast failure).
- // ...This is a reasonable thing to expect. It is true of
- // all casts inserted by javac to implement generic types.
- data->as_CounterData()->count() >= 0)) {
+ if (spec_obj_type != NULL || data != NULL) {
cast_obj = maybe_cast_profiled_receiver(not_null_obj, tk->klass(), spec_obj_type, safe_for_replace);
if (cast_obj != NULL) {
if (failure_control != NULL) // failure is now impossible