Object toPush = item;
boolean releasable = false;
if (release && toPush instanceof ResourceOwner) {
ResourceOwner resourceOwner = (ResourceOwner)toPush;
if (!existsInStacks(resourceOwner)) {
toPush = new ReleasableResourceOwner((ResourceOwner)toPush);
releasable = true;
}
}
Object pushed = super.push(toPush);