Consolidate EntityManagerFactoryProviderTest (#253)

Check if EntityManagerFactory is null before calling close() to avoid NullPointerException.
This commit is contained in:
Shicong Huang 2019-09-04 15:46:13 -04:00 committed by GitHub
parent 28700cd610
commit 2967256766
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -42,7 +42,9 @@ public class EntityManagerFactoryProviderTest {
@After
public void destroy() {
emf.close();
if (emf != null) {
emf.close();
}
emf = null;
}