if (stringGrade != null && !stringGrade.equals("RE") && !stringGrade.equals("NA") && !stringGrade.equals("AP")) {
if (stringGrade != null && !stringGrade.equals("") && !stringGrade.equals("RE") && !stringGrade.equals("NA") && !stringGrade.equals("AP")) {
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,            HttpServletResponse response) throws Exception {        HttpSession session = request.getSession();        IUserView userView = (IUserView) session.getAttribute(SessionConstants.U_VIEW);        String username = request.getParameter("username");        IUserView studentUserView = new MockUserView(username, new ArrayList(0));        List cps = null;        List enrollments = null;        InfoStudentCurricularPlan selectedSCP = null;        try {            Object args[] = { studentUserView };            cps = (ArrayList) ServiceManagerServiceFactory.executeService(userView,                    "ReadStudentCurricularPlansForSeminaries", args);            long startDate = Long.MAX_VALUE;            for (Iterator iter = cps.iterator(); iter.hasNext();) {                InfoStudentCurricularPlan cp = (InfoStudentCurricularPlan) iter.next();                if (cp.getStartDate().getTime() < startDate) {                    startDate = cp.getStartDate().getTime();                    selectedSCP = cp;                }            }            Object getCurriculumArgs[] = { null, selectedSCP.getIdInternal() };            enrollments = (ArrayList) ServiceManagerServiceFactory.executeService(userView,                    "ReadStudentCurriculum", getCurriculumArgs);        } catch (NonExistingServiceException e) {            throw new FenixActionException(e);        }        InfoClassification ic = new InfoClassification();        int i = 0;        float acc = 0;        float grade = 0;        for (Iterator iter = enrollments.iterator(); iter.hasNext();) {            InfoEnrolment ie = (InfoEnrolment) iter.next();            String stringGrade;            if (ie.getInfoEnrolmentEvaluation() != null) {                stringGrade = ie.getInfoEnrolmentEvaluation().getGrade();            } else {                stringGrade = "NA";            }            if (stringGrade != null && !stringGrade.equals("RE") && !stringGrade.equals("NA") && !stringGrade.equals("AP")) {                Float gradeObject = new Float(stringGrade);                grade = gradeObject.floatValue();                acc += grade;                i++;            }        }        if (i != 0) {            String value = new DecimalFormat("#0.0").format(acc / i);            ic.setAritmeticClassification(value);        }        ic.setCompletedCourses(new Integer(i).toString());        request.setAttribute("classification", ic);        request.setAttribute(SessionConstants.CURRICULUM, enrollments);        request.setAttribute(SessionConstants.STUDENT_CURRICULAR_PLAN, selectedSCP);        return mapping.findForward("viewCurriculum");    }