mirror of
https://github.com/google/nomulus.git
synced 2025-07-11 21:48:18 +02:00
Consolidate EntityManagerFactoryProviderTest (#253)
Check if EntityManagerFactory is null before calling close() to avoid NullPointerException.
This commit is contained in:
parent
28700cd610
commit
2967256766
2 changed files with 10 additions and 2 deletions
|
@ -42,7 +42,9 @@ public class EntityManagerFactoryProviderTest {
|
|||
|
||||
@After
|
||||
public void destroy() {
|
||||
emf.close();
|
||||
if (emf != null) {
|
||||
emf.close();
|
||||
}
|
||||
emf = null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue