Collection errors = new ArrayList();
xmlOptions.setErrorListener(errors);
if (!loginConfig.validate(xmlOptions)) {
throw new DeploymentException("Invalid login configuration:\n" + errors + "\nDescriptor: " + loginConfig.toString());
}
XmlCursor xmlCursor = loginConfig.newCursor();
List uses = new ArrayList();
Set loginModuleNames = new HashSet();
try {
boolean atStart = true;
while ((atStart && xmlCursor.toFirstChild()) || (!atStart && xmlCursor.toNextSibling())) {