Author: hardy.ferentschik
Date: 2007-09-20 11:13:34 -0400 (Thu, 20 Sep 2007)
New Revision: 14014
Modified:
search/trunk/src/test/org/hibernate/search/test/jpa/EntityManagerSerializationTest.java
Log:
HSEARCH-117 Cleaned up the code a little.
Modified:
search/trunk/src/test/org/hibernate/search/test/jpa/EntityManagerSerializationTest.java
===================================================================
---
search/trunk/src/test/org/hibernate/search/test/jpa/EntityManagerSerializationTest.java 2007-09-20
14:54:45 UTC (rev 14013)
+++
search/trunk/src/test/org/hibernate/search/test/jpa/EntityManagerSerializationTest.java 2007-09-20
15:13:34 UTC (rev 14014)
@@ -38,7 +38,7 @@
File tmpFile = File.createTempFile("entityManager", "ser", null);
serializeEM(em, tmpFile);
- em = deserializeEM(em, tmpFile);
+ em = deserializeEM(tmpFile);
indexSearchAssert(em);
@@ -48,8 +48,8 @@
tmpFile.delete();
}
- private FullTextEntityManager deserializeEM(FullTextEntityManager em,
- File tmpFile) throws ClassNotFoundException {
+ private FullTextEntityManager deserializeEM(File tmpFile) throws ClassNotFoundException
{
+ FullTextEntityManager em = null;
FileInputStream fis = null;
ObjectInputStream in = null;
try {
@@ -60,11 +60,12 @@
}
catch (IOException ex) {
ex.printStackTrace();
+ fail();
}
return em;
}
- private File serializeEM(FullTextEntityManager em, File tmpFile) {
+ private void serializeEM(FullTextEntityManager em, File tmpFile) {
FileOutputStream fos = null;
ObjectOutputStream out = null;
try {
@@ -76,7 +77,6 @@
ex.printStackTrace();
fail();
}
- return tmpFile;
}
public Class[] getAnnotatedClasses() {
Show replies by date