diff options
38 files changed, 82 insertions, 86 deletions
diff --git a/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java b/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java index fb7628d0f..e6a3d6aa5 100644 --- a/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java +++ b/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java @@ -175,7 +175,7 @@ public class ChecksummedFile } catch ( IOException e ) { - log.warn( "Unable to update checksum:" + e.getMessage() ); + log.warn( "Unable to update checksum:{}", e.getMessage() ); return false; } @@ -200,7 +200,7 @@ public class ChecksummedFile } catch ( IOException e ) { - log.warn( "Unable to read / parse checksum: " + e.getMessage() ); + log.warn( "Unable to read / parse checksum: {}", e.getMessage() ); return false; } 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 2f5f439fc..87253b01a 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 @@ -336,7 +336,7 @@ public class DefaultArchivaConfiguration else { // Policy key doesn't exist. Don't add it to golden version. - log.warn( "Policy [" + policyId + "] does not exist." ); + log.warn( "Policy [{}] does not exist.", policyId ); } } diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationTest.java b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationTest.java index b6a678e95..f9b081f3d 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationTest.java @@ -568,7 +568,7 @@ public class ArchivaConfigurationTest assertEquals( "check managed repositories", "default", repository.getLayout() ); assertTrue( "check managed repositories", repository.isScanned() ); - log.info( "knowContentConsumers " + configuration.getRepositoryScanning().getKnownContentConsumers() ); + log.info( "knowContentConsumers {}", configuration.getRepositoryScanning().getKnownContentConsumers() ); assertFalse( configuration.getRepositoryScanning().getKnownContentConsumers().contains( "update-db-artifact" ) ); diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java index d7a585ff8..12a7d1054 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java @@ -206,15 +206,15 @@ public class ArchivaMetadataCreationConsumer catch ( MetadataRepositoryException e ) { log.warn( - "Error occurred persisting metadata for artifact:{} (repository:{}); message: {}" + e.getMessage(), - new Object[]{ path, repoId, e.getMessage() }, e ); + "Error occurred persisting metadata for artifact:{} (repository:{}); message: {}" , + path, repoId, e.getMessage(), e ); repositorySession.revert(); } catch ( RepositoryStorageRuntimeException e ) { log.warn( - "Error occurred persisting metadata for artifact:{} (repository:{}); message: {}" + e.getMessage(), - new Object[]{ path, repoId, e.getMessage() }, e ); + "Error occurred persisting metadata for artifact:{} (repository:{}); message: {}", + path, repoId, e.getMessage(), e ); repositorySession.revert(); } finally diff --git a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java index a586c2b8f..8d1d93ebd 100644 --- a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java +++ b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java @@ -134,11 +134,11 @@ public class LegacyConverterArtifactConsumer } catch ( LayoutException e ) { - log.warn( "Unable to convert artifact: " + path + " : " + e.getMessage(), e ); + log.warn( "Unable to convert artifact: {} : {}",path , e.getMessage(), e ); } catch ( ArtifactConversionException e ) { - log.warn( "Unable to convert artifact: " + path + " : " + e.getMessage(), e ); + log.warn( "Unable to convert artifact: {} : {}",path , e.getMessage(), e ); } } diff --git a/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/MavenRepositorySearchTest.java b/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/MavenRepositorySearchTest.java index c80700fdd..7ab8375da 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/MavenRepositorySearchTest.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/MavenRepositorySearchTest.java @@ -828,7 +828,7 @@ public class MavenRepositorySearchTest archivaConfigControl.verify(); - log.info( "groupIds: " + groupIds ); + log.info( "groupIds: {}", groupIds ); assertEquals( 3, groupIds.size() ); assertTrue( groupIds.contains( "com" ) ); diff --git a/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/DefaultWagonFactory.java b/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/DefaultWagonFactory.java index 50e9d616c..da58f1c40 100755 --- a/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/DefaultWagonFactory.java +++ b/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/DefaultWagonFactory.java @@ -110,7 +110,7 @@ public class DefaultWagonFactory } catch ( Exception e ) { - logger.warn( "fail to configure User-Agent: " + e.getMessage(), e ); + logger.warn( "fail to configure User-Agent: {}", e.getMessage(), e ); } } } diff --git a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java index 687a2d1c7..3bdfab01a 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java @@ -268,11 +268,11 @@ public class DefaultRepositoryProxyConnectors } catch ( RepositoryNotFoundException e ) { - log.warn( "Unable to use proxy connector: " + e.getMessage(), e ); + log.warn( "Unable to use proxy connector: {}", e.getMessage(), e ); } catch ( RepositoryException e ) { - log.warn( "Unable to use proxy connector: " + e.getMessage(), e ); + log.warn( "Unable to use proxy connector: {}", e.getMessage(), e ); } @@ -447,8 +447,8 @@ public class DefaultRepositoryProxyConnectors catch ( ProxyException e ) { log.warn( - "Transfer error from repository \"" + targetRepository.getRepository().getId() + "\" for resource " - + path + ", continuing to next repository. Error message: {}", e.getMessage() ); + "Transfer error from repository {} for resource {}, continuing to next repository. Error message: {}", + targetRepository.getRepository().getId(), path, e.getMessage() ); log.debug( MarkerFactory.getDetachedMarker( "transfer.error" ), "Transfer error from repository \"" + targetRepository.getRepository().getId() + "\" for resource " + path + ", continuing to next repository. Error message: {}", @@ -457,8 +457,7 @@ public class DefaultRepositoryProxyConnectors catch ( RepositoryAdminException e ) { log.debug( MarkerFactory.getDetachedMarker( "transfer.error" ), - "Transfer error from repository \"" + targetRepository.getRepository().getId() - + "\" for resource " + path + ", continuing to next repository. Error message: {}", + "Transfer error from repository {} for resource {}, continuing to next repository. Error message: {}",targetRepository.getRepository().getId(), path, e.getMessage(), e ); log.debug( MarkerFactory.getDetachedMarker( "transfer.error" ), "Full stack trace", e ); } @@ -517,16 +516,14 @@ public class DefaultRepositoryProxyConnectors } catch ( ProxyException e ) { - log.warn( "Transfer error from repository \"" + targetRepository.getRepository().getId() - + "\" for versioned Metadata " + logicalPath - + ", continuing to next repository. Error message: " + e.getMessage() ); + log.warn( "Transfer error from repository {} for versioned Metadata {}, continuing to next repository. Error message: {}", + targetRepository.getRepository().getId(), logicalPath, e.getMessage() ); log.debug( "Full stack trace", e ); } catch ( RepositoryAdminException e ) { - log.warn( "Transfer error from repository \"" + targetRepository.getRepository().getId() - + "\" for versioned Metadata " + logicalPath - + ", continuing to next repository. Error message: " + e.getMessage() ); + log.warn( "Transfer error from repository {} for versioned Metadata {}, continuing to next repository. Error message: {}", + targetRepository.getRepository().getId(), logicalPath, e.getMessage() ); log.debug( "Full stack trace", e ); } } @@ -544,7 +541,7 @@ public class DefaultRepositoryProxyConnectors } catch ( RepositoryMetadataException e ) { - log.warn( "Unable to update metadata " + localFile.getAbsolutePath() + ": " + e.getMessage(), e ); + log.warn( "Unable to update metadata {}:{}", localFile.getAbsolutePath(), e.getMessage(), e ); } } @@ -928,7 +925,7 @@ public class DefaultRepositoryProxyConnectors catch ( ProxyException e ) { urlFailureCache.cacheFailure( url ); - log.warn( "Transfer failed on checksum: " + url + " : " + e.getMessage(), e ); + log.warn( "Transfer failed on checksum: {} : {}",url ,e.getMessage(), e ); // Critical issue, pass it on. throw e; } @@ -1088,8 +1085,8 @@ public class DefaultRepositoryProxyConnectors } log.warn( - "Transfer error from repository \"" + content.getRepository().getId() + "\" for artifact " + Keys.toKey( - artifact ) + ", continuing to next repository. Error message: " + exception.getMessage() ); + "Transfer error from repository {} for artifact {} , continuing to next repository. Error message: {}", + content.getRepository().getId(), Keys.toKey( artifact), exception.getMessage() ); log.debug( "Full stack trace", exception ); } @@ -1214,12 +1211,12 @@ public class DefaultRepositoryProxyConnectors } catch ( ConnectionException e ) { - log.warn( "Could not connect to " + remoteRepository.getRepository().getName() + ": " + e.getMessage() ); + log.warn( "Could not connect to {}: {}", remoteRepository.getRepository().getName(), e.getMessage() ); connected = false; } catch ( AuthenticationException e ) { - log.warn( "Could not connect to " + remoteRepository.getRepository().getName() + ": " + e.getMessage() ); + log.warn( "Could not connect to {}: {}", remoteRepository.getRepository().getName(), e.getMessage() ); connected = false; } diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/AbstractProxyTestCase.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/AbstractProxyTestCase.java index 991b57135..e3f39d2ec 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/AbstractProxyTestCase.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/AbstractProxyTestCase.java @@ -213,7 +213,7 @@ public abstract class AbstractProxyTestCase CacheManager.getInstance().clearAll(); - log.info( "\n.\\ " + name + "() \\._________________________________________\n" ); + log.info( "\n.\\ {}() \\._________________________________________\n", name ); } @After diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/WagonDelegate.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/WagonDelegate.java index dea5ad5b3..71cd32262 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/WagonDelegate.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/WagonDelegate.java @@ -65,7 +65,7 @@ public class WagonDelegate public boolean getIfNewer( String resourceName, File destination, long timestamp ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { - log.info( ".getIfNewer(" + resourceName + ", " + destination + ", " + timestamp + ")" ); + log.info( ".getIfNewer({}, {}, {})", resourceName, destination, timestamp ); boolean result = delegate.getIfNewer( resourceName, destination, timestamp ); createIfMissing( destination ); diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java index 9b1007820..4d0ea216f 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java @@ -389,7 +389,7 @@ public class DefaultManagedRepositoryAdmin catch ( MetadataRepositoryException e ) { //throw new RepositoryAdminException( e.getMessage(), e ); - log.warn( "skip error during removing repository from MetadatRepository:" + e.getMessage(), e ); + log.warn( "skip error during removing repository from MetadatRepository:{}", e.getMessage(), e ); } finally { diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java index 746a57f8b..4f73fa960 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java @@ -48,7 +48,7 @@ public class ManagedRepositoryAdminTest List<ManagedRepository> repos = managedRepositoryAdmin.getManagedRepositories(); assertNotNull( repos ); assertTrue( repos.size() > 0 ); - log.info( "repos " + repos ); + log.info( "repos {}", repos ); // check default internal ManagedRepository internal = findManagedRepoById( repos, "internal" ); diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/remote/RemoteRepositoryAdminTest.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/remote/RemoteRepositoryAdminTest.java index db52d6445..cf062996f 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/remote/RemoteRepositoryAdminTest.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/remote/RemoteRepositoryAdminTest.java @@ -39,7 +39,7 @@ public class RemoteRepositoryAdminTest List<RemoteRepository> remoteRepositories = remoteRepositoryAdmin.getRemoteRepositories(); assertNotNull( remoteRepositories ); assertTrue( remoteRepositories.size() > 0 ); - log.info( "remote " + remoteRepositories ); + log.info( "remote {}", remoteRepositories ); } @Test diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java index c2bcd9a06..157aeaad3 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java @@ -376,7 +376,7 @@ public class MetadataTools { // TODO: [monitor] consider a monitor for this event. // TODO: consider a read-redo on monitor return code? - log.warn( "Unable to read metadata: " + metadataFile.getAbsolutePath(), e ); + log.warn( "Unable to read metadata: {}", metadataFile.getAbsolutePath(), e ); return null; } } @@ -401,7 +401,7 @@ public class MetadataTools { // TODO: [monitor] consider a monitor for this event. // TODO: consider a read-redo on monitor return code? - log.warn( "Unable to read metadata: " + metadataFile.getAbsolutePath(), e ); + log.warn( "Unable to read metadata: {}", metadataFile.getAbsolutePath(), e ); return null; } } @@ -426,7 +426,7 @@ public class MetadataTools { // TODO: [monitor] consider a monitor for this event. // TODO: consider a read-redo on monitor return code? - log.warn( "Unable to read metadata: " + metadataFile.getAbsolutePath(), e ); + log.warn( "Unable to read metadata: {}", metadataFile.getAbsolutePath(), e ); return null; } } diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java index dbc1453b5..5c1e66e4e 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java @@ -73,7 +73,7 @@ public class TriggerBeginScanClosure } catch ( ConsumerException e ) { - log.warn( "Consumer [" + consumer.getId() + "] cannot begin: " + e.getMessage(), e ); + log.warn( "Consumer [{}] cannot begin: {}",consumer.getId(), e.getMessage(), e ); } } } diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DefaultDownloadRemoteIndexScheduler.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DefaultDownloadRemoteIndexScheduler.java index b4c2a633d..05f51d57a 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DefaultDownloadRemoteIndexScheduler.java +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DefaultDownloadRemoteIndexScheduler.java @@ -205,7 +205,7 @@ public class DefaultDownloadRemoteIndexScheduler } catch ( IllegalArgumentException e ) { - log.warn( "Unable to schedule remote index download: " + e.getLocalizedMessage() ); + log.warn( "Unable to schedule remote index download: {}", e.getLocalizedMessage() ); } if ( remoteRepository.isDownloadRemoteIndexOnStartup() ) diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java index d01629b43..c87617880 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java @@ -229,7 +229,7 @@ public class DownloadRemoteIndexTask deleteDirectoryQuiet( tempIndexDirectory ); this.runningRemoteDownloadIds.remove( this.remoteRepository.getId() ); } - log.info( "end download remote index for remote repository " + this.remoteRepository.getId() ); + log.info( "end download remote index for remote repository {}", this.remoteRepository.getId() ); } private void deleteDirectoryQuiet( File f ) diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java index f5956e542..104fa522f 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java @@ -88,7 +88,7 @@ public class DownloadRemoteIndexTaskTest this.server.start(); Connector connector = this.server.getConnectors()[0]; this.port = connector.getLocalPort(); - log.info( "start server on port " + this.port ); + log.info( "start server on port {}", this.port ); nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class ); } @@ -140,7 +140,7 @@ public class DownloadRemoteIndexTaskTest FlatSearchResponse response = nexusIndexer.searchFlat( rq ); - log.info( "returned hit count:" + response.getReturnedHitsCount() ); + log.info( "returned hit count:{}", response.getReturnedHitsCount() ); assertEquals( 8, response.getReturnedHitsCount() ); } diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java index 7fdbf4e92..7055fdea3 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java @@ -281,8 +281,8 @@ public class DefaultBrowseService catch ( MetadataResolutionException e ) { log.warn( - "Skipping invalid metadata while compiling shared model for " + groupId + ":" + artifactId - + " in repo " + repoId + ": " + e.getMessage() ); + "Skipping invalid metadata while compiling shared model for {}:{} in repo {}: {}", + groupId, artifactId, repoId, e.getMessage() ); } } } diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultManagedRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultManagedRepositoriesService.java index 3c20cdd6b..c43f85047 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultManagedRepositoriesService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultManagedRepositoriesService.java @@ -165,7 +165,7 @@ public class DefaultManagedRepositoriesService } catch ( MetadataRepositoryException e ) { - log.warn( "Error retrieving repository statistics: " + e.getMessage(), e ); + log.warn( "Error retrieving repository statistics: {}", e.getMessage(), e ); } if ( stats != null ) { diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultReportRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultReportRepositoriesService.java index 0c4fd1edb..bb5deac15 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultReportRepositoriesService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultReportRepositoriesService.java @@ -82,7 +82,7 @@ public class DefaultReportRepositoriesService } catch ( MetadataRepositoryException e ) { - log.warn( "Unable to retrieve stats, assuming is empty: " + e.getMessage(), e ); + log.warn( "Unable to retrieve stats, assuming is empty: {}", e.getMessage(), e ); } } @@ -109,7 +109,7 @@ public class DefaultReportRepositoriesService } catch ( MetadataRepositoryException e ) { - log.warn( "Unable to retrieve stats, assuming is empty: " + e.getMessage(), e ); + log.warn( "Unable to retrieve stats, assuming is empty: {}", e.getMessage(), e ); } if ( stats == null || stats.isEmpty() ) { diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/ManagedRepositoriesServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/ManagedRepositoriesServiceTest.java index 181514a1d..38e12302b 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/ManagedRepositoriesServiceTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/ManagedRepositoriesServiceTest.java @@ -160,7 +160,7 @@ public class ManagedRepositoriesServiceTest assertNotNull( archivaRepositoryStatistics ); - log.info( "archivaRepositoryStatistics:" + archivaRepositoryStatistics.toString() ); + log.info( "archivaRepositoryStatistics: {}", archivaRepositoryStatistics.toString() ); assertEquals( 92, archivaRepositoryStatistics.getNewFileCount() ); assertEquals( 92, archivaRepositoryStatistics.getTotalFileCount() ); diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java index d44461ed4..b08966685 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java @@ -130,7 +130,7 @@ public class SearchServiceTest for ( Artifact artifact : artifacts ) { - log.info( "url:" + artifact.getUrl() ); + log.info( "url: {}", artifact.getUrl() ); String version = artifact.getVersion(); assertTrue( artifact.getUrl().contains( version ) ); @@ -231,7 +231,7 @@ public class SearchServiceTest for ( Artifact artifact : artifacts ) { - log.info( "url:" + artifact.getUrl() ); + log.info( "url: {}", artifact.getUrl() ); String version = artifact.getVersion(); assertEquals( "http://localhost:" + port + "/repository/test-repo/org/apache/karaf/features/org.apache.karaf.features.core/" @@ -269,7 +269,7 @@ public class SearchServiceTest assertTrue( " not 1 results for Bundle ExportPackage org.apache.karaf.features.command.completers but " + artifacts.size() + ":" + artifacts, artifacts.size() == 1 ); - log.info( "artifact url " + artifacts.get( 0 ).getUrl() ); + log.info( "artifact url {}", artifacts.get( 0 ).getUrl() ); deleteTestRepo( testRepoId ); } @@ -333,7 +333,7 @@ public class SearchServiceTest assertTrue( " not 0 results for Bundle ExportPackage org.apache.karaf.features.command.completers but " + artifacts.size() + ":" + artifacts, artifacts.size() == 1 ); - log.info( "artifact url " + artifacts.get( 0 ).getUrl() ); + log.info( "artifact url {}", artifacts.get( 0 ).getUrl() ); deleteTestRepo( testRepoId ); } @@ -354,7 +354,7 @@ public class SearchServiceTest SearchService searchService = getSearchService( authorizationHeader ); Collection<String> groupIds = searchService.getAllGroupIds( Arrays.asList( testRepoId ) ).getGroupIds(); - log.info( "groupIds " + groupIds ); + log.info( "groupIds {}", groupIds ); assertFalse( groupIds.isEmpty() ); assertTrue( groupIds.contains( "commons-cli" ) ); assertTrue( groupIds.contains( "org.apache.felix" ) ); @@ -384,7 +384,7 @@ public class SearchServiceTest new SearchRequest( "org.foo", "studio-all-update-site", null, null, null, Arrays.asList( "test-repo" ) ); List<Artifact> artifacts = searchService.searchArtifacts( searchRequest ); - log.info( "artifacts:" + artifacts ); + log.info( "artifacts: {}", artifacts ); assertEquals( 1, artifacts.size() ); deleteTestRepo( testRepoId ); } diff --git a/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/ArchivaServletAuthenticator.java b/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/ArchivaServletAuthenticator.java index 0cbc02fd2..76222885c 100644 --- a/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/ArchivaServletAuthenticator.java +++ b/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/ArchivaServletAuthenticator.java @@ -77,8 +77,8 @@ public class ArchivaServletAuthenticator { if ( authzResult.getException() != null ) { - log.info( "Authorization Denied [ip=" + request.getRemoteAddr() + ",permission=" + permission + ",repo=" - + repositoryId + "] : " + authzResult.getException().getMessage() ); + log.info( "Authorization Denied [ip={},permission={},repo={}] : {}", request.getRemoteAddr(), + permission, repositoryId, authzResult.getException().getMessage() ); throw new UnauthorizedException( "Access denied for repository " + repositoryId ); } diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java index a16388301..d230c7ba7 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java @@ -263,7 +263,7 @@ public class RssFeedServlet } catch ( DecoderException ie ) { - log.warn( "Error decoding username and password.", ie.getMessage() ); + log.warn( "Error decoding username and password: {}", ie.getMessage() ); } if ( usernamePassword == null || usernamePassword.trim().equals( "" ) ) diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java index db451617c..a6090cec1 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java @@ -134,7 +134,7 @@ public class ArchivaLockedAdminEnvironmentCheck } catch ( RbacManagerException e ) { - log.warn( "Exception when checking for locked admin user: " + e.getMessage(), e ); + log.warn( "Exception when checking for locked admin user: {}", e.getMessage(), e ); } checked = true; diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/Banner.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/Banner.java index 3547ee308..e36b7bda0 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/Banner.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/Banner.java @@ -224,6 +224,6 @@ public class Banner public static void display( String version ) { String banner = getBanner( version ); - LoggerFactory.getLogger( Banner.class ).info( StringUtils.repeat( "_", 25 ) + eol + banner ); + LoggerFactory.getLogger( Banner.class ).info( "{} {}, {}" , StringUtils.repeat( "_", 25 ), eol, banner ); } } diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/SecuritySynchronization.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/SecuritySynchronization.java index 592b96896..3f4c20909 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/SecuritySynchronization.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/startup/SecuritySynchronization.java @@ -188,7 +188,7 @@ public class SecuritySynchronization EnvironmentCheck check = entry.getValue(); List<String> v = new ArrayList<String>(); check.validateEnvironment( v ); - log.info( "Environment Check: " + entry.getKey() + " -> " + v.size() + " violation(s)" ); + log.info( "Environment Check: {} -> {} violation(s)", entry.getKey(), v.size() ); for ( String s : v ) { violations.add( "[" + entry.getKey() + "] " + s ); @@ -247,8 +247,7 @@ public class SecuritySynchronization } catch ( RbacManagerException e ) { - log.warn( "Unable to add role [" + ArchivaRoleConstants.toRepositoryObserverRoleName( repoId ) + "] to " - + principal + " user.", e ); + log.warn( "Unable to add role [{}] to {} user.", ArchivaRoleConstants.toRepositoryObserverRoleName( repoId ), principal, e ); } } } diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java index 367bc070c..881377931 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java @@ -128,7 +128,7 @@ public abstract class AbstractDownloadTest this.server.start(); Connector connector = this.server.getConnectors()[0]; this.port = connector.getLocalPort(); - log.info( "start server on port " + this.port ); + log.info( "start server on port {}", this.port ); User user = new User(); user.setEmail( "toto@toto.fr" ); diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java index aa1be1a3c..c0d491d69 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java @@ -197,7 +197,7 @@ public class DownloadArtifactsTest } catch ( Throwable e ) { - log.info( "fail to get zipEntries " + e.getMessage(), e ); + log.info( "fail to get zipEntries {}", e.getMessage(), e ); } return Collections.emptyList(); } diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java index d9d1754e8..9b0f15367 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java @@ -629,7 +629,7 @@ public class ArchivaDavResourceFactory } catch ( LayoutException e ) { - log.warn( "Artifact path '" + resourcePath + "' is invalid." ); + log.warn( "Artifact path '{}' is invalid." ,resourcePath ); } } diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedTestCase.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedTestCase.java index c8aeba0e0..1886e01cc 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedTestCase.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedTestCase.java @@ -150,7 +150,7 @@ public abstract class AbstractRepositoryServletProxiedTestCase int port = repo.server.getConnectors()[0].getLocalPort(); repo.url = "http://localhost:" + port + repo.context; - log.info( "Remote HTTP Server started on " + repo.url ); + log.info( "Remote HTTP Server started on {}", repo.url ); repo.config = createRemoteRepository( repo.id, "Testable [" + repo.id + "] Remote Repo", repo.url ); diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java index 2a35f7dcb..d43bed6a6 100644 --- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java +++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java @@ -126,7 +126,7 @@ public class DefaultMetadataResolver } catch ( MetadataRepositoryException e ) { - log.warn( "Unable to persist resolved information: " + e.getMessage(), e ); + log.warn( "Unable to persist resolved information: {}", e.getMessage(), e ); } session.markDirty(); @@ -193,7 +193,7 @@ public class DefaultMetadataResolver } catch ( MetadataRepositoryException e ) { - log.warn( "Unable to persist resolved information: " + e.getMessage(), e ); + log.warn( "Unable to persist resolved information: {}", e.getMessage(), e ); } } session.markDirty(); @@ -233,7 +233,7 @@ public class DefaultMetadataResolver } catch ( MetadataRepositoryException e ) { - log.warn( "Unable to persist resolved information: " + e.getMessage(), e ); + log.warn( "Unable to persist resolved information: {}", e.getMessage(), e ); } } session.markDirty(); @@ -276,7 +276,7 @@ public class DefaultMetadataResolver } catch ( MetadataRepositoryException e ) { - log.warn( "Unable to persist resolved information: " + e.getMessage(), e ); + log.warn( "Unable to persist resolved information: {}", e.getMessage(), e ); } } } @@ -327,13 +327,13 @@ public class DefaultMetadataResolver } catch ( MetadataRepositoryException e ) { - log.warn( "Unable to persist resolved information: " + e.getMessage(), e ); + log.warn( "Unable to persist resolved information: {}", e.getMessage(), e ); } catch ( RepositoryStorageMetadataInvalidException e ) { log.warn( - "Not update project in metadata repository due to an error resolving it from storage: " - + e.getMessage() ); + "Not update project in metadata repository due to an error resolving it from storage: {}", + e.getMessage() ); for ( RepositoryListener listener : listeners ) { @@ -391,7 +391,7 @@ public class DefaultMetadataResolver } catch ( MetadataRepositoryException e ) { - log.warn( "Unable to persist resolved information: " + e.getMessage(), e ); + log.warn( "Unable to persist resolved information: {}", e.getMessage(), e ); } } session.markDirty(); diff --git a/archiva-modules/plugins/audit/src/main/java/org/apache/archiva/audit/MetadataAuditListener.java b/archiva-modules/plugins/audit/src/main/java/org/apache/archiva/audit/MetadataAuditListener.java index cbbb84484..49bd8839c 100644 --- a/archiva-modules/plugins/audit/src/main/java/org/apache/archiva/audit/MetadataAuditListener.java +++ b/archiva-modules/plugins/audit/src/main/java/org/apache/archiva/audit/MetadataAuditListener.java @@ -64,7 +64,7 @@ public class MetadataAuditListener } catch ( MetadataRepositoryException e ) { - log.warn( "Unable to write audit event to repository: " + e.getMessage(), e ); + log.warn( "Unable to write audit event to repository: {}", e.getMessage(), e ); } finally { diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java index 861b57853..48271dbf5 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java @@ -211,7 +211,7 @@ public class Maven2RepositoryStorage catch ( XMLException e ) { // unable to parse metadata - log it, and continue with the version as the original SNAPSHOT version - log.warn( "Invalid metadata: " + metadataFile + " - " + e.getMessage() ); + log.warn( "Invalid metadata: {} - {}", metadataFile, e.getMessage() ); } } @@ -290,8 +290,8 @@ public class Maven2RepositoryStorage if ( ( problem.getException() instanceof FileNotFoundException && e.getModelId() != null && !e.getModelId().equals( problem.getModelId() ) ) ) { - log.warn( "The artifact's parent POM file '" + file + "' cannot be resolved. " + - "Using defaults for project version metadata.." ); + log.warn( "The artifact's parent POM file '{}' cannot be resolved. " + + "Using defaults for project version metadata..", file ); ProjectVersionMetadata metadata = new ProjectVersionMetadata(); metadata.setId( readMetadataRequest.getProjectVersion() ); diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java index 08aacd166..696eb53d7 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java @@ -142,13 +142,13 @@ public class RepositoryModelResolver { log.info( "An exception was caught while attempting to retrieve model '{}' from remote repository '{}'.Reason:{}", - new Object[]{ model.getAbsolutePath(), remoteRepository.getId(), e.getMessage() } ); + model.getAbsolutePath(), remoteRepository.getId(), e.getMessage() ); } catch ( Exception e ) { log.warn( "An exception was caught while attempting to retrieve model '{}' from remote repository '{}'.Reason:{}", - new Object[]{ model.getAbsolutePath(), remoteRepository.getId(), e.getMessage() } ); + model.getAbsolutePath(), remoteRepository.getId(), e.getMessage() ); continue; } diff --git a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/RepositoryProblemEventListener.java b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/RepositoryProblemEventListener.java index 825b2573d..181b0fa96 100644 --- a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/RepositoryProblemEventListener.java +++ b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/RepositoryProblemEventListener.java @@ -51,7 +51,7 @@ public class RepositoryProblemEventListener } catch ( MetadataRepositoryException e ) { - log.warn( "Unable to remove metadata facet as part of delete event: " + e.getMessage(), e ); + log.warn( "Unable to remove metadata facet as part of delete event: {}", e.getMessage(), e ); } } @@ -69,8 +69,8 @@ public class RepositoryProblemEventListener } catch ( MetadataRepositoryException e ) { - log.warn( "Unable to remove repository problem facets for the version being corrected in the repository: " - + e.getMessage(), e ); + log.warn( "Unable to remove repository problem facets for the version being corrected in the repository: {}", + e.getMessage(), e ); } } @@ -92,7 +92,7 @@ public class RepositoryProblemEventListener } catch ( MetadataRepositoryException e ) { - log.warn( "Unable to add repository problem facets for the version being removed: " + e.getMessage(), e ); + log.warn( "Unable to add repository problem facets for the version being removed: {}", e.getMessage(), e ); } } diff --git a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java index c1007aca9..e2ec3bd82 100644 --- a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java +++ b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java @@ -178,7 +178,7 @@ public class DuplicateArtifactsConsumer } catch ( Exception e ) { - log.warn( "Not reporting problem for invalid artifact in checksum check: " + e.getMessage() ); + log.warn( "Not reporting problem for invalid artifact in checksum check: {}", e.getMessage() ); return; } |