From d35d4e978f6cc6fd0808232bc48d4c41b79d6adb Mon Sep 17 00:00:00 2001 From: stelar7 Date: Thu, 24 Nov 2022 23:41:33 +0100 Subject: [PATCH] Log warning about different keys --- src/main/java/no/stelar7/api/r4j/basic/APICredentials.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/no/stelar7/api/r4j/basic/APICredentials.java b/src/main/java/no/stelar7/api/r4j/basic/APICredentials.java index a337144b..b6645581 100644 --- a/src/main/java/no/stelar7/api/r4j/basic/APICredentials.java +++ b/src/main/java/no/stelar7/api/r4j/basic/APICredentials.java @@ -4,6 +4,7 @@ import no.stelar7.api.r4j.basic.utils.Base32; import java.security.*; +import java.util.logging.Logger; public class APICredentials { @@ -29,6 +30,10 @@ public APICredentials(final String lol, final String tournament, final String tf this.TFTAPIKey = tft; this.LORAPIKey = lor; this.VALAPIKey = val; + + if (lol != null && tournament != null && !lol.equals(tournament)) { + Logger.getGlobal().warning("Using different keys for league and tournament might lead to decryption exceptions"); + } }