Skip to content

Commit

Permalink
implement reveiw
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Dec 24, 2024
1 parent 5083068 commit 0cafd32
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<TenantConfigProvider.TenantConfig> tenantConfig = getTenantConfig(hostname,
subdomain,
Optional<TenantConfigProvider.TenantConfig> 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> tenantClientCustomization = getTenantClientCustomization(hostname,
subdomain,
Optional<TenantClientCustomization> 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, //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Integer, QuarterData> quarters = new HashMap<>();
private static Map<Integer, QuarterData> quarters = new HashMap<>();
private static final Logger logger = LoggerFactory.getLogger(QuarterFunction.class);

public static void initQuarterData() {
Expand Down

0 comments on commit 0cafd32

Please sign in to comment.