<commit_before>/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License;
 * you may not use this file except in compliance with the Elastic License.
 */
package org.elasticsearch.marvel.shield;

import org.elasticsearch.action.Action;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.ActionRequest;
import org.elasticsearch.action.ActionRequestBuilder;
import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.FilterClient;
import org.elasticsearch.common.inject.Inject;

/**
 *
 */
public class SecuredClient extends FilterClient {

    private MarvelShieldIntegration shieldIntegration;

    @Inject
    public SecuredClient(Client in, MarvelShieldIntegration shieldIntegration) {
        super(in);
        this.shieldIntegration = shieldIntegration;
    }

    @Override
    protected <Request extends ActionRequest, Response extends ActionResponse, RequestBuilder extends ActionRequestBuilder<Request, Response, RequestBuilder>> void doExecute(Action<Request, Response, RequestBuilder> action, Request request, ActionListener<Response> listener) {
        this.shieldIntegration.bindInternalMarvelUser(request);
        super.doExecute(action, request, listener);
    }
}<commit_msg>Fix compilation error after core shifted<commit_after>/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License;
 * you may not use this file except in compliance with the Elastic License.
 */
package org.elasticsearch.marvel.shield;

import org.elasticsearch.action.Action;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.ActionRequest;
import org.elasticsearch.action.ActionRequestBuilder;
import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.FilterClient;
import org.elasticsearch.common.inject.Inject;

/**
 *
 */
public class SecuredClient extends FilterClient {

    private MarvelShieldIntegration shieldIntegration;

    @Inject
    public SecuredClient(Client in, MarvelShieldIntegration shieldIntegration) {
        super(in);
        this.shieldIntegration = shieldIntegration;
    }

    @Override
    protected <Request extends ActionRequest<Request>, Response extends ActionResponse, RequestBuilder extends ActionRequestBuilder<Request, Response, RequestBuilder>> void doExecute(
            Action<Request, Response, RequestBuilder> action, Request request, ActionListener<Response> listener) {
        this.shieldIntegration.bindInternalMarvelUser(request);
        super.doExecute(action, request, listener);
    }
}
{'fraction_non_alphanumeric': 0.07727756114852889, 'fraction_numerical': 0.0, 'mean_word_length': 5.0950323974082075, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6444860', 'n_tokens_mistral': 684, 'n_tokens_neox': 696, 'n_words': 196}