if (this.getPerson().getInactiveFunctions().contains(this.getPersonFunction()) && this.getPerson().containsActiveFunction(this.getFunction())) {
DateFormat format = new SimpleDateFormat("dd/MM/yyyy"); Double credits = Double.valueOf(this.getCredits()); Date beginDate_ = null, endDate_ = null;
    public String editFunction() throws FenixFilterException, FenixServiceException {        if (this.getPerson().getInactiveFunctions().contains(this.getPersonFunction())                && this.getPerson().containsActiveFunction(this.getFunction())) {            setErrorMessage("error.duplicate.function");        } else {            DateFormat format = new SimpleDateFormat("dd/MM/yyyy");            Double credits = Double.valueOf(this.getCredits());            Date beginDate_ = null, endDate_ = null;            try {                if (this.getBeginDate() != null) {                    beginDate_ = format.parse(this.getBeginDate());                } else {                    setErrorMessage("error.notBeginDate");                    return "";                }                if (this.getEndDate() != null) {                    endDate_ = format.parse(this.getEndDate());                } else {                    setErrorMessage("error.notEndDate");                    return "";                }                final Object[] argsToRead = { this.getPersonFunctionID(), this.getFunctionID(),                        beginDate_, endDate_, credits };                ServiceUtils.executeService(getUserView(), "EditPersonFunction", argsToRead);                setErrorMessage("message.success");                return "alterFunction";            } catch (ParseException e) {                setErrorMessage("error.date1.format");            } catch (FenixServiceException e) {                setErrorMessage(e.getMessage());            } catch (DomainException e) {                setErrorMessage(e.getMessage());            }        }        return "";    }