diff --git a/native/fhir-to-bal-lib/src/main/java/org/wso2/healthcare/fhir/ballerina/packagegen/tool/config/PackageConfig.java b/native/fhir-to-bal-lib/src/main/java/org/wso2/healthcare/fhir/ballerina/packagegen/tool/config/PackageConfig.java index 6e4f0f4..6e6cacc 100644 --- a/native/fhir-to-bal-lib/src/main/java/org/wso2/healthcare/fhir/ballerina/packagegen/tool/config/PackageConfig.java +++ b/native/fhir-to-bal-lib/src/main/java/org/wso2/healthcare/fhir/ballerina/packagegen/tool/config/PackageConfig.java @@ -32,9 +32,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import static org.wso2.healthcare.fhir.ballerina.packagegen.tool.ToolConstants.EQUAL_SIGN; -import static org.wso2.healthcare.fhir.ballerina.packagegen.tool.ToolConstants.REGEX_FOR_DEPENDENT_IG_AND_PACKAGE; - /** * Ballerina package level config. */ @@ -174,10 +171,10 @@ public Map getDependentIgs() { public void setDependentIgs(List dependentIgs) { for (String dependentIg : dependentIgs) { // This regex will validate the profile dependentIg pattern =/ - Pattern pattern = Pattern.compile(REGEX_FOR_DEPENDENT_IG_AND_PACKAGE); + Pattern pattern = Pattern.compile(ToolConstants.REGEX_FOR_DEPENDENT_IG_AND_PACKAGE); Matcher matcher = pattern.matcher(dependentIg); if (matcher.matches()) { - String[] separatedIgUrlAndDependentPackage = dependentIg.split(EQUAL_SIGN); + String[] separatedIgUrlAndDependentPackage = dependentIg.split(ToolConstants.EQUAL_SIGN); this.dependentIgs.put(separatedIgUrlAndDependentPackage[0], separatedIgUrlAndDependentPackage[1]); } else { throw new RuntimeException("Provided profile dependentIg is wrong: " + dependentIg + " " + diff --git a/native/fhir-to-bal-lib/src/main/java/org/wso2/healthcare/fhir/ballerina/packagegen/tool/templategen/ResourceTemplateGenerator.java b/native/fhir-to-bal-lib/src/main/java/org/wso2/healthcare/fhir/ballerina/packagegen/tool/templategen/ResourceTemplateGenerator.java index 8aba409..493b767 100644 --- a/native/fhir-to-bal-lib/src/main/java/org/wso2/healthcare/fhir/ballerina/packagegen/tool/templategen/ResourceTemplateGenerator.java +++ b/native/fhir-to-bal-lib/src/main/java/org/wso2/healthcare/fhir/ballerina/packagegen/tool/templategen/ResourceTemplateGenerator.java @@ -136,7 +136,7 @@ private TemplateContext createTemplateContextForResourceSkeletons(ResourceTempla templateContext.setProperty("importIdentifier", this.resourceProperties.get("importIdentifier")); Set resourceDependencies = new TreeSet<>(); - if (!(boolean)this.resourceProperties.get("isBasePackage")){ + if (!(boolean) this.resourceProperties.get("isBasePackage")) { resourceDependencies.add((String) this.resourceProperties.get("basePackage")); }