jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Brosius <dbros...@apache.org>
Subject Curious synchronous code
Date Fri, 11 Nov 2011 05:38:02 GMT
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?

Mime
View raw message