void setData(Map<String, Object> data) {
        Objects.requireNonNull(data, "data can't be null");

        // @adovbnya DO NOT CHANGE !!!!
        // allow tenant change only from initial (empty) value or only from super tenant
        if (this.dataMap.isEmpty()) {
            this.dataMap = ValueHolder.valueOf(data);
        } else if (!Objects.equals(this.dataMap.get(), data)) {
            if (!this.tenant.isPresent()) {
                throw new IllegalStateException("Tenant doesn't set in context yet");
            }

            if (this.tenant.get().isSuper()) {
                this.dataMap = ValueHolder.valueOf(data);
            } else {

                StackTraceElement[] traces = Thread.currentThread().getStackTrace();
                if (!isAllowedToChangeTenant(traces)) {
                    throw new IllegalStateException("Trying to set the data from " + this.dataMap.get()
                                                        + " to " + data);
                }
            }
        }
    }
void setData ( Map < String , Object > data ) { Objects . requireNonNull ( data , "data can't be null" ) ; if ( this . dataMap . isEmpty ( ) ) { this . dataMap = ValueHolder . valueOf ( data ) ; } else if ( ! Objects . equals ( this . dataMap . get ( ) , data ) ) { if ( ! this . tenant . isPresent ( ) ) { throw new IllegalStateException ( "Tenant doesn't set in context yet" ) ; } if ( this . tenant . get ( ) . isSuper ( ) ) { this . dataMap = ValueHolder . valueOf ( data ) ; } else { StackTraceElement [ ] traces = Thread . currentThread ( ) . getStackTrace ( ) ; if ( ! isAllowedToChangeTenant ( traces ) ) { throw new IllegalStateException ( "Trying to set the data from " + this . dataMap . get ( ) + " to " + data ) ; } } } }
Sets tenant context data. Must be called after {@link #setTenant}.

@param data data to set into context