mirror of
https://github.com/apache/openjpa.git
synced 2025-02-23 19:05:00 +00:00
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:
parent
0f5508e680
commit
e56be85085
@ -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();
|
||||
|
@ -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 + ")");
|
||||
|
Loading…
x
Reference in New Issue
Block a user