From 7920a950aa94d9994bef9078f2326aa1fd2a7e5a Mon Sep 17 00:00:00 2001 From: Donald Woods Date: Fri, 8 Oct 2010 21:50:48 +0000 Subject: [PATCH] rollback all SingleEMTestCase changes git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1006039 13f79535-47bb-0310-9956-ffa450edef68 --- .../persistence/test/SingleEMTestCase.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMTestCase.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMTestCase.java index 0037c9939..74b621388 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMTestCase.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMTestCase.java @@ -106,20 +106,16 @@ public abstract class SingleEMTestCase * @return false if the EntityManager was already closed. */ protected boolean close() { - boolean brc = false; if (em == null) - return brc; + return false; - try { - rollback(); + rollback(); - if (!em.isOpen()) - return brc; - } finally { - em.close(); - brc = em.isOpen(); - } - return !brc; + if (!em.isOpen()) + return false; + + em.close(); + return !em.isOpen(); } /**