diff --git a/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/util/LocalDateConverter.java b/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/util/LocalDateConverter.java index 341492d1fd..00fd378b05 100644 --- a/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/util/LocalDateConverter.java +++ b/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/util/LocalDateConverter.java @@ -10,15 +10,15 @@ import java.util.Optional; public class LocalDateConverter implements AttributeConverter { @Override - public Date convertToDatabaseColumn(LocalDate localDateTime) { - return Optional.ofNullable(localDateTime) + public Date convertToDatabaseColumn(LocalDate localDate) { + return Optional.ofNullable(localDate) .map(Date::valueOf) .orElse(null); } @Override - public LocalDate convertToEntityAttribute(Date timestamp) { - return Optional.ofNullable(timestamp) + public LocalDate convertToEntityAttribute(Date date) { + return Optional.ofNullable(date) .map(Date::toLocalDate) .orElse(null); }