Fix SAT warnings (#14214)

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
Holger Friedrich
2023-01-13 19:10:59 +01:00
committed by GitHub
parent 4dd60bb442
commit ee54882841
10 changed files with 57 additions and 52 deletions

View File

@@ -74,7 +74,7 @@ public class NetworkUtils {
/**
* Adds cors headers to the given response and returns it.
*/
public static ResponseBuilder ResponseWithCors(ResponseBuilder response) {
public static ResponseBuilder responseWithCors(ResponseBuilder response) {
return response.encoding(StandardCharsets.UTF_8.name()) //
.header("Access-Control-Allow-Origin", "*")
.header("Access-Control-Allow-Headers", "origin, content-type, accept, authorization")

View File

@@ -95,7 +95,7 @@ public class CommonSetup {
@SuppressWarnings("unchecked")
@Override
public <T> Storage<T> getStorage(String name) {
if (name.equals("hueEmulationUsers")) {
if ("hueEmulationUsers".equals(name)) {
return (Storage<T>) new DummyUsersStorage();
}
throw new IllegalStateException();

View File

@@ -122,7 +122,7 @@ public class UsersAndConfigTests {
}
@Test
public void UnauthorizedAccessTest() {
public void unauthorizedAccessTest() {
// Unauthorized config
Response response;
response = commonSetup.client.target(commonSetup.basePath + "/config").request().get();