Skip to content

Commit

Permalink
RIA-Task Fix Sonar scan issue out of country circumstances field (#961)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasKKC authored Oct 25, 2024
1 parent eb75ccb commit d172fce
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private static void addAppealOocFields(AsylumCase asylumCase, Map<String, Object
Optional<OutOfCountryCircumstances> maybeOutOfCountryCircumstances = asylumCase.read(OOC_APPEAL_ADMIN_J, OutOfCountryCircumstances.class);

if (maybeOutOfCountryCircumstances.isPresent() && isInternalCase(asylumCase) && !isAppellantInUk(asylumCase)) {
populateOutOfCircumstancesInternalCase(fieldValues, maybeOutOfCountryCircumstances);
populateOutOfCircumstancesInternalCase(fieldValues, maybeOutOfCountryCircumstances.get());
} else if (maybeOutOfCountryDecisionType.isPresent()) {
fieldValues.put(OUT_OF_COUNTRY_DECISION_TYPE_TITLE, "Out of country decision type");

Expand All @@ -214,8 +214,7 @@ private static void addAppealOocFields(AsylumCase asylumCase, Map<String, Object
}
}

private static void populateOutOfCircumstancesInternalCase(Map<String, Object> fieldValues, Optional<OutOfCountryCircumstances> maybeOutOfCountryCircumstances) {
OutOfCountryCircumstances outOfCountryCircumstances = maybeOutOfCountryCircumstances.get();
private static void populateOutOfCircumstancesInternalCase(Map<String, Object> fieldValues, OutOfCountryCircumstances outOfCountryCircumstances) {
if (outOfCountryCircumstances.equals(ENTRY_CLEARANCE_DECISION)) {
fieldValues.put(OUT_OF_COUNTRY_DECISION_TYPE_TITLE, CIRCUMSTANCES_OF_THE_APPELLANT_S_OUT_OF_COUNTRY_APPEAL_TITLE);
fieldValues.put(OUT_OF_COUNTRY_DECISION_TYPE_TEXT, THE_APPELLANT_IS_APPEALING_AN_ENTRY_CLEARANCE_DECISION);
Expand Down

0 comments on commit d172fce

Please sign in to comment.