]> source.dussan.org Git - archiva.git/commitdiff
fix the test cases - we should be synchronizing on the current class, not the configu...
authorBrett Porter <brett@apache.org>
Wed, 22 Aug 2007 14:15:38 +0000 (14:15 +0000)
committerBrett Porter <brett@apache.org>
Wed, 22 Aug 2007 14:15:38 +0000 (14:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@568618 13f79535-47bb-0310-9956-ffa450edef68

archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java

index 7ed026b7bbd674c9da63d35727f225c7df35dd20..75ab8442663e8cd66c95367edeed9de56f9d30c1 100644 (file)
@@ -186,8 +186,8 @@ public class DefaultArchivaConfiguration
 
         if ( configuration.getDatabaseScanning() != null )
         {
-            configuration.getDatabaseScanning().setCronExpression( escapeCronExpression(
-                configuration.getDatabaseScanning().getCronExpression() ) );
+            configuration.getDatabaseScanning().setCronExpression(
+                escapeCronExpression( configuration.getDatabaseScanning().getCronExpression() ) );
         }
 
         new ConfigurationRegistryWriter().write( configuration, section );
@@ -262,12 +262,9 @@ public class DefaultArchivaConfiguration
         // nothing to do here
     }
 
-    public void afterConfigurationChange( Registry registry, String propertyName, Object propertyValue )
+    public synchronized void afterConfigurationChange( Registry registry, String propertyName, Object propertyValue )
     {
-        synchronized( configuration )
-        {
-            configuration = null;
-        }
+        configuration = null;
     }
 
     private String removeExpressions( String directory )