changeset 26692:b24a4cc794ce

8057799: Unnecessary NULL check in G1KeepAliveClosure Reviewed-by: tschatzl, stefank
author tonyp
date Wed, 10 Sep 2014 11:55:33 +0200
parents 59219d1be209
children f2910bf56d71
files hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Mon Sep 08 17:47:43 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Wed Sep 10 11:55:33 2014 +0200
@@ -5448,9 +5448,10 @@
   void do_oop(narrowOop* p) { guarantee(false, "Not needed"); }
   void do_oop(oop* p) {
     oop obj = *p;
+    assert(obj != NULL, "the caller should have filtered out NULL values");
 
     G1CollectedHeap::in_cset_state_t cset_state = _g1->in_cset_state(obj);
-    if (obj == NULL || cset_state == G1CollectedHeap::InNeither) {
+    if (cset_state == G1CollectedHeap::InNeither) {
       return;
     }
     if (cset_state == G1CollectedHeap::InCSet) {