if (infoGrantContractRegime.getState().equals(new Integer(-1))) {
if (infoGrantContractRegime.getState().equals(Integer.valueOf(-1))) {
    public ActionForward doEdit(ActionMapping mapping, ActionForm form, HttpServletRequest request,            HttpServletResponse response) throws Exception {        try {            InfoGrantContractRegime infoGrantContractRegime = populateInfoFromForm((DynaValidatorForm) form);            if (infoGrantContractRegime.getDateBeginContract().after(                    infoGrantContractRegime.getDateEndContract())) {                return setError(request, mapping, "errors.grant.contract.conflictdates", null, null);            }            IUserView userView = SessionUtils.getUserView(request);            //Verify the teacher            if (infoGrantContractRegime.getInfoTeacher() != null) {                InfoTeacher infoTeacher = null;                Object[] argsTeacher = { infoGrantContractRegime.getInfoTeacher().getTeacherNumber() };                infoTeacher = (InfoTeacher) ServiceUtils.executeService(userView, "ReadTeacherByNumber",                        argsTeacher);                if (infoTeacher == null) {                    return setError(request, mapping, "errors.grant.contract.regime.unknownTeacher",                            null, infoGrantContractRegime.getInfoTeacher().getTeacherNumber());                }                infoGrantContractRegime.setInfoTeacher(infoTeacher);            }            if (infoGrantContractRegime.getState().equals(new Integer(-1))) {                //If is a new Regime                infoGrantContractRegime.setState(InfoGrantContractRegime.getActiveState()); //Active            }            //Verify the cost center            if (infoGrantContractRegime.getGrantCostCenterInfo() != null) {          	            	if (infoGrantContractRegime.getGrantCostCenterInfo().getNumber().length() != 0){                    InfoGrantCostCenter infoGrantCostCenter = null;                    Object[] argsCostCenter = { infoGrantContractRegime.getGrantCostCenterInfo().getNumber() };                                        infoGrantCostCenter = (InfoGrantCostCenter) ServiceUtils.executeService(userView, "ReadCostCenterByNumber",                    		argsCostCenter);                    if (infoGrantCostCenter == null) {                        return setError(request, mapping, "errors.grant.contract.regime.unknownTeacher",                                null, infoGrantContractRegime.getInfoTeacher().getTeacherNumber());                    }                                     infoGrantContractRegime.setGrantCostCenterInfo(infoGrantCostCenter);            	}            }else{                infoGrantContractRegime.setGrantCostCenterInfo(null);             }                            if (infoGrantContractRegime.getState().equals(new Integer(-1))) {                //If is a new Regime                infoGrantContractRegime.setState(InfoGrantContractRegime.getActiveState()); //Active            }                        Object[] args = { infoGrantContractRegime };            ServiceUtils.executeService(userView, "EditGrantContractRegime", args);            return mapping.findForward("manage-grant-contract-regime");        } catch (FenixServiceException e) {            return setError(request, mapping, "errors.grant.contract.regime.edit", null, null);        } catch (Exception e) {            return setError(request, mapping, "errors.grant.unrecoverable", null, null);        }    }