Skip to content

Commit

Permalink
Small fix for NPE.
Browse files Browse the repository at this point in the history
  • Loading branch information
arcshiftsolutions committed Sep 17, 2024
1 parent 9062a76 commit aa72b2f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ protected void checkFieldValueExactMatchWithInvalidText(final List<PenRequestStu
&& el.getEffectiveDate().isBefore(LocalDate.now())
&& el.getExpiryDate().isAfter(LocalDate.now())
&& fieldValue.equalsIgnoreCase(el.getInvalidText())))
.collect(Collectors.toList());
.toList();
if (!filteredList.isEmpty()) {
final boolean isError;
final boolean isWarning;
Expand Down Expand Up @@ -325,7 +325,7 @@ protected List<PenRequestStudentValidationIssue> checkForInvalidTextAndOneChar(f
if (this.resultsContainNoError(results)) {
this.checkFieldValueExactMatchWithInvalidText(results, fieldValue, penRequestStudentValidationFieldCode, validationPayload.getIsInteractive(), penNameTextService.getPenNameTexts());
}
if (this.resultsContainNoError(results) && fieldValue.trim().length() == 1) {
if (this.resultsContainNoError(results) && StringUtils.isNotBlank(fieldValue) && fieldValue.trim().length() == 1) {
results.add(this.createValidationEntity(WARNING, ONE_CHAR_NAME, penRequestStudentValidationFieldCode));
}
log.debug("transaction ID :: {} , returning results size :: {}", validationPayload.getTransactionID(), results.size());
Expand Down

0 comments on commit aa72b2f

Please sign in to comment.