hotspot/src/share/vm/oops/instanceKlass.hpp
changeset 40894 7d17619c0140
parent 40887 8d35e19f5548
child 40909 0bb3d95b9577
--- a/hotspot/src/share/vm/oops/instanceKlass.hpp	Wed Aug 31 11:47:14 2016 +0300
+++ b/hotspot/src/share/vm/oops/instanceKlass.hpp	Wed Aug 31 06:35:19 2016 -0400
@@ -771,7 +771,10 @@
   static int  _previous_version_count;
  public:
   static void purge_previous_versions(InstanceKlass* ik);
-  static bool has_previous_versions() { return _previous_version_count > 0; }
+  static bool has_previous_versions() {
+    assert(_previous_version_count >= 0, "count should never be negative");
+    return _previous_version_count > 0;
+  }
 
   // JVMTI: Support for caching a class file before it is modified by an agent that can do retransformation
   void set_cached_class_file(JvmtiCachedClassFileData *data) {