prevent NPE

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1425375 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-12-22 23:44:40 +00:00
parent 93bca03337
commit ac4d4bb080
1 changed files with 9 additions and 0 deletions

View File

@ -226,10 +226,19 @@ public class DefaultRedbackRuntimeConfigurationAdmin
new BeanReplicator().replicateBean( archivaRuntimeConfiguration,
org.apache.archiva.configuration.RedbackRuntimeConfiguration.class );
if ( archivaRuntimeConfiguration.getLdapConfiguration() == null )
{
archivaRuntimeConfiguration.setLdapConfiguration( new LdapConfiguration() );
}
redbackRuntimeConfiguration.setLdapConfiguration(
new BeanReplicator().replicateBean( archivaRuntimeConfiguration.getLdapConfiguration(),
org.apache.archiva.configuration.LdapConfiguration.class ) );
if ( archivaRuntimeConfiguration.getUsersCacheConfiguration() == null )
{
archivaRuntimeConfiguration.setUsersCacheConfiguration( new CacheConfiguration() );
}
redbackRuntimeConfiguration.setUsersCacheConfiguration(
new BeanReplicator().replicateBean( archivaRuntimeConfiguration.getUsersCacheConfiguration(),
org.apache.archiva.configuration.CacheConfiguration.class ) );