git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[utils]
/
support
/
general
/
src
/
main
/
java
/
org
/
wamblee
/
cache
/
CachedObject.java
diff --git
a/support/general/src/main/java/org/wamblee/cache/CachedObject.java
b/support/general/src/main/java/org/wamblee/cache/CachedObject.java
index 87feaf0e003f957d0f3310071fae9aab47c4cac4..7ec87534f08e521ec5c95bcccc6ec4b0479277a0 100644
(file)
--- a/
support/general/src/main/java/org/wamblee/cache/CachedObject.java
+++ b/
support/general/src/main/java/org/wamblee/cache/CachedObject.java
@@
-112,7
+112,7
@@
public class CachedObject<KeyType extends Serializable, ValueType extends Serial
synchronized (this) {
value = object;
synchronized (this) {
value = object;
- }
+ }
} catch (Exception e) {
LOGGER.log(Level.INFO,
"Recomputation of cached item failed for key '" + objectKey +
} catch (Exception e) {
LOGGER.log(Level.INFO,
"Recomputation of cached item failed for key '" + objectKey +
@@
-122,8
+122,9
@@
public class CachedObject<KeyType extends Serializable, ValueType extends Serial
computing = false;
}
}
computing = false;
}
}
-
- return value;
+ synchronized(this) {
+ return value;
+ }
}
/**
}
/**