summaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorJames William Dumay <jdumay@apache.org>2009-03-13 05:22:58 +0000
committerJames William Dumay <jdumay@apache.org>2009-03-13 05:22:58 +0000
commit47b437abc9a13ce91d2ea0a0c15fe463938dfc88 (patch)
tree57612ef287348b1e4cd9ac954ae83889b583b1db /archiva-modules
parent15f58a9233564f799307364957d337aabca56b6d (diff)
downloadarchiva-47b437abc9a13ce91d2ea0a0c15fe463938dfc88.tar.gz
archiva-47b437abc9a13ce91d2ea0a0c15fe463938dfc88.zip
MRM-1138 - Fix java.lang.NullPointerException: configuration can not be null on startup
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@753121 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java
index af3180d13..cb00de9a8 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java
+++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java
@@ -138,9 +138,14 @@ public class DefaultArchivaConfiguration
*/
private boolean isConfigurationDefaulted = false;
- private static final String KEY = "org.apache.maven.archiva";
+ private static final String KEY = "org.apache.maven.archiva";
- public synchronized Configuration getConfiguration()
+ public Configuration getConfiguration()
+ {
+ return loadConfiguration();
+ }
+
+ private synchronized Configuration loadConfiguration()
{
if ( configuration == null )
{
@@ -642,13 +647,13 @@ public class DefaultArchivaConfiguration
expressionEvaluator.addExpressionSource( new SystemPropertyExpressionSource() );
userConfigFilename = expressionEvaluator.expand( userConfigFilename );
altConfigFilename = expressionEvaluator.expand( altConfigFilename );
+ loadConfiguration();
}
catch ( EvaluatorException e )
{
throw new InitializationException( "Unable to evaluate expressions found in "
+ "userConfigFilename or altConfigFilename." );
}
-
registry.addChangeListener( this );
}