Source:
public TextAnalyticsAsyncClient buildAsyncClient() { Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration().clone() : configuration; TextAnalyticsServiceVersion serviceVersion = version != null ? version : TextAnalyticsServiceVersion.getLatest(); Objects.requireNonNull(endpoint, "'Endpoint' is required and can not be null."); if (httpPipeline != null) { TextAnalyticsClientImpl textAnalyticsAPI = new TextAnalyticsClientImplBuilder() .endpoint(endpoint) .pipeline(httpPipeline) .build(); return new TextAnalyticsAsyncClient(textAnalyticsAPI, serviceVersion); } final List<HttpPipelinePolicy> policies = new ArrayList<>(); if (tokenCredential != null) { policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPE)); } else if (subscriptionKey != null) { headers.put(OCP_APIM_SUBSCRIPTION_KEY, subscriptionKey); } else { logger.logExceptionAsError( new IllegalArgumentException("Missing credential information while building a client.")); } policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersPolicy(headers)); policies.add(new AddDatePolicy()); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy == null ? DEFAULT_RETRY_POLICY : retryPolicy); policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline pipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); TextAnalyticsClientImpl textAnalyticsAPI = new TextAnalyticsClientImplBuilder() .endpoint(endpoint) .pipeline(pipeline) .build(); return new TextAnalyticsAsyncClient(textAnalyticsAPI, serviceVersion); }

Target:
public TextAnalyticsAsyncClient buildAsyncClient() { final Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration().clone() : configuration; final TextAnalyticsServiceVersion serviceVersion = version != null ? version : TextAnalyticsServiceVersion.getLatest(); Objects.requireNonNull(endpoint, "'Endpoint' is required and can not be null."); HttpPipeline pipeline = httpPipeline; if (pipeline == null) { final List<HttpPipelinePolicy> policies = new ArrayList<>(); if (tokenCredential != null) { policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPE)); } else if (subscriptionKey != null) { headers.put(OCP_APIM_SUBSCRIPTION_KEY, subscriptionKey); } else { throw logger.logExceptionAsError( new IllegalArgumentException("Missing credential information while building a client.")); } policies.add(new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersPolicy(headers)); policies.add(new AddDatePolicy()); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy == null ? DEFAULT_RETRY_POLICY : retryPolicy); policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); pipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) .build(); } final TextAnalyticsClientImpl textAnalyticsAPI = new TextAnalyticsClientImplBuilder() .endpoint(endpoint) .pipeline(pipeline) .build(); return new TextAnalyticsAsyncClient(textAnalyticsAPI, serviceVersion, clientOptions); }