public List<UserEntity> getGroupMembers(int groupId) { logger.d("group#getGroupMembers groupId:%s", groupId); GroupEntity group = findGroup(groupId); if (group == null) { logger.e("group#no such group id:%s", groupId); return null; } Set<Integer> userList = group.getlistGroupMemberIds(); ArrayList<UserEntity> memberList = new ArrayList<UserEntity>(); for (Integer id : userList) { UserEntity contact = IMContactManager.instance().findContact(id); if (contact == null) { logger.e("group#no such contact id:%s", id); continue; } memberList.add(contact); } return memberList; }