You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Dave Brosius <db...@apache.org> on 2011/11/11 06:38:02 UTC
Curious synchronous code
In QueryStatImpl.java
public void setSlowQueriesQueueSize(int size) {
synchronized (*queries*) {
this.queueSize = size;
this.*queries* = new
PriorityQueue<QueryStatDto>(this.queueSize + 1,
comparator);
}
}
this seems really odd to me, code is synchronizing on the old value of a
field, to update it to a new value. Is this intended?