aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-base/archiva-configuration/src/main
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2007-08-03 14:48:18 +0000
committerBrett Porter <brett@apache.org>2007-08-03 14:48:18 +0000
commit19800f99da50780b6dd4c75d74fbdc6951852308 (patch)
tree2964c833203ce70c63fc2fd966f213398ca2e7ce /archiva-base/archiva-configuration/src/main
parentad906608b7174923cb6fadd2ac2ec9f4560066e3 (diff)
downloadarchiva-19800f99da50780b6dd4c75d74fbdc6951852308.tar.gz
archiva-19800f99da50780b6dd4c75d74fbdc6951852308.zip
[MRM-430] revert configuration if it failed to save
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@562488 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-base/archiva-configuration/src/main')
-rw-r--r--archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java5
1 files changed, 3 insertions, 2 deletions
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 6cf53bd0a..540a86539 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
@@ -28,7 +28,6 @@ import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationExce
import org.codehaus.plexus.registry.Registry;
import org.codehaus.plexus.registry.RegistryException;
import org.codehaus.plexus.registry.RegistryListener;
-import org.codehaus.plexus.registry.commons.CommonsConfigurationRegistry;
import org.codehaus.plexus.util.StringUtils;
import java.io.File;
@@ -148,6 +147,8 @@ public class DefaultArchivaConfiguration
}
else if ( registry.getSection( KEY + ".base" ) != null )
{
+ this.configuration = null;
+
throw new IndeterminateConfigurationException(
"Configuration can not be saved when it is loaded from two sources" );
}
@@ -174,7 +175,7 @@ public class DefaultArchivaConfiguration
try
{
- ( (CommonsConfigurationRegistry) registry ).initialize();
+ ( (Initializable) registry ).initialize();
}
catch ( InitializationException e )
{