Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant spaces on error logs #747

Merged
merged 7 commits into from
Jul 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
}