From: Brett Porter Date: Wed, 22 Aug 2007 14:15:38 +0000 (+0000) Subject: fix the test cases - we should be synchronizing on the current class, not the configu... X-Git-Tag: archiva-1.0-beta-2~47 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b525d2423ad4bb52da5667fa8d077201121bcd1d;p=archiva.git fix the test cases - we should be synchronizing on the current class, not the configuration object itself git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@568618 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java b/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java index 7ed026b7b..75ab84426 100644 --- a/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java +++ b/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java @@ -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 )