Cleanup redundant logger fields (#101655)

Making loggers static that can be made static, removing redundant test
loggers (we already have the correct per class logger in this.logger)
and also removing some just unused loggers.
This commit is contained in:
Armin Braun 2023-11-02 18:01:14 +01:00 committed by GitHub
parent 8485cd7e83
commit 995b4d3c69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
91 changed files with 82 additions and 229 deletions

View file

@ -33,7 +33,7 @@ class RetryingHttpInputStream extends InputStream {
public static final int MAX_SUPPRESSED_EXCEPTIONS = 10;
public static final long MAX_RANGE_VAL = Long.MAX_VALUE - 1;
private final Logger logger = LogManager.getLogger(RetryingHttpInputStream.class);
private static final Logger logger = LogManager.getLogger(RetryingHttpInputStream.class);
private final String blobName;
private final URI blobURI;

View file

@ -37,7 +37,7 @@ import java.util.Map;
public class URLHttpClient implements Closeable {
public static final int MAX_ERROR_MESSAGE_BODY_SIZE = 1024;
private static final int MAX_CONNECTIONS = 50;
private final Logger logger = LogManager.getLogger(URLHttpClient.class);
private static final Logger logger = LogManager.getLogger(URLHttpClient.class);
private final CloseableHttpClient client;
private final URLHttpClientSettings httpClientSettings;
@ -142,7 +142,7 @@ public class URLHttpClient implements Closeable {
};
}
private void handleInvalidResponse(CloseableHttpResponse response) {
private static void handleInvalidResponse(CloseableHttpResponse response) {
int statusCode = response.getStatusLine().getStatusCode();
String errorBody = parseBodyAsString(response, MAX_ERROR_MESSAGE_BODY_SIZE);
throw new URLHttpClientException(statusCode, createErrorMessage(statusCode, errorBody));
@ -156,7 +156,7 @@ public class URLHttpClient implements Closeable {
}
}
private String parseBodyAsString(CloseableHttpResponse response, int maxSize) {
private static String parseBodyAsString(CloseableHttpResponse response, int maxSize) {
String errorMessage = "";
InputStream bodyContent = null;
try {