Skip to content

Commit

Permalink
Solved
Browse files Browse the repository at this point in the history
  • Loading branch information
pochtalon committed Aug 1, 2023
1 parent 24af8ff commit 9501030
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Binary file modified mem.lck
Binary file not shown.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.4.27.Final</version>
<version>6.2.5.Final</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/mate/academy/dao/MovieDaoImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public Optional<Movie> get(Long id) throws DataProcessingException {
Session session = null;
try {
session = sessionFactory.openSession();
return Optional.of(session.get(Movie.class, id));
return Optional.ofNullable(session.get(Movie.class, id));
} catch (Exception e) {
throw new DataProcessingException("Something went wrong", e);
} finally {
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/mate/academy/model/Movie.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package mate.academy.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;

@Entity
@Table(name = "ticket_app")
Expand Down

0 comments on commit 9501030

Please sign in to comment.