summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-11-27 15:32:24 +1100
committerOlivier Lamy <olamy@apache.org>2014-11-27 15:32:24 +1100
commitd9473241c956359325aa10bdbff4e39be284c559 (patch)
treea040370776b9dfc5650ced89400fbcb9909b821d
parentc5e256751603e7893a845f2c094bcc1d5461fc55 (diff)
downloadarchiva-d9473241c956359325aa10bdbff4e39be284c559.tar.gz
archiva-d9473241c956359325aa10bdbff4e39be284c559.zip
format and debug infos
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java24
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java2
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java2
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java8
4 files changed, 21 insertions, 15 deletions
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java
index c6cc9530b..665c80ab2 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java
+++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java
@@ -89,7 +89,7 @@ import java.util.Set;
* before reading it from the registry.
* </p>
*/
-@Service( "archivaConfiguration#default" )
+@Service("archivaConfiguration#default")
public class DefaultArchivaConfiguration
implements ArchivaConfiguration, RegistryListener
{
@@ -99,7 +99,7 @@ public class DefaultArchivaConfiguration
* Plexus registry to read the configuration from.
*/
@Inject
- @Named( value = "commons-configuration" )
+ @Named(value = "commons-configuration")
private Registry registry;
@Inject
@@ -183,7 +183,7 @@ public class DefaultArchivaConfiguration
return configuration;
}
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
private Configuration load()
{
// TODO: should this be the same as section? make sure unnamed sections still work (eg, sys properties)
@@ -439,7 +439,7 @@ public class DefaultArchivaConfiguration
return registry.getSubset( KEY );
}
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
@Override
public synchronized void save( Configuration configuration )
throws IndeterminateConfigurationException, RegistryException
@@ -464,10 +464,13 @@ public class DefaultArchivaConfiguration
// a little aggressive with the repositoryScanning and databaseScanning - should be no need to split
// that configuration
- if ( key.startsWith( "repositories" ) || key.startsWith( "proxyConnectors" ) || key.startsWith(
- "networkProxies" ) || key.startsWith( "repositoryScanning" ) || key.startsWith(
- "remoteRepositories" ) || key.startsWith( "managedRepositories" ) || key.startsWith(
- "repositoryGroups" ) )
+ if ( key.startsWith( "repositories" ) //
+ || key.startsWith( "proxyConnectors" ) //
+ || key.startsWith( "networkProxies" ) //
+ || key.startsWith( "repositoryScanning" ) //
+ || key.startsWith( "remoteRepositories" ) //
+ || key.startsWith( "managedRepositories" ) //
+ || key.startsWith( "repositoryGroups" ) ) //
{
foundList = true;
}
@@ -537,8 +540,6 @@ public class DefaultArchivaConfiguration
{
c.setRefreshCronExpression( escapeCronExpression( c.getRefreshCronExpression() ) );
}
-
-
}
private Registry createDefaultConfigurationFile()
@@ -558,8 +559,7 @@ public class DefaultArchivaConfiguration
throw new RegistryException(
"Unable to create configuration file in either user [" + userConfigFilename + "] or alternative ["
+ altConfigFilename
- + "] locations on disk, usually happens when not allowed to write to those locations."
- );
+ + "] locations on disk, usually happens when not allowed to write to those locations." );
}
}
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java
index 34ed1b606..3da5a37ea 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java
@@ -731,7 +731,7 @@ public class DefaultRedbackRuntimeConfigurationAdmin
{
Collection<String> keys = userConfiguration.getKeys();
- Set<String> keysSet = new HashSet<String>( keys );
+ Set<String> keysSet = new HashSet<>( keys );
keysSet.addAll( getRedbackRuntimeConfiguration().getConfigurationProperties().keySet() );
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java
index 89cd78be4..b0107cc38 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/AbstractRestService.java
@@ -77,7 +77,7 @@ import java.util.Map;
public abstract class AbstractRestService
{
- protected Logger log = LoggerFactory.getLogger( getClass() );
+ protected final Logger log = LoggerFactory.getLogger( getClass() );
@Inject
private List<AuditListener> auditListeners = new ArrayList<>();
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
index 209c405c8..5d3aa8e40 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
@@ -62,6 +62,7 @@ public class DefaultRedbackRuntimeConfigurationService
extends AbstractRestService
implements RedbackRuntimeConfigurationService
{
+
@Inject
private RedbackRuntimeConfigurationAdmin redbackRuntimeConfigurationAdmin;
@@ -97,7 +98,12 @@ public class DefaultRedbackRuntimeConfigurationService
{
try
{
- return redbackRuntimeConfigurationAdmin.getRedbackRuntimeConfiguration();
+ RedbackRuntimeConfiguration redbackRuntimeConfiguration =
+ redbackRuntimeConfigurationAdmin.getRedbackRuntimeConfiguration();
+
+ log.debug( "getRedbackRuntimeConfiguration -> {}", redbackRuntimeConfiguration );
+
+ return redbackRuntimeConfiguration;
}
catch ( RepositoryAdminException e )
{