MEVENIDE-618 synchronize the flushPluginMap and getPluginsAsMap to prevent NPEs in multi thread access.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@643878 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Milos Kleint 2008-04-02 12:40:13 +00:00
parent 7442d682d1
commit 30ea33aefb
1 changed files with 2 additions and 2 deletions

View File

@ -834,7 +834,7 @@
/**
* Reset the <code>pluginsMap</code> field to <code>null</code>
*/
public void flushPluginMap()
public synchronized void flushPluginMap()
{
this.pluginMap = null;
}
@ -843,7 +843,7 @@
* @return a Map of plugins field with <code>Plugins#getKey()</code> as key
* @see org.apache.maven.model.Plugin#getKey()
*/
public java.util.Map getPluginsAsMap()
public synchronized java.util.Map getPluginsAsMap()
{
if ( pluginMap == null )
{