mirror of https://github.com/apache/openjpa.git
close streams
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1006009 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
733d90cea6
commit
9c87751ae7
|
@ -139,6 +139,7 @@ public abstract class AbstractTestCase extends AbstractCachedEMFTestCase {
|
|||
for (EntityManagerFactory emf : emfs.values()) {
|
||||
try {
|
||||
closeEMF(emf);
|
||||
emf = null;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -576,9 +577,14 @@ public abstract class AbstractTestCase extends AbstractCachedEMFTestCase {
|
|||
ObjectInputStream in = new ObjectInputStream(bin);
|
||||
Object result = in.readObject();
|
||||
|
||||
if (validateEquality) {
|
||||
assertEquals(orig.hashCode(), result.hashCode());
|
||||
assertEquals(orig, result);
|
||||
try {
|
||||
if (validateEquality) {
|
||||
assertEquals(orig.hashCode(), result.hashCode());
|
||||
assertEquals(orig, result);
|
||||
}
|
||||
} finally {
|
||||
out.close();
|
||||
in.close();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue