Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Features Added

- Added `checkConfigurationSettings` method to `ConfigurationClient` and `ConfigurationAsyncClient` that performs HEAD requests to efficiently check if configuration settings have changed by comparing page-level ETags without retrieving the full response body.

### Breaking Changes

### Bugs Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
* <!-- src_embed com.azure.data.applicationconfig.async.configurationclient.instantiation -->
* <pre>
* ConfigurationAsyncClient configurationAsyncClient = new ConfigurationClientBuilder&#40;&#41;
* .connectionString&#40;connectionString&#41;
* .credential&#40;new DefaultAzureCredentialBuilder&#40;&#41;.build&#40;&#41;&#41;
* .endpoint&#40;endpoint&#41;
Comment on lines +87 to +88
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The instantiation src_embed block content here was changed to use credential() + endpoint(), but the snippet source (ConfigurationClientJavaDocCodeSnippets.java, BEGIN: com.azure.data.applicationconfig.async.configurationclient.instantiation) still uses .connectionString(connectionString). Update the snippet source and let the codesnippet plugin inject, otherwise builds will fail snippet validation.

Suggested change
* .credential&#40;new DefaultAzureCredentialBuilder&#40;&#41;.build&#40;&#41;&#41;
* .endpoint&#40;endpoint&#41;
* .connectionString&#40;connectionString&#41;

Copilot uses AI. Check for mistakes.
* .buildAsyncClient&#40;&#41;;
* </pre>
* <!-- end com.azure.data.applicationconfig.async.configurationclient.instantiation -->
Expand Down Expand Up @@ -1050,6 +1051,56 @@ public PagedFlux<ConfigurationSetting> listConfigurationSettings(SettingSelector
.map(ConfigurationSettingDeserializationHelper::toConfigurationSettingWithPagedResponse)));
}

/**
* Checks configuration settings using a HEAD request, returning only headers without the response body.
* This is useful for efficiently checking if settings have changed by comparing ETags.
*
* <p>The returned items will be empty since HEAD requests do not return a body. Use {@code byPage()} iteration
* to access page-level ETags for change detection.</p>
*
* <p><strong>Code Samples</strong></p>
*
* <p>Check all settings that use the key "prodDBConnection".</p>
*
* <!-- src_embed com.azure.data.appconfiguration.configurationasyncclient.checkConfigurationSettings -->
* <pre>
* SettingSelector selector = new SettingSelector&#40;&#41;.setKeyFilter&#40;&quot;my-app&#47;*&quot;&#41;;
* client.checkConfigurationSettings&#40;selector&#41;
* .byPage&#40;&#41;
* .subscribe&#40;page -&gt; &#123;
* System.out.println&#40;&quot;Status code: &quot; + page.getStatusCode&#40;&#41;&#41;;
* System.out.println&#40;&quot;Page ETag: &quot; + page.getHeaders&#40;&#41;.getValue&#40;com.azure.core.http.HttpHeaderName.ETAG&#41;&#41;;
* &#125;&#41;;
* </pre>
* <!-- end com.azure.data.appconfiguration.configurationasyncclient.checkConfigurationSettings -->
Comment on lines +1065 to +1075
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new JavaDoc snippet reference com.azure.data.appconfiguration.configurationasyncclient.checkConfigurationSettings has no matching // BEGIN: / // END: snippet in the module sources. Add the snippet to the *JavaDocCodeSnippets.java file (or remove the src_embed markers) to avoid codesnippet plugin failures.

Copilot uses AI. Check for mistakes.
*
* @param selector Optional. Selector to filter configuration setting results from the service.
* @return A Flux of ConfigurationSettings with empty items. Use {@code byPage()} to access page-level ETags.
* @throws HttpResponseException If a client or service error occurs, such as a 404, 409, 429 or 500.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<ConfigurationSetting> checkConfigurationSettings(SettingSelector selector) {
final String keyFilter = selector == null ? null : selector.getKeyFilter();
final String labelFilter = selector == null ? null : selector.getLabelFilter();
final String acceptDateTime = selector == null ? null : selector.getAcceptDateTime();
final List<SettingFields> settingFields = selector == null ? null : toSettingFieldsList(selector.getFields());
final List<MatchConditions> matchConditionsList = selector == null ? null : selector.getMatchConditions();
final List<String> tagsFilter = selector == null ? null : selector.getTagsFilter();
AtomicInteger pageETagIndex = new AtomicInteger(0);
return new PagedFlux<>(() -> withContext(context -> serviceClient
.checkKeyValuesWithResponseAsync(keyFilter, labelFilter, null, acceptDateTime, settingFields, null, null,
getPageETag(matchConditionsList, pageETagIndex), tagsFilter, context)
.map(Utility::toHeadPagedResponse)
.onErrorResume(HttpResponseException.class,
(Function<HttpResponseException, Mono<PagedResponse<ConfigurationSetting>>>) Utility::handleHeadNotModifiedErrorToValidResponse)),
afterToken -> withContext(context -> serviceClient
.checkKeyValuesWithResponseAsync(keyFilter, labelFilter, afterToken, acceptDateTime, settingFields,
null, null, getPageETag(matchConditionsList, pageETagIndex), tagsFilter, context)
.map(Utility::toHeadPagedResponse)
.onErrorResume(HttpResponseException.class,
(Function<HttpResponseException, Mono<PagedResponse<ConfigurationSetting>>>) Utility::handleHeadNotModifiedErrorToValidResponse)));
}

/**
* Fetches the configuration settings in a snapshot that matches the {@code snapshotName}. If {@code snapshotName}
* is {@code null}, then all the {@link ConfigurationSetting configuration settings} are fetched with their
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.azure.core.exception.ResourceModifiedException;
import com.azure.core.exception.ResourceNotFoundException;
import com.azure.core.http.HttpResponse;
import com.azure.core.http.HttpHeaderName;
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HttpHeaderName is imported but never used (it only appears fully-qualified in Javadoc). Unused imports fail compilation; remove this import or use the type in code/Javadoc without the fully-qualified reference.

Suggested change
import com.azure.core.http.HttpHeaderName;

Copilot uses AI. Check for mistakes.
import com.azure.core.http.MatchConditions;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.PagedResponse;
Expand Down Expand Up @@ -52,6 +53,8 @@
import static com.azure.data.appconfiguration.implementation.Utility.getETag;
import static com.azure.data.appconfiguration.implementation.Utility.getPageETag;
import static com.azure.data.appconfiguration.implementation.Utility.handleNotModifiedErrorToValidResponse;
import static com.azure.data.appconfiguration.implementation.Utility.toHeadPagedResponse;
import static com.azure.data.appconfiguration.implementation.Utility.handleHeadNotModifiedErrorToValidResponse;
import static com.azure.data.appconfiguration.implementation.Utility.toKeyValue;
import static com.azure.data.appconfiguration.implementation.Utility.toSettingFieldsList;
import static com.azure.data.appconfiguration.implementation.Utility.updateSnapshotSync;
Expand Down Expand Up @@ -84,7 +87,8 @@
* <!-- src_embed com.azure.data.applicationconfig.configurationclient.instantiation -->
* <pre>
* ConfigurationClient configurationClient = new ConfigurationClientBuilder&#40;&#41;
* .connectionString&#40;connectionString&#41;
* .credential&#40;new DefaultAzureCredentialBuilder&#40;&#41;.build&#40;&#41;&#41;
* .endpoint&#40;endpoint&#41;
Comment on lines +90 to +91
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The <!-- src_embed ... --> instantiation snippet content no longer matches the source snippet in ConfigurationClientJavaDocCodeSnippets.java (which still uses .connectionString(connectionString)). The codesnippet Maven plugin will fail validation/injection during build; update the snippet source (BEGIN/END block) instead, or revert this embedded code to match it.

Suggested change
* .credential&#40;new DefaultAzureCredentialBuilder&#40;&#41;.build&#40;&#41;&#41;
* .endpoint&#40;endpoint&#41;
* .connectionString&#40;connectionString&#41;

Copilot uses AI. Check for mistakes.
* .buildClient&#40;&#41;;
* </pre>
* <!-- end com.azure.data.applicationconfig.configurationclient.instantiation -->
Expand Down Expand Up @@ -1080,6 +1084,99 @@ public PagedIterable<ConfigurationSetting> listConfigurationSettings(SettingSele
});
}

/**
* Checks configuration settings using a HEAD request, returning only headers without the response body.
* This is useful for efficiently checking if settings have changed by comparing ETags.
*
* <p>The returned items will be empty since HEAD requests do not return a body. Use
* {@link PagedIterable#iterableByPage()} to access page-level ETags for change detection.</p>
*
* <p><strong>Code Samples</strong></p>
*
* <p>Check all settings that use the key "prodDBConnection".</p>
*
* <!-- src_embed com.azure.data.applicationconfig.configurationclient.checkConfigurationSettings#settingSelector -->
* <pre>
* SettingSelector selector = new SettingSelector&#40;&#41;.setKeyFilter&#40;&quot;my-app&#47;*&quot;&#41;;
* client.checkConfigurationSettings&#40;selector&#41;
* .iterableByPage&#40;&#41;
Comment on lines +1098 to +1102
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This JavaDoc references a new codesnippet ID (com.azure.data.applicationconfig.configurationclient.checkConfigurationSettings#settingSelector), but there is no corresponding // BEGIN: / // END: snippet in the module sources. This will cause the codesnippet Maven plugin to fail; add the snippet to the appropriate *JavaDocCodeSnippets.java file or remove the src_embed/end markers if injection isn’t intended.

Copilot uses AI. Check for mistakes.
* .forEach&#40;page -&gt; &#123;
* System.out.println&#40;&quot;Status code: &quot; + page.getStatusCode&#40;&#41;&#41;;
* System.out.println&#40;&quot;Page ETag: &quot; + page.getHeaders&#40;&#41;.getValue&#40;com.azure.core.http.HttpHeaderName.ETAG&#41;&#41;;
* &#125;&#41;;
* </pre>
* <!-- end com.azure.data.applicationconfig.configurationclient.checkConfigurationSettings#settingSelector -->
*
* @param selector Optional. Selector to filter configuration setting results from the service.
* @return A {@link PagedIterable} of ConfigurationSettings with empty items. Use {@code iterableByPage()} to access
* page-level ETags.
* @throws HttpResponseException If a client or service error occurs, such as a 404, 409, 429 or 500.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ConfigurationSetting> checkConfigurationSettings(SettingSelector selector) {
return checkConfigurationSettings(selector, Context.NONE);
}

/**
* Checks configuration settings using a HEAD request, returning only headers without the response body.
* This is useful for efficiently checking if settings have changed by comparing ETags.
*
* <p>The returned items will be empty since HEAD requests do not return a body. Use
* {@link PagedIterable#iterableByPage()} to access page-level ETags for change detection.</p>
*
* <p><strong>Code Samples</strong></p>
*
* <p>Check all settings that use the key "prodDBConnection".</p>
*
* <!-- src_embed com.azure.data.applicationconfig.configurationclient.checkConfigurationSettings#settingSelector-context -->
* <!-- src_embed com.azure.data.applicationconfig.configurationclient.checkConfigurationSettings#settingSelector-context -->
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate <!-- src_embed ... --> marker line will confuse the codesnippet injection/validation step. Remove the extra src_embed line so there is exactly one start marker paired with the <!-- end ... -->.

Suggested change
* <!-- src_embed com.azure.data.applicationconfig.configurationclient.checkConfigurationSettings#settingSelector-context -->

Copilot uses AI. Check for mistakes.
* <pre>
* SettingSelector selector = new SettingSelector&#40;&#41;.setKeyFilter&#40;&quot;my-app&#47;*&quot;&#41;;
* Context ctx = new Context&#40;key1, value1&#41;;
Comment on lines +1131 to +1135
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This src_embed ID for the context overload (...checkConfigurationSettings#settingSelector-context) doesn’t appear to exist as a // BEGIN: / // END: snippet in the module sources. Add the missing snippet to the *JavaDocCodeSnippets.java sources so codesnippet validation passes.

Copilot uses AI. Check for mistakes.
* client.checkConfigurationSettings&#40;selector, ctx&#41;
* .iterableByPage&#40;&#41;
* .forEach&#40;page -&gt; &#123;
* System.out.println&#40;&quot;Status code: &quot; + page.getStatusCode&#40;&#41;&#41;;
* System.out.println&#40;&quot;Page ETag: &quot; + page.getHeaders&#40;&#41;.getValue&#40;com.azure.core.http.HttpHeaderName.ETAG&#41;&#41;;
* &#125;&#41;;
* </pre>
* <!-- end com.azure.data.applicationconfig.configurationclient.checkConfigurationSettings#settingSelector-context -->
*
* @param selector Optional. Selector to filter configuration setting results from the service.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return A {@link PagedIterable} of ConfigurationSettings with empty items. Use {@code iterableByPage()} to access
* page-level ETags.
* @throws HttpResponseException If a client or service error occurs, such as a 404, 409, 429 or 500.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ConfigurationSetting> checkConfigurationSettings(SettingSelector selector, Context context) {
final String keyFilter = selector == null ? null : selector.getKeyFilter();
final String labelFilter = selector == null ? null : selector.getLabelFilter();
final String acceptDateTime = selector == null ? null : selector.getAcceptDateTime();
final List<SettingFields> settingFields = selector == null ? null : toSettingFieldsList(selector.getFields());
final List<MatchConditions> matchConditionsList = selector == null ? null : selector.getMatchConditions();
final List<String> tagsFilter = selector == null ? null : selector.getTagsFilter();

AtomicInteger pageETagIndex = new AtomicInteger(0);
return new PagedIterable<>(() -> {
try {
return toHeadPagedResponse(serviceClient.checkKeyValuesWithResponse(keyFilter, labelFilter, null,
acceptDateTime, settingFields, null, null, getPageETag(matchConditionsList, pageETagIndex),
tagsFilter, context));
} catch (HttpResponseException ex) {
return handleHeadNotModifiedErrorToValidResponse(ex, LOGGER, true);
}
}, afterToken -> {
try {
return toHeadPagedResponse(serviceClient.checkKeyValuesWithResponse(keyFilter, labelFilter, afterToken,
acceptDateTime, settingFields, null, null, getPageETag(matchConditionsList, pageETagIndex),
tagsFilter, context));
} catch (HttpResponseException ex) {
return handleHeadNotModifiedErrorToValidResponse(ex, LOGGER, true);
}
});
}

/**
* Fetches the configuration settings in a snapshot that matches the {@code snapshotName}. If {@code snapshotName}
* is {@code null}, then all the {@link ConfigurationSetting configuration settings} are fetched with their current
Expand Down Expand Up @@ -1589,4 +1686,5 @@ public PagedIterable<SettingLabel> listLabels(SettingLabelSelector selector, Con
public void updateSyncToken(String token) {
syncTokenPolicy.updateSyncToken(token);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
* <!-- src_embed com.azure.data.applicationconfig.async.configurationclient.instantiation -->
* <pre>
* ConfigurationAsyncClient configurationAsyncClient = new ConfigurationClientBuilder&#40;&#41;
* .connectionString&#40;connectionString&#41;
* .credential&#40;new DefaultAzureCredentialBuilder&#40;&#41;.build&#40;&#41;&#41;
* .endpoint&#40;endpoint&#41;
* .buildAsyncClient&#40;&#41;;
* </pre>
* <!-- end com.azure.data.applicationconfig.async.configurationclient.instantiation -->
Expand All @@ -82,7 +83,8 @@
* <!-- src_embed com.azure.data.applicationconfig.configurationclient.instantiation -->
* <pre>
* ConfigurationClient configurationClient = new ConfigurationClientBuilder&#40;&#41;
* .connectionString&#40;connectionString&#41;
* .credential&#40;new DefaultAzureCredentialBuilder&#40;&#41;.build&#40;&#41;&#41;
* .endpoint&#40;endpoint&#41;
* .buildClient&#40;&#41;;
* </pre>
* <!-- end com.azure.data.applicationconfig.configurationclient.instantiation -->
Comment on lines 72 to 90
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The instantiation src_embed blocks were edited directly, but the corresponding snippet sources in ConfigurationClientJavaDocCodeSnippets.java still use connection strings (and the codesnippet Maven plugin expects them to stay in sync). Update the // BEGIN: / // END: snippet source and let injection update this JavaDoc, otherwise snippet validation will fail.

Copilot uses AI. Check for mistakes.
Expand All @@ -102,7 +104,7 @@
* ConfigurationClient configurationClient = new ConfigurationClientBuilder&#40;&#41;
* .pipeline&#40;pipeline&#41;
* .endpoint&#40;&quot;https:&#47;&#47;dummy.azure.net&#47;&quot;&#41;
* .connectionString&#40;connectionString&#41;
* .credential&#40;new DefaultAzureCredentialBuilder&#40;&#41;.build&#40;&#41;&#41;
* .buildClient&#40;&#41;;
* </pre>
* <!-- end com.azure.data.applicationconfig.configurationclient.pipeline.instantiation -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.azure.core.util.Context;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.data.appconfiguration.implementation.models.CheckKeyValuesHeaders;
import com.azure.data.appconfiguration.implementation.models.KeyValue;
import com.azure.data.appconfiguration.implementation.models.SnapshotUpdateParameters;
import com.azure.data.appconfiguration.implementation.models.UpdateSnapshotHeaders;
Expand All @@ -26,6 +27,7 @@

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
Expand Down Expand Up @@ -210,4 +212,62 @@ public static List<String> getTagsFilterInString(Map<String, String> tagsFilter)
}
return tagsFilters;
}

// Parse the 'after' query parameter value from the Link header.
// Link header format: </kv?api-version=2023-10-01&$Select=&after=a2V5MTg4Cg%3D%3D>; rel="next"
public static String parseAfterParam(String linkHeader) {
String nextLink = parseNextLink(linkHeader);
if (nextLink == null) {
return null;
}
int afterIdx = nextLink.indexOf("after=");
if (afterIdx == -1) {
return null;
}
String afterValue = nextLink.substring(afterIdx + 6);
int ampIdx = afterValue.indexOf('&');
return ampIdx != -1 ? afterValue.substring(0, ampIdx) : afterValue;
Comment on lines +216 to +229
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseAfterParam returns the raw after value from the Link URL (e.g. ...after=a2V5...%3D%3D). The service proxy will URL-encode query params (since @QueryParam(encoded=false)), so passing an already-encoded value will double-encode (% -> %25) and break pagination. Decode the extracted value (e.g., URL-decode) before using it as the After query param continuation token.

Copilot uses AI. Check for mistakes.
}

// Convert a HEAD response to a PagedResponse with empty items.
public static PagedResponse<ConfigurationSetting>
toHeadPagedResponse(ResponseBase<CheckKeyValuesHeaders, Void> response) {
String continuationToken = parseAfterParam(response.getHeaders().getValue(HttpHeaderName.LINK));
return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), response.getHeaders(),
Collections.emptyList(), continuationToken, null);
}

// Handle 304 status code from HEAD request to a valid response - Async handler
public static Mono<PagedResponse<ConfigurationSetting>>
handleHeadNotModifiedErrorToValidResponse(HttpResponseException error) {
HttpResponse httpResponse = error.getResponse();
if (httpResponse == null) {
return Mono.error(error);
}

String continuationToken = parseAfterParam(httpResponse.getHeaderValue(HttpHeaderName.LINK));
if (httpResponse.getStatusCode() == 304) {
return Mono.just(new PagedResponseBase<>(httpResponse.getRequest(), httpResponse.getStatusCode(),
httpResponse.getHeaders(), Collections.emptyList(), continuationToken, null));
}

return Mono.error(error);
}

// Handle 304 status code from HEAD request to a valid response - Sync handler
public static PagedResponse<ConfigurationSetting>
handleHeadNotModifiedErrorToValidResponse(HttpResponseException error, ClientLogger logger, boolean isHead) {
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handleHeadNotModifiedErrorToValidResponse(..., boolean isHead) includes an unused isHead parameter (callers always pass true, but it is never read). Remove the parameter (and update call sites) to avoid misleading API surface in this internal utility.

Suggested change
handleHeadNotModifiedErrorToValidResponse(HttpResponseException error, ClientLogger logger, boolean isHead) {
handleHeadNotModifiedErrorToValidResponse(HttpResponseException error, ClientLogger logger) {

Copilot uses AI. Check for mistakes.
HttpResponse httpResponse = error.getResponse();
if (httpResponse == null) {
throw logger.logExceptionAsError(error);
}

String continuationToken = parseAfterParam(httpResponse.getHeaderValue(HttpHeaderName.LINK));
if (httpResponse.getStatusCode() == 304) {
return new PagedResponseBase<>(httpResponse.getRequest(), httpResponse.getStatusCode(),
httpResponse.getHeaders(), Collections.emptyList(), continuationToken, null);
}

throw logger.logExceptionAsError(error);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
* <!-- src_embed com.azure.data.applicationconfig.async.configurationclient.instantiation -->
* <pre>
* ConfigurationAsyncClient configurationAsyncClient = new ConfigurationClientBuilder&#40;&#41;
* .connectionString&#40;connectionString&#41;
* .credential&#40;new DefaultAzureCredentialBuilder&#40;&#41;.build&#40;&#41;&#41;
* .endpoint&#40;endpoint&#41;
* .buildAsyncClient&#40;&#41;;
* </pre>
Comment on lines 34 to 40
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This src_embed block is under a “...with Connection String” section, but the embedded code uses Entra ID (credential() + endpoint()). Either adjust the surrounding text/section title or keep the snippet aligned to the connection-string flow so the documentation is consistent.

Copilot uses AI. Check for mistakes.
* <!-- end com.azure.data.applicationconfig.async.configurationclient.instantiation -->
Expand All @@ -48,7 +49,8 @@
* <!-- src_embed com.azure.data.applicationconfig.configurationclient.instantiation -->
* <pre>
* ConfigurationClient configurationClient = new ConfigurationClientBuilder&#40;&#41;
* .connectionString&#40;connectionString&#41;
* .credential&#40;new DefaultAzureCredentialBuilder&#40;&#41;.build&#40;&#41;&#41;
* .endpoint&#40;endpoint&#41;
* .buildClient&#40;&#41;;
* </pre>
Comment on lines 34 to 55
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The instantiation src_embed blocks here don’t match the snippet sources in ConfigurationClientJavaDocCodeSnippets.java (they still use .connectionString(connectionString)). This will fail the codesnippet Maven plugin validation/injection during build; update the snippet sources (BEGIN/END) instead of editing embedded code directly.

Copilot uses AI. Check for mistakes.
Comment on lines 49 to 55
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This instantiation snippet is referenced as a connection-string example in the surrounding package docs, but the code shown uses Entra ID (credential() + endpoint()). Please align the example and narrative so users aren’t misled about required inputs/authentication.

Copilot uses AI. Check for mistakes.
* <!-- end com.azure.data.applicationconfig.configurationclient.instantiation -->
Expand Down
Loading
Loading