Skip to content

Commit

Permalink
Remove redundant spaces on error logs (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
sverdlov93 authored Jul 9, 2023
1 parent 19350d7 commit effcca7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

public class SetProperties extends VoidJFrogService {
public static final String SET_PROPERTIES_ENDPOINT = "api/storage/";
private ArrayListMultimap<String, String> propertiesMap;
private final ArrayListMultimap<String, String> propertiesMap;
private final boolean encodeProperties;
private final String relativePath;
private String propertiesString;
private final String propertiesString;

private SetProperties(String relativePath, String propertiesString, ArrayListMultimap<String, String> propertiesMap, boolean encodeProperties, Log log) {
super(log);
Expand Down Expand Up @@ -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());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit effcca7

Please sign in to comment.