Commit e81a6d8a authored by Ryan Graham's avatar Ryan Graham Committed by ryang

fixed possible null pointer


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1567 b35dd754-fafc-0310-a699-88a17e54d16e
parent 623fc0b8
......@@ -22,20 +22,22 @@
List<User> users = new ArrayList<User>();
for (String searchField : searchFields) {
boolean searchValue = ParamUtils.getBooleanParameter(request, searchField, false);
if (!moreOptions || searchValue) {
selectedFields.add(searchField);
Collection<User> foundUsers = userManager.findUsers(new HashSet<String>(Arrays.asList(searchField)), criteria);
//filter out duplicate users
for (User user : foundUsers) {
if (!users.contains(user)) {
users.add(user);
}
}
}
if (criteria != null) {
for (String searchField : searchFields) {
boolean searchValue = ParamUtils.getBooleanParameter(request, searchField, false);
if (!moreOptions || searchValue) {
selectedFields.add(searchField);
Collection<User> foundUsers = userManager.findUsers(new HashSet<String>(Arrays.asList(searchField)), criteria);
//filter out duplicate users
for (User user : foundUsers) {
if (!users.contains(user)) {
users.add(user);
}
}
}
}
}
%>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment