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()) {
|
for (EntityManagerFactory emf : emfs.values()) {
|
||||||
try {
|
try {
|
||||||
closeEMF(emf);
|
closeEMF(emf);
|
||||||
|
emf = null;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -576,9 +577,14 @@ public abstract class AbstractTestCase extends AbstractCachedEMFTestCase {
|
||||||
ObjectInputStream in = new ObjectInputStream(bin);
|
ObjectInputStream in = new ObjectInputStream(bin);
|
||||||
Object result = in.readObject();
|
Object result = in.readObject();
|
||||||
|
|
||||||
if (validateEquality) {
|
try {
|
||||||
assertEquals(orig.hashCode(), result.hashCode());
|
if (validateEquality) {
|
||||||
assertEquals(orig, result);
|
assertEquals(orig.hashCode(), result.hashCode());
|
||||||
|
assertEquals(orig, result);
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
out.close();
|
||||||
|
in.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue