diff --git a/src/main/java/mate/academy/util/HibernateUtil.java b/src/main/java/mate/academy/util/HibernateUtil.java index 19e14d1a..d939efad 100644 --- a/src/main/java/mate/academy/util/HibernateUtil.java +++ b/src/main/java/mate/academy/util/HibernateUtil.java @@ -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(); @@ -17,8 +21,4 @@ private static SessionFactory buildSessionFactory() { public static SessionFactory getSessionFactory() { return sessionFactory; } - - private HibernateUtil() { - // Private constructor to prevent instantiation - } }