diff --git a/spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepository.java b/spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepository.java index 695c415c01..679d691b26 100644 --- a/spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepository.java +++ b/spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepository.java @@ -4,7 +4,7 @@ import org.baeldung.boot.model.Foo; public interface FooRepository { - public void save(Foo foo); + void save(Foo foo); - public Foo get(Integer id); + Foo get(Integer id); } diff --git a/spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepositoryImpl.java b/spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepositoryImpl.java index b358b0e2c5..83de888e5e 100644 --- a/spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepositoryImpl.java +++ b/spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepositoryImpl.java @@ -19,7 +19,7 @@ public class FooRepositoryImpl implements FooRepository { @Override public Foo get(Integer id) { - return (Foo) sessionFactory.getCurrentSession().get(Foo.class, id); + return sessionFactory.getCurrentSession().get(Foo.class, id); } } \ No newline at end of file