if(nl.item(i).getNodeType() != Node.ELEMENT_NODE) continue;
	public SecurityManager(BrokerPool pool, DBBroker sysBroker) {		this.pool = pool;		DBBroker broker = sysBroker;		try {			Collection sysCollection = broker.getCollection(SYSTEM);			if (sysCollection == null) {				sysCollection = broker.getOrCreateCollection(SYSTEM);				broker.saveCollection(sysCollection);				sysCollection.setPermissions(0770);			}			Document acl = broker.getDocument(SYSTEM + '/' + ACL_FILE);			Element docElement = null;			if (acl != null)				docElement = acl.getDocumentElement();			if (docElement == null) {				LOG.debug("creating system users");				User user = new User(DBA_USER, null);				user.addGroup(DBA_GROUP);				user.setUID(++nextUserId);				users.put(user.getUID(), user);				user = new User(GUEST_USER, GUEST_USER, GUEST_GROUP);				user.setUID(++nextUserId);				users.put(user.getUID(), user);				addGroup(DBA_GROUP);				addGroup(GUEST_GROUP);				save(broker);			} else {				LOG.debug("loading acl");				Element root = acl.getDocumentElement();				NodeList nl = root.getChildNodes();				Element next, node;				User user;				NodeList ul;				String lastId;				Group group;				for (int i = 0; i < nl.getLength(); i++) {					next = (Element) nl.item(i);					if (next.getTagName().equals("users")) {						lastId = next.getAttribute("last-id");						try {							nextUserId = Integer.parseInt(lastId);						} catch (NumberFormatException e) {						}						ul = next.getElementsByTagName("user");						for (int j = 0; j < ul.getLength(); j++) {							node = (Element) ul.item(j);							user = new User(node);							users.put(user.getUID(), user);						}					} else if (next.getTagName().equals("groups")) {						lastId = next.getAttribute("last-id");						try {							nextGroupId = Integer.parseInt(lastId);						} catch (NumberFormatException e) {						}						ul = next.getElementsByTagName("group");						for (int j = 0; j < ul.getLength(); j++) {							node = (Element) ul.item(j);							group = new Group(node);							groups.put(group.getId(), group);						}					}				}			}		} catch (Exception e) {			e.printStackTrace();			LOG.debug("loading acl failed: " + e.getMessage());		}	}