Does the below fix need porting to 1.8?
Kees Jongenburger wrote:
Update of /var/cvs/src/org/mmbase/security/implementation/context
In directory james.mmbase.org:/tmp/cvs-serv18236
Modified Files:
Tag: MMBase-1_7
ContextAuthorization.java ContextCache.java
Log Message:
keesj:fix for #6853 rights context cache already contained this entry waring,
fixed indenting , added beter debug output
See also:
http://cvs.mmbase.org/viewcvs/src/org/mmbase/security/implementation/context
Index: ContextAuthorization.java
===================================================================
<snippety>
public void rightAdd(String operation, String context, String user,
boolean value) {
+ //get and put operations on the cache are synchronized but still
+ //it's possible that 2 threads first perform a rightGet that
proves
+ //that no entry is in the cache. after that both threads would
start
+ //adding operation to the cache one after the other this is why we check here again if the
+ //operation is in the cache
+ if (rightGet(operation, context, user) != null){
+ if (log.isDebugEnabled()){
+ log.debug("prevented to put a double entry in the
cache");
+ }
+ return;
+ }
--
Pierre van Rooden
Mediapark, C 107 tel. +31 (0)35 6772815
"Hard work may pay off in the long run, but laziness always pays off
right now."
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers