< prev index next >

src/hotspot/share/oops/instanceKlass.cpp

Print this page

        

@@ -2198,11 +2198,11 @@
       // Use load_acquire due to competing with inserts
       Klass* impl = Atomic::load_acquire(adr_implementor());
       if (impl != NULL && !impl->is_loader_alive()) {
         // NULL this field, might be an unloaded klass or NULL
         Klass* volatile* klass = adr_implementor();
-        if (Atomic::cmpxchg((Klass*)NULL, klass, impl) == impl) {
+        if (Atomic::cmpxchg(klass, impl, (Klass*)NULL) == impl) {
           // Successfully unlinking implementor.
           if (log_is_enabled(Trace, class, unload)) {
             ResourceMark rm;
             log_trace(class, unload)("unlinking class (implementor): %s", impl->external_name());
           }
< prev index next >