< prev index next >

src/hotspot/share/oops/oop.inline.hpp

Print this page

        

@@ -386,11 +386,11 @@
 // not headers.
 oop oopDesc::atomic_exchange_oop(oop exchange_value, volatile HeapWord *dest) {
   if (UseCompressedOops) {
     // encode exchange value from oop to T
     narrowOop val = encode_heap_oop(exchange_value);
-    narrowOop old = (narrowOop)Atomic::xchg(val, (narrowOop*)dest);
+    narrowOop old = Atomic::xchg(val, (narrowOop*)dest);
     // decode old from T to oop
     return decode_heap_oop(old);
   } else {
     return Atomic::xchg(exchange_value, (oop*)dest);
   }
< prev index next >