반환된 org.hibernate.Session 리소스가 안전하게 닫히지 않은 경우 openSession() 메서드 호출을 보고합니다.

이 검사는 기본적으로 리소스의 이름에 'close' 또는 'cleanup'이 붙는 모든 메서드에 의해 닫힐 수 있다고 가정합니다.

예:


  void doHibernateQuery(SessionFactory factory) {
    Session session = factory.openSession(); // 경고
    session.createQuery("...");
  }

다음 옵션을 사용해 검사를 구성하세요.