protected void updateOAuthCode(final AccessTokenRequestDataHolder holder) {
        if (holder.getToken() instanceof OAuthCode) {
            val codeState = TicketState.class.cast(holder.getToken());
            codeState.update();

            if (holder.getToken().isExpired()) {
                this.ticketRegistry.deleteTicket(holder.getToken().getId());
            } else {
                this.ticketRegistry.updateTicket(holder.getToken());
            }
            this.ticketRegistry.updateTicket(holder.getTicketGrantingTicket());
        }
    }
protected void updateOAuthCode ( final AccessTokenRequestDataHolder holder ) { if ( holder . getToken ( ) instanceof OAuthCode ) { val codeState = TicketState . class . cast ( holder . getToken ( ) ) ; codeState . update ( ) ; if ( holder . getToken ( ) . isExpired ( ) ) { this . ticketRegistry . deleteTicket ( holder . getToken ( ) . getId ( ) ) ; } else { this . ticketRegistry . updateTicket ( holder . getToken ( ) ) ; } this . ticketRegistry . updateTicket ( holder . getTicketGrantingTicket ( ) ) ; } }
Update OAuth code.

@param holder the holder