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
This commit is contained in:
Brett Porter 2007-08-22 14:15:38 +00:00
parent 4ca6b3fe22
commit b525d2423a
1 changed files with 4 additions and 7 deletions

View 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 )