From 50c1f18b9ea3d62009710e53e91b3b99250ae317 Mon Sep 17 00:00:00 2001 From: Jinil Sung Date: Tue, 28 Nov 2023 10:49:06 -0800 Subject: [PATCH] Removed the code smells by sonar code quality. Removed the code smells by sonar code quality. --- .../api/dataconversion/process/CourseProcess.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/process/CourseProcess.java b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/process/CourseProcess.java index c809ed59..a8830c17 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/process/CourseProcess.java +++ b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/process/CourseProcess.java @@ -43,6 +43,7 @@ public class CourseProcess { private static final String QFRAL_STR = "QFRAL"; private static final String ZFRAL_STR = "ZFRAL"; private static final String IBFAS_STR = "IBFAS"; + private static final String QFRAP_STR = "QFRAP"; private static final String ERR_MSG_FORMAT = "For {} : {}"; @@ -567,8 +568,8 @@ public void createCourseRequirements(ConversionCourseSummaryDTO summary) { createCourseRequirement(populate(QFRAL_STR, "12", "915"), summary); // QFRAP 12 - createCourseRequirement(populate("QFRAP", "12", "910"), summary); - createCourseRequirement(populate("QFRAP", "12", "915"), summary); + createCourseRequirement(populate(QFRAP_STR, "12", "910"), summary); + createCourseRequirement(populate(QFRAP_STR, "12", "915"), summary); // ZFRAL 12 createCourseRequirement(populate(ZFRAL_STR, "12", "819"), summary); @@ -1137,20 +1138,20 @@ public void createCourseRequirements(ConversionCourseSummaryDTO summary) { createCourseRequirement(populate("IDAKE", "11", "119"), summary); // GRAD2-2402: Rule 200 - createCourseRequirement(populate("QFRAP", "12", "200"), summary); + createCourseRequirement(populate(QFRAP_STR, "12", "200"), summary); createCourseRequirement(populate("FCTF", "12", "200"), summary); - createCourseRequirement(populate("FRALP", "12", "200"), summary); + createCourseRequirement(populate(FRALP_STR, "12", "200"), summary); // GRAD2-2402: Rule 201 createCourseRequirement(populate("ELNMF", "11", "201"), summary); createCourseRequirement(populate("ELSLF", "11", "201"), summary); createCourseRequirement(populate("EFLSF", "11", "201"), summary); - createCourseRequirement(populate("FRALP", "11", "201"), summary); + createCourseRequirement(populate(FRALP_STR, "11", "201"), summary); // GRAD2-2402: Rule 202 - createCourseRequirement(populate("QFRAP", "10", "202"), summary); + createCourseRequirement(populate(QFRAP_STR, "10", "202"), summary); createCourseRequirement(populate("LANMF", "10", "202"), summary); createCourseRequirement(populate("LAEOF", "10", "202"), summary); createCourseRequirement(populate("LACWF", "10", "202"), summary); - createCourseRequirement(populate("FRALP", "10", "202"), summary); + createCourseRequirement(populate(FRALP_STR, "10", "202"), summary); } private CourseRequirement populate(String courseCode, String courseLevel, String courseRequirementCode) {