From 0cafd3233731c60d9d4dbf5daaf232d1a780797f Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Tue, 24 Dec 2024 10:35:02 +0100 Subject: [PATCH] implement reveiw --- .../clientconfig/ClientConfigService.java | 18 +++++++++--------- .../quarter/generate/h2/QuarterFunction.java | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/backend/src/main/java/ch/puzzle/okr/service/clientconfig/ClientConfigService.java b/backend/src/main/java/ch/puzzle/okr/service/clientconfig/ClientConfigService.java index 0a522a141f..1e51f13b4c 100644 --- a/backend/src/main/java/ch/puzzle/okr/service/clientconfig/ClientConfigService.java +++ b/backend/src/main/java/ch/puzzle/okr/service/clientconfig/ClientConfigService.java @@ -28,26 +28,26 @@ public ClientConfigService(final TenantClientCustomizationProvider clientCustomi this.tenantClientCustomizationProvider = clientCustomizationProvider; } - public ClientConfigDto getConfigBasedOnActiveEnv(String hostname) { - String subdomain = hostname.split("\\.")[0]; - String domainPrefixByHyphen = hostname.split("-")[0]; + public ClientConfigDto getConfigBasedOnActiveEnv(String hostName) { + String subDomain = hostName.split("\\.")[0]; + String domainPrefixByHyphen = hostName.split("-")[0]; - Optional tenantConfig = getTenantConfig(hostname, - subdomain, + Optional tenantConfig = getTenantConfig(hostName, + subDomain, domainPrefixByHyphen); if (tenantConfig.isEmpty()) { throw new EntityNotFoundException(MessageFormat - .format("Could not find tenant config for subdomain:{0}", subdomain)); + .format("Could not find tenant config for subDomain:{0}", subDomain)); } - Optional tenantClientCustomization = getTenantClientCustomization(hostname, - subdomain, + Optional tenantClientCustomization = getTenantClientCustomization(hostName, + subDomain, domainPrefixByHyphen); if (tenantClientCustomization.isEmpty()) { throw new EntityNotFoundException(MessageFormat - .format("Could not find tenant client customization for subdomain:{0}", subdomain)); + .format("Could not find tenant client customization for subDomain:{0}", subDomain)); } return new ClientConfigDto(activeProfile, // diff --git a/backend/src/main/java/ch/puzzle/okr/util/quarter/generate/h2/QuarterFunction.java b/backend/src/main/java/ch/puzzle/okr/util/quarter/generate/h2/QuarterFunction.java index fc6d08ec29..60425ac0c5 100644 --- a/backend/src/main/java/ch/puzzle/okr/util/quarter/generate/h2/QuarterFunction.java +++ b/backend/src/main/java/ch/puzzle/okr/util/quarter/generate/h2/QuarterFunction.java @@ -22,7 +22,7 @@ public class QuarterFunction { public static final int CURRENT_QUARTER_DB_ID = 2; public static final int NEXT_QUARTER_DB_ID = 3; - private static final Map quarters = new HashMap<>(); + private static Map quarters = new HashMap<>(); private static final Logger logger = LoggerFactory.getLogger(QuarterFunction.class); public static void initQuarterData() {