if (sessionImpl != null) {
lotus.domino.Session sessionLotus = sessionImpl.delegate_;
if (sessionLotus != null) {
setDelegate(sessionLotus, 0);
} else {
throw new UnableToAcquireSessionException("Factory default Session does not have a valid delegate");
}
} else {
throw new UnableToAcquireSessionException("Factory could not return a default Session");
}
} else if (session == null) {
throw new UnableToAcquireSessionException(
"This session has a null value for its delegate. How was it created in the first place?");
}
return super.getDelegate();
}