Ver código fonte

UpdateRecordedYearOfBirthFailing Completed

Andrew Grant 7 meses atrás
pai
commit
fd1ef6c229

+ 3 - 6
src/main/java/scot/carricksoftware/grants/services/census/censusentry/UpdateRecordedYearOfBirthImpl.java

@@ -49,11 +49,8 @@ public class UpdateRecordedYearOfBirthImpl implements UpdateRecordedYearOfBirth
                             String dateString) {
         logger.info("UpdateRecordedYearOfBirthImpl::Date");
         PersonCommand personCommand = personConverter.convert(person);
-        if (personCommand != null) {
-            personCommand.setRecordedYearOfBirth(dateString);
-            personService.savePersonCommand(personCommand);
-        } else {
-            logger.error(" -- Person command is null");
-        }
+        assert (personCommand != null);
+        personCommand.setRecordedYearOfBirth(dateString);
+        personService.savePersonCommand(personCommand);
     }
 }

+ 1 - 0
src/test/java/scot/carricksoftware/grants/services/census/censusentry/UpdateRecordedYearOfBirthFailingTest.java

@@ -71,4 +71,5 @@ class UpdateRecordedYearOfBirthFailingTest {
     }
 
 
+
 }