From 30ea33aefbb94badfa39456365d2d2b232ada8b3 Mon Sep 17 00:00:00 2001 From: Milos Kleint Date: Wed, 2 Apr 2008 12:40:13 +0000 Subject: [PATCH] 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 --- maven-model/src/main/mdo/maven.mdo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maven-model/src/main/mdo/maven.mdo b/maven-model/src/main/mdo/maven.mdo index c3c11c0ffd..06aa186713 100644 --- a/maven-model/src/main/mdo/maven.mdo +++ b/maven-model/src/main/mdo/maven.mdo @@ -834,7 +834,7 @@ /** * Reset the pluginsMap field to null */ - public void flushPluginMap() + public synchronized void flushPluginMap() { this.pluginMap = null; } @@ -843,7 +843,7 @@ * @return a Map of plugins field with Plugins#getKey() as key * @see org.apache.maven.model.Plugin#getKey() */ - public java.util.Map getPluginsAsMap() + public synchronized java.util.Map getPluginsAsMap() { if ( pluginMap == null ) {