src/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java

Print this page

        

@@ -276,11 +276,11 @@
                 caller = sun.reflect.Reflection.getCallerClass(3);
                 modifiers = field.getModifiers();
                 sun.reflect.misc.ReflectUtil.ensureMemberAccess(
                     caller, tclass, null, modifiers);
                 sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
-            } catch(Exception ex) {
+            } catch (Exception ex) {
                 throw new RuntimeException(ex);
             }
 
             Class fieldt = field.getType();
             if (fieldt != long.class)

@@ -329,11 +329,11 @@
 
         private void ensureProtectedAccess(T obj) {
             if (cclass.isInstance(obj)) {
                 return;
             }
-            throw new RuntimeException (
+            throw new RuntimeException(
                 new IllegalAccessException("Class " +
                     cclass.getName() +
                     " can not access a protected member of class " +
                     tclass.getName() +
                     " using an instance of " +

@@ -359,11 +359,11 @@
                 caller = sun.reflect.Reflection.getCallerClass(3);
                 modifiers = field.getModifiers();
                 sun.reflect.misc.ReflectUtil.ensureMemberAccess(
                     caller, tclass, null, modifiers);
                 sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
-            } catch(Exception ex) {
+            } catch (Exception ex) {
                 throw new RuntimeException(ex);
             }
 
             Class fieldt = field.getType();
             if (fieldt != long.class)

@@ -385,11 +385,11 @@
                 ensureProtectedAccess(obj);
         }
 
         public boolean compareAndSet(T obj, long expect, long update) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            synchronized(this) {
+            synchronized (this) {
                 long v = unsafe.getLong(obj, offset);
                 if (v != expect)
                     return false;
                 unsafe.putLong(obj, offset, update);
                 return true;

@@ -400,11 +400,11 @@
             return compareAndSet(obj, expect, update);
         }
 
         public void set(T obj, long newValue) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            synchronized(this) {
+            synchronized (this) {
                 unsafe.putLong(obj, offset, newValue);
             }
         }
 
         public void lazySet(T obj, long newValue) {

@@ -411,20 +411,20 @@
             set(obj, newValue);
         }
 
         public long get(T obj) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            synchronized(this) {
+            synchronized (this) {
                 return unsafe.getLong(obj, offset);
             }
         }
 
         private void ensureProtectedAccess(T obj) {
             if (cclass.isInstance(obj)) {
                 return;
             }
-            throw new RuntimeException (
+            throw new RuntimeException(
                 new IllegalAccessException("Class " +
                     cclass.getName() +
                     " can not access a protected member of class " +
                     tclass.getName() +
                     " using an instance of " +