private void populatePageList(List<XXService> xxObjList, int startIndex, int pageSize,
</BUG>
RangerServiceList retList) {
List<RangerService> onePageList = new ArrayList<RangerService>();
for (int i = startIndex; i < pageSize + startIndex && i < xxObjList.size(); i++) {
<BUG>onePageList.add(populateViewBean((T)xxObjList.get(i)));
}</BUG>
retList.setServices(onePageList);
retList.setStartIndex(startIndex);
retList.setPageSize(pageSize);

if(permittedServices.size() > 0) {
populatePageList(permittedServices, startIndex, pageSize, retList);
}
return retList;
}
private void populatePageList(List<T> xxObjList, int startIndex, int pageSize,
RangerServiceList retList) {
List<RangerService> onePageList = new ArrayList<RangerService>();
for (int i = startIndex; i < pageSize + startIndex && i < xxObjList.size(); i++) {
onePageList.add(populateViewBean(xxObjList.get(i)));
}
retList.setServices(onePageList);
retList.setStartIndex(startIndex);
retList.setPageSize(pageSize);
