OPENJPA-1097 Remove duplicate code in DetachManager and cleanup comments/traces in tests

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@923958 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Donald Woods 2010-03-16 20:08:28 +00:00
parent 0f5508e680
commit e56be85085
2 changed files with 3 additions and 3 deletions

View File

@ -568,7 +568,6 @@ public class DetachManager
proxy.getChangeTracker().stopTracking();
proxy.setOwner(dsm, (dsm == null) ? -1 : fmd.getIndex());
}
sm.provideField(getDetachedPersistenceCapable(), this, fmd.getIndex());
}
}
clear();

View File

@ -159,7 +159,7 @@ public class TestDetachNoProxy extends SingleEMFTestCase {
em.detachAll(e20List.get(0), e20List.get(1), e20List.get(2));
for (int i=0; i<numEntities; i++) {
if (log.isTraceEnabled())
log.trace("** after EM.clear() verify Entity20(" + i + ")");
log.trace("** after EM.detachAll() verify e20List(" + i + ")");
Entity20 e20 = e20List.get(i);
// entity should not have any proxy classes (in-place updated) and is detached
assertFalse(em.contains(e20));
@ -171,7 +171,7 @@ public class TestDetachNoProxy extends SingleEMFTestCase {
}
/*
* Verify that after EM.clear() in-place detached entities do not contain any proxy classes.
* Verify that after EM.clear() entities still contain proxy classes.
*/
public void testClear() {
if (log.isTraceEnabled())
@ -191,6 +191,7 @@ public class TestDetachNoProxy extends SingleEMFTestCase {
}
em.clear();
for (int i=0; i<numEntities; i++) {
if (log.isTraceEnabled())
log.trace("** after EM.clear() verify Entity20(" + i + ")");