Skip to content

Commit

Permalink
fix: delete deprecated dateOfBirth()
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed May 27, 2024
1 parent 870aec2 commit 4d1f75c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,6 @@ public NodeDetailedRelatedPerson(Node node) {
super(node);
}

@Override
public LocalDate dateOfBirth() {
return node.get("Geboorte/Datum")
.flatMap(Node::getValue)
.map(LocalDate::parse)
.orElse(null);
}

@Override
public IncompleteDate incompleteDateOfBirth() {
return node.get("Geboorte/Datum")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,6 @@ interface RelatedPerson {
*/
interface DetailedRelatedPerson extends RelatedPerson {

/**
* The person's date of birth.
*
* @throws java.time.format.DateTimeParseException in case it's an incomplete date.
* @deprecated since this date is possibly incomplete, use {@link #incompleteDateOfBirth()} and call {@link IncompleteDate#toLocalDate()} to extract the actual date. Make sure to handle the {@link IncompleteDateMissingPartException} that may be thrown by that.
*/
@Deprecated(forRemoval = true)
LocalDate dateOfBirth();

/**
* The person's (potentially incomplete) date of birth.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void mapsLastName() {

@Test
void mapsDateOfBirth() {
assertThat(self.dateOfBirth(), is(equalTo(LocalDate.of(2000, 12, 20))));
assertThat(self.incompleteDateOfBirth().toLocalDate(), is(equalTo(LocalDate.of(2000, 12, 20))));
}

@Test
Expand Down

0 comments on commit 4d1f75c

Please sign in to comment.