From effcca790725ef7b3e861ab9c71b28a845aabf8d Mon Sep 17 00:00:00 2001 From: Michael Sverdlov Date: Sun, 9 Jul 2023 15:52:11 +0300 Subject: [PATCH] Remove redundant spaces on error logs (#747) --- .../client/artifactory/services/DownloadBase.java | 2 +- .../client/artifactory/services/SetProperties.java | 6 +++--- .../client/distribution/services/DeleteReleaseBundle.java | 4 ++-- .../distribution/services/DistributeReleaseBundle.java | 4 ++-- .../distribution/services/VoidDistributionService.java | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/artifactory/services/DownloadBase.java b/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/artifactory/services/DownloadBase.java index 6b8148d5e..071840963 100644 --- a/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/artifactory/services/DownloadBase.java +++ b/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/artifactory/services/DownloadBase.java @@ -45,7 +45,7 @@ protected void handleUnsuccessfulResponse(HttpEntity entity) throws IOException if (statusCode == HttpStatus.SC_NOT_FOUND) { throw new FileNotFoundException("Unable to find " + downloadPath); } - log.error("Failed to download from '" + downloadPath + "'"); + log.error("Failed to download from '" + downloadPath + "'"); throwException(entity, getStatusCode()); } } diff --git a/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/artifactory/services/SetProperties.java b/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/artifactory/services/SetProperties.java index ad5f3fcc2..f702def51 100644 --- a/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/artifactory/services/SetProperties.java +++ b/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/artifactory/services/SetProperties.java @@ -18,10 +18,10 @@ public class SetProperties extends VoidJFrogService { public static final String SET_PROPERTIES_ENDPOINT = "api/storage/"; - private ArrayListMultimap propertiesMap; + private final ArrayListMultimap propertiesMap; private final boolean encodeProperties; private final String relativePath; - private String propertiesString; + private final String propertiesString; private SetProperties(String relativePath, String propertiesString, ArrayListMultimap propertiesMap, boolean encodeProperties, Log log) { super(log); @@ -52,7 +52,7 @@ public HttpRequestBase createRequest() throws IOException { @Override protected void handleUnsuccessfulResponse(HttpEntity entity) throws IOException { - log.error("Failed to set properties to '" + relativePath + "'"); + log.error("Failed to set properties to '" + relativePath + "'"); throwException(entity, getStatusCode()); } diff --git a/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/distribution/services/DeleteReleaseBundle.java b/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/distribution/services/DeleteReleaseBundle.java index 700d7e3a4..5579376f8 100644 --- a/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/distribution/services/DeleteReleaseBundle.java +++ b/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/distribution/services/DeleteReleaseBundle.java @@ -65,12 +65,12 @@ public HttpRequestBase createRequest() throws IOException { protected void setResponse(InputStream stream) throws IOException { result = getMapper().readValue(stream, DistributeReleaseBundleResponse.class); log.debug("Deletion response: " + getStatusCode()); - log.debug("Response: " + toJsonString(result)); + log.debug("Response: " + toJsonString(result)); } @Override public DistributeReleaseBundleResponse execute(JFrogHttpClient client) throws IOException { - log.info(request.isDryRun() ? "[Dry run] " : "" + "Deleting " + name + " / " + version); + log.info(request.isDryRun() ? "[Dry run] " : "Deleting " + name + " / " + version); super.execute(client); if (sync && !request.isDryRun()) { waitForDeletion(client); diff --git a/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/distribution/services/DistributeReleaseBundle.java b/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/distribution/services/DistributeReleaseBundle.java index e06a5550b..7e4f2444e 100644 --- a/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/distribution/services/DistributeReleaseBundle.java +++ b/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/distribution/services/DistributeReleaseBundle.java @@ -63,7 +63,7 @@ public HttpRequestBase createRequest() throws IOException { @Override public DistributeReleaseBundleResponse execute(JFrogHttpClient client) throws IOException { - log.info(request.isDryRun() ? "[Dry run] " : "" + "Distributing " + name + " / " + version); + log.info(request.isDryRun() ? "[Dry run] " : "Distributing " + name + " / " + version); super.execute(client); if (sync && !request.isDryRun()) { waitForDistribution(client); @@ -75,7 +75,7 @@ public DistributeReleaseBundleResponse execute(JFrogHttpClient client) throws IO protected void setResponse(InputStream stream) throws IOException { result = getMapper().readValue(stream, DistributeReleaseBundleResponse.class); log.debug("Distribution response: " + getStatusCode()); - log.debug("Response: " + toJsonString(result)); + log.debug("Response: " + toJsonString(result)); } private void waitForDistribution(JFrogHttpClient client) throws IOException { diff --git a/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/distribution/services/VoidDistributionService.java b/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/distribution/services/VoidDistributionService.java index 10109e89e..3b0733215 100644 --- a/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/distribution/services/VoidDistributionService.java +++ b/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/distribution/services/VoidDistributionService.java @@ -19,6 +19,6 @@ protected VoidDistributionService(Log log) { @Override protected void setResponse(InputStream stream) throws IOException { String ResponseMessage = getStatusCode() + IOUtils.toString(stream, StandardCharsets.UTF_8.name()); - log.debug("Distribution response: " + ResponseMessage); + log.debug("Distribution response: " + ResponseMessage); } }