class UpdatePasswordValidationMidware {

    /**
     * Language service.
     */
    @Inject
    private LangPropsService langPropsService;

    public void handle(final RequestContext context) {<FILL_FUNCTION_BODY>}
}

        final JSONObject requestJSONObject = context.requestJSON();
        final String oldPwd = requestJSONObject.optString(User.USER_PASSWORD);
        if (StringUtils.isBlank(oldPwd)) {
            context.renderJSON(new JSONObject().put(Keys.MSG, langPropsService.get("emptyOldPwdLabel")));
            context.abort();
            return;
        }

        final String pwd = requestJSONObject.optString(User.USER_PASSWORD);
        if (UserRegister2ValidationMidware.invalidUserPassword(pwd)) {
            context.renderJSON(new JSONObject().put(Keys.MSG, langPropsService.get("invalidPasswordLabel")));
            context.abort();
            return;
        }

        context.handle();
    
<no_super_class>