Skip to content

Commit 05c0dce

Browse files
authored
Merge pull request #4 from ShiftLeftSecurity/hubert/issues/fix-npe
Fixing NPE
2 parents 7a9d320 + 0b970f1 commit 05c0dce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/io/shiftleft/controller/PatientController.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ public class PatientController {
3232
@RequestMapping(value = "/patients", method = RequestMethod.GET)
3333
public Iterable<Patient> getPatient() {
3434
Patient pat = patientRepository.findOne(1l);
35-
log.info("First Patient is {}", pat.toString());
35+
if (pat != null) {
36+
log.info("First Patient is {}", pat.toString());
37+
}
3638
return patientRepository.findAll();
3739
}
3840

0 commit comments

Comments
 (0)