if (shiftsAndGroups.getInfoSiteStudentGroupsList() != null) {
if (!shiftsAndGroups.getInfoSiteStudentGroupsList().isEmpty()) {
    public ActionForward viewShiftsAndGroups(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixActionException,            FenixFilterException {        HttpSession session = request.getSession(false);        IUserView userView = (IUserView) session.getAttribute(SessionConstants.U_VIEW);        Integer objectCode = getObjectCode(request);        String groupPropertiesCodeString = request.getParameter("groupPropertiesCode");        Integer groupPropertiesCode = new Integer(groupPropertiesCodeString);        Object args[] = { objectCode };        try {            InfoExecutionCourse infoExecutionCourse = (InfoExecutionCourse) ServiceManagerServiceFactory                    .executeService(userView, "ReadExecutionCourseByOID", args);            InfoExecutionPeriod infoExecutionPeriod = infoExecutionCourse.getInfoExecutionPeriod();            request.setAttribute(SessionConstants.EXECUTION_PERIOD, infoExecutionPeriod);            request.setAttribute(SessionConstants.EXECUTION_PERIOD_OID, infoExecutionPeriod                    .getIdInternal().toString());        } catch (FenixServiceException fenixServiceException) {            throw new FenixActionException(fenixServiceException);        }        ISiteComponent shiftsAndGroupsView = new InfoSiteShiftsAndGroups();        readSiteView(request, shiftsAndGroupsView, null, groupPropertiesCode, null);        if (((InfoSiteShiftsAndGroups) shiftsAndGroupsView).getInfoGrouping() == null) {            ActionErrors actionErrors = new ActionErrors();            ActionError error = null;            error = new ActionError("error.noGroupProperties");            actionErrors.add("error.noGroupProperties", error);            saveErrors(request, actionErrors);            return prepareViewExecutionCourseProjects(mapping, form, request, response);        }        if (((InfoSiteShiftsAndGroups) shiftsAndGroupsView).getInfoSiteGroupsByShiftList() == null) {            request.setAttribute("noShifts", new Boolean(true));        } else {            boolean found = false;            Iterator iterShiftsAndGroups = ((InfoSiteShiftsAndGroups) shiftsAndGroupsView)                    .getInfoSiteGroupsByShiftList().iterator();            while (iterShiftsAndGroups.hasNext() && !found) {                InfoSiteGroupsByShift shiftsAndGroups = (InfoSiteGroupsByShift) iterShiftsAndGroups                        .next();                if (shiftsAndGroups.getInfoSiteStudentGroupsList() != null) {                    request.setAttribute("hasGroups", new Boolean(true));                    found = true;                }            }        }        return mapping.findForward("viewShiftsAndGroups");    }