(no commit message)
[utils] / support / general / src / main / java / org / wamblee / cache / CachedObject.java
index 7ec87534f08e521ec5c95bcccc6ec4b0479277a0..da86298d6598115f9f5b4a683a27053c8f08da73 100644 (file)
@@ -79,10 +79,10 @@ public class CachedObject<KeyType extends Serializable, ValueType extends Serial
      * method may return different objects.
      * 
      * If the object is expired from the cache it is recomputed using the
-     * callback. In case the callback throws an exception the
-     * last known value is used. In case an exception is thrown, the problem is
-     * also logged. In case a recomputation is already being done by another
-     * thread, the last known value is immediately returned.
+     * callback. In case the callback throws an exception the last known value
+     * is used. In case an exception is thrown, the problem is also logged. In
+     * case a recomputation is already being done by another thread, the last
+     * known value is immediately returned.
      * 
      * @return Object.
      */
@@ -112,7 +112,7 @@ public class CachedObject<KeyType extends Serializable, ValueType extends Serial
 
             synchronized (this) {
                 value = object;
-            } 
+            }
         } catch (Exception e) {
             LOGGER.log(Level.INFO,
                 "Recomputation of cached item failed for key '" + objectKey +
@@ -122,8 +122,8 @@ public class CachedObject<KeyType extends Serializable, ValueType extends Serial
                 computing = false;
             }
         }
-        synchronized(this) { 
-            return value; 
+        synchronized (this) {
+            return value;
         }
     }
 
@@ -152,9 +152,9 @@ public class CachedObject<KeyType extends Serializable, ValueType extends Serial
      */
     public static interface Computation<Key extends Serializable, Value extends Serializable> {
         /**
-         * Gets the object. Called when the object is not in the cache.
-         * In case computation fails, an exception should be thrown to ensure that the last 
-         * known value will be used. 
+         * Gets the object. Called when the object is not in the cache. In case
+         * computation fails, an exception should be thrown to ensure that the
+         * last known value will be used.
          * 
          * @param aObjectKey
          *            Id of the object in the cache.