From: <tr...@hy...> - 2009-04-24 21:13:28
|
Author: trader Date: 2009-04-24 14:13:24 -0700 (Fri, 24 Apr 2009) New Revision: 13052 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=13052 Modified: trunk/src/org/hyperic/hq/product/ControlPluginManager.java Log: Fix synchronization hole Modified: trunk/src/org/hyperic/hq/product/ControlPluginManager.java =================================================================== --- trunk/src/org/hyperic/hq/product/ControlPluginManager.java 2009-04-24 21:01:35 UTC (rev 13051) +++ trunk/src/org/hyperic/hq/product/ControlPluginManager.java 2009-04-24 21:13:24 UTC (rev 13052) @@ -107,7 +107,11 @@ public String getNextJob(String name) throws NoSuchElementException { - LinkedList list = (LinkedList)this.pluginQueue.get(name); + LinkedList list; + synchronized (this.pluginQueue) { + list = (LinkedList) this.pluginQueue.get(name); + } + if (list == null) throw new NoSuchElementException(); |