credits.getSupportLessons() == null ? 0 : credits.getSupportLessons().doubleValue();
credits.getLessons() == null ? 0 : credits.getLessons().doubleValue();
    private static void calculateLessonsCredits(        IExecutionPeriod executionPeriod,        IPersistentShiftProfessorship shiftProfessorshipDAO,        IPersistentCredits creditsDAO)        throws ExcepcaoPersistencia    {        List list = shiftProfessorshipDAO.readByExecutionPeriod(executionPeriod);        System.out.println("size=" + list.size());        for (Iterator iter = list.iterator(); iter.hasNext();)        {            IShiftProfessorship shiftProfessorship = (IShiftProfessorship) iter.next();            ICredits credits =                getAndLockTeacherCredits(                    shiftProfessorship.getProfessorship().getTeacher(),                    executionPeriod,                    creditsDAO);            double actualCredits =                credits.getSupportLessons() == null ? 0 : credits.getSupportLessons().doubleValue();            double shiftDuration = calculateShiftDuration(shiftProfessorship.getShift());            double creditsValue =                actualCredits + shiftDuration * (shiftProfessorship.getPercentage().doubleValue() / 100);            credits.setLessons(new Double(creditsValue));        }    }