if (login.getDocumentPreservationPolicy() == null) {
Iterator iterator = session.getProject().getOrderedDescriptors().iterator();
while (iterator.hasNext()) {
XMLDescriptor xmlDescriptor = (XMLDescriptor) iterator.next();
if (xmlDescriptor.shouldPreserveDocument()) {
login.setDocumentPreservationPolicy(new DescriptorLevelDocumentPreservationPolicy());
break;
}
}
}
if (login.getDocumentPreservationPolicy() == null) {