< prev index next >

src/share/vm/services/diagnosticCommand.cpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -421,12 +421,14 @@
   ResourceMark rm;
 
 
   Klass* k = SystemDictionary::resolve_or_null(
     vmSymbols::finalizer_histogram_klass(), THREAD);
-  assert(k != NULL, "FinalizerHistogram class is not accessible");
-
+  if (k == NULL) {
+    output()->print_cr("FinalizerHistogram class is not accessible");
+    return;
+  }
   instanceKlassHandle klass(THREAD, k);
   JavaValue result(T_ARRAY);
 
   // We are calling lang.ref.FinalizerHistogram.getFinalizerHistogram() method
   // and expect it to return array of FinalizerHistogramEntry as Object[]
< prev index next >