Skip to content

Commit

Permalink
HibernateUtil.java
Browse files Browse the repository at this point in the history
  • Loading branch information
VladSlob authored Jul 28, 2024
1 parent 6e0dcc5 commit d38b384
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/mate/academy/util/HibernateUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
public class HibernateUtil {
private static final SessionFactory sessionFactory = buildSessionFactory();

private HibernateUtil() {
// Private constructor to prevent instantiation
}

private static SessionFactory buildSessionFactory() {
try {
return new Configuration().configure().buildSessionFactory();
Expand All @@ -17,8 +21,4 @@ private static SessionFactory buildSessionFactory() {
public static SessionFactory getSessionFactory() {
return sessionFactory;
}

private HibernateUtil() {
// Private constructor to prevent instantiation
}
}

0 comments on commit d38b384

Please sign in to comment.