< prev index next >

src/hotspot/share/runtime/javaThread.inline.hpp

Print this page
*** 239,17 ***
  
  inline InstanceKlass* JavaThread::class_to_be_initialized() const {
    return _class_to_be_initialized;
  }
  
! inline void JavaThread::set_class_being_initialized(InstanceKlass* k) {
-   assert(k != nullptr || _class_being_initialized != nullptr, "incorrect usage");
    assert(this == Thread::current(), "Only the current thread can set this field");
    _class_being_initialized = k;
  }
  
  inline InstanceKlass* JavaThread::class_being_initialized() const {
    return _class_being_initialized;
  }
  
  inline void JavaThread::om_set_monitor_cache(ObjectMonitor* monitor) {
    assert(UseObjectMonitorTable, "must be");
--- 239,19 ---
  
  inline InstanceKlass* JavaThread::class_to_be_initialized() const {
    return _class_to_be_initialized;
  }
  
! inline InstanceKlass* JavaThread::set_class_being_initialized(InstanceKlass* k) {
    assert(this == Thread::current(), "Only the current thread can set this field");
+   InstanceKlass* prev = _class_being_initialized;
    _class_being_initialized = k;
+   return prev;
  }
  
  inline InstanceKlass* JavaThread::class_being_initialized() const {
+   assert(this == Thread::current(), "Only the current thread can get this field");
    return _class_being_initialized;
  }
  
  inline void JavaThread::om_set_monitor_cache(ObjectMonitor* monitor) {
    assert(UseObjectMonitorTable, "must be");
< prev index next >