From 55045c37c4a27277c0bfc4f93384b62b8086ac32 Mon Sep 17 00:00:00 2001 From: Andrej Petras Date: Fri, 29 Nov 2024 09:04:45 +0100 Subject: [PATCH] fix: sonar issues --- .../java/org/tkit/onecx/parameters/test/AbstractTest.java | 4 ++-- .../java/org/tkit/onecx/parameters/test/SecurityTest.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/tkit/onecx/parameters/test/AbstractTest.java b/src/test/java/org/tkit/onecx/parameters/test/AbstractTest.java index 6310990..538cdcb 100644 --- a/src/test/java/org/tkit/onecx/parameters/test/AbstractTest.java +++ b/src/test/java/org/tkit/onecx/parameters/test/AbstractTest.java @@ -60,7 +60,7 @@ protected void clearExpectation(MockServerClient client) { MOCK_IDS.clear(); } - static public String createToken(String orgId) { + public static String createToken(String orgId) { JsonObjectBuilder claims = Json.createObjectBuilder(); claims.add(Claims.preferred_username.name(), "test"); claims.add(Claims.sub.name(), "test"); @@ -68,7 +68,7 @@ static public String createToken(String orgId) { return Jwt.claims(claims.build()).sign(KEY); } - static PrivateKey KEY = createKey(); + static final PrivateKey KEY = createKey(); static PrivateKey createKey() { try { diff --git a/src/test/java/org/tkit/onecx/parameters/test/SecurityTest.java b/src/test/java/org/tkit/onecx/parameters/test/SecurityTest.java index 5872369..94ddccc 100644 --- a/src/test/java/org/tkit/onecx/parameters/test/SecurityTest.java +++ b/src/test/java/org/tkit/onecx/parameters/test/SecurityTest.java @@ -40,6 +40,7 @@ public SecurityTestConfig getConfig() { return config; } + @Override public void default_security_test(String client, List scopes, Integer expectation, String url, String method) { var apm = createToken("org1");