[DS-3952] Drop dangling references that caused unfortunate coupling

with following test classes.
This commit is contained in:
Mark H. Wood
2018-10-02 12:33:53 -04:00
committed by Mark H. Wood
parent c063434e01
commit 6fa5bf6548
3 changed files with 10 additions and 4 deletions

View File

@@ -41,8 +41,13 @@ public class RequestItemBuilder
@Override
public void cleanup()
throws Exception {
LOG.info("cleanup()");
delete(context,requestItem);
LOG.debug("cleanup()");
if (null != requestItem) {
delete(context, requestItem);
requestItem = null;
} else {
LOG.debug("nothing to clean up.");
}
}
public static RequestItemBuilder createRequestItem(Context ctx, Item item,