Skip to content

Commit a3be92f

Browse files
author
soletsdev
committed
code cleanup
1 parent b1df93a commit a3be92f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

api/src/main/java/ca/bc/gov/educ/penreg/api/orchestrator/BaseReturnFilesOrchestrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ protected List<SchoolContact> getStudentRegistrationContactsByMincode(final PenR
287287
return this.getStudentRegistrationContactService().getStudentRegistrationContactsByMincode(penRequestBatchEntity.getMincode());
288288
} catch (final NullPointerException e) {
289289
log.error("Error while trying to get get student registration contact. The student registration contact map is null", e);
290-
return null;
290+
return Collections.emptyList();
291291
}
292292
}
293293

api/src/test/java/ca/bc/gov/educ/penreg/api/rest/RestUtilsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public void testGetStudentRegistrationContacts_shouldReturnData() {
245245
when(this.responseMock.bodyToFlux(SchoolContactSearchWrapper.class)).thenReturn(Flux.just(createSchoolContactSearchWrapper()));
246246

247247
final var result = this.restUtils.getStudentRegistrationContactList("10200001");
248-
assertThat(result.size()).isEqualTo(2);
248+
assertThat(result).hasSize(2);
249249
assertThat(result.get(0).getEmail()).isEqualTo("[email protected]");
250250
assertThat(result.get(0).getFirstName()).isEqualTo("Joe");
251251
assertThat(result.get(1).getEmail()).isEqualTo("[email protected]");

0 commit comments

Comments
 (0)