Java 17 features (#15493)

- add missing @override
- Java style array syntax
- remove redundant modifiers
- always move String constants to left side in comparisons
- simplify lambda expressions and return statements
- use replace instead of replaceAll w/o regex

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
Holger Friedrich
2023-08-26 08:52:11 +02:00
committed by GitHub
parent d36833feef
commit 5b42c4b071
26 changed files with 79 additions and 82 deletions

View File

@@ -540,7 +540,7 @@ public class CloudClient {
try {
headerValue = requestHeadersJson.getString(headerName);
logger.debug("Jetty set header {} = {}", headerName, headerValue);
if (!headerName.equalsIgnoreCase("Content-Length")) {
if (!"Content-Length".equalsIgnoreCase(headerName)) {
request.header(headerName, headerValue);
}
} catch (JSONException e) {

View File

@@ -380,6 +380,6 @@ public class CloudService implements ActionService, CloudClientListener, EventSu
}
private boolean supportsUpdates() {
return cloudBaseUrl.indexOf(CFG_BASE_URL) >= 0;
return cloudBaseUrl.contains(CFG_BASE_URL);
}
}