diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml
index 022f981e8725..bdf42a6e2248 100644
--- a/eng/jacoco-test-coverage/pom.xml
+++ b/eng/jacoco-test-coverage/pom.xml
@@ -27,7 +27,7 @@
1.0.0-preview.3
1.0.0-preview.3
1.0.0-preview.3
- 1.0.0-preview.1
+ 1.0.0-preview.2
1.0.0-preview.1
4.0.0-preview.1
5.0.0-preview.2
diff --git a/eng/spotbugs-aggregate-report/pom.xml b/eng/spotbugs-aggregate-report/pom.xml
index aa3e5dc764da..cb5b2dfdceef 100644
--- a/eng/spotbugs-aggregate-report/pom.xml
+++ b/eng/spotbugs-aggregate-report/pom.xml
@@ -23,7 +23,7 @@
1.0.0-preview.3
- 1.0.0-preview.1
+ 1.0.0-preview.2
1.0.0-preview.1
4.0.0-preview.1
1.0.0-preview.1
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/README.md b/sdk/appconfiguration/azure-data-appconfiguration/README.md
index 8740e54e7621..2ee4515c73c5 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/README.md
+++ b/sdk/appconfiguration/azure-data-appconfiguration/README.md
@@ -21,7 +21,7 @@ Use the client library for App Configuration to create and manage application co
com.azure
azure-data-appconfiguration
- 1.0.0-preview.1
+ 1.0.0-preview.2
```
@@ -106,7 +106,7 @@ An application that has a large set of configurations that it needs to periodica
ConfigurationAsyncClient client = new ConfigurationClientBuilder()
.credential(new ConfigurationClientCredentials(appConfigConnectionString))
.buildAsyncClient();
-
+
client.listSettings(new SettingSelection().label(periodicUpdateLabel))
.subscribe(setting -> updateConfiguration(setting));
```
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml
index 5f3c743e6a26..e675f1abd993 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml
+++ b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml
@@ -13,7 +13,7 @@
com.azure
azure-data-appconfiguration
- 1.0.0-preview.1
+ 1.0.0-preview.2
Microsoft Azure client library for App Configuration
This package contains the Microsoft Azure App Configuration client library.
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/AzureConfiguration.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/AzureConfiguration.java
index 13785a52eb77..2b85ed98688b 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/AzureConfiguration.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/AzureConfiguration.java
@@ -9,5 +9,5 @@
class AzureConfiguration {
//TODO: Eventually remove these hardcoded strings with https://github.com/Azure/azure-sdk-for-java/issues/3141
static final String NAME = "application-configuration";
- static final String VERSION = "1.0.0-SNAPSHOT";
+ static final String VERSION = "1.0.0-preview.2";
}
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java
index 1d751432d742..cdf87bc3aaac 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java
@@ -34,13 +34,15 @@
import java.util.Objects;
/**
- * This class provides a fluent builder API to help aid the configuration and instantiation of the {@link ConfigurationAsyncClient} and {@link ConfigurationClient},
- * by calling {@link ConfigurationClientBuilder#buildAsyncClient() buildAsyncClient} and {@link ConfigurationClientBuilder#buildClient() buildClient} respectively
- * to construct an instance of the desired client.
+ * This class provides a fluent builder API to help aid the configuration and instantiation of
+ * {@link ConfigurationClient ConfigurationClients} and {@link ConfigurationAsyncClient ConfigurationAsyncClients},
+ * call {@link #buildClient() buildClient} and {@link #buildAsyncClient() buildAsyncClient} respectively to construct
+ * an instance of the desired client.
*
*
The client needs the service endpoint of the Azure App Configuration store and access credential.
* {@link ConfigurationClientCredentials} gives the builder the service endpoint and access credential it requires to
- * construct a client, set the ConfigurationClientCredentials with {@link ConfigurationClientBuilder#credential(ConfigurationClientCredentials) this}.
+ * construct a client, set the ConfigurationClientCredentials with
+ * {@link #credential(ConfigurationClientCredentials) this}.
*
* Instantiating an asynchronous Configuration Client
*
@@ -50,11 +52,11 @@
*
* {@codesnippet com.azure.data.applicationconfig.configurationclient.instantiation}
*
- * Another way to construct the client is using a {@link HttpPipeline}. The pipeline gives the client an authenticated
- * way to communicate with the service but it doesn't contain the service endpoint. Set the pipeline with
- * {@link ConfigurationClientBuilder#pipeline(HttpPipeline) this}, additionally set the service endpoint with
- * {@link ConfigurationClientBuilder#endpoint(String) this}. Using a pipeline requires additional setup but
- * allows for finer control on how the {@link ConfigurationAsyncClient} and {@link ConfigurationClient} it built.
+ * Another way to construct the client is using a {@link HttpPipeline}. The pipeline gives the client an
+ * authenticated way to communicate with the service but it doesn't contain the service endpoint. Set the pipeline with
+ * {@link #pipeline(HttpPipeline) this} and set the service endpoint with {@link #endpoint(String) this}. Using a
+ * pipeline requires additional setup but allows for finer control on how the {@link ConfigurationClient} and
+ * {@link ConfigurationAsyncClient} is built.
*
* {@codesnippet com.azure.data.applicationconfig.configurationclient.pipeline.instantiation}
*
@@ -99,40 +101,38 @@ public ConfigurationClientBuilder() {
}
/**
* Creates a {@link ConfigurationClient} based on options set in the Builder. Every time {@code buildClient()} is
- * called, a new instance of {@link ConfigurationClient} is created.
+ * called a new instance of {@link ConfigurationClient} is created.
*
*
- * If {@link ConfigurationClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and
- * {@link ConfigurationClientBuilder#endpoint(String) endpoint} are used to create the
- * {@link ConfigurationClient client}. All other builder settings are ignored.
+ * If {@link #pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and
+ * {@link #endpoint(String) endpoint} are used to create the {@link ConfigurationClient client}. All other builder
+ * settings are ignored.
*
* @return A ConfigurationClient with the options set from the builder.
* @throws NullPointerException If {@code endpoint} has not been set. This setting is automatically set when
- * {@link ConfigurationClientBuilder#credential(ConfigurationClientCredentials) credential} are set through
- * the builder. Or can be set explicitly by calling {@link ConfigurationClientBuilder#endpoint(String)}.
- * @throws IllegalStateException If {@link ConfigurationClientBuilder#credential(ConfigurationClientCredentials)}
- * has not been set.
+ * {@link #credential(ConfigurationClientCredentials) credential} are set through the builder. Or can be set
+ * explicitly by calling {@link #endpoint(String)}.
+ * @throws IllegalStateException If {@link #credential(ConfigurationClientCredentials)} has not been set.
*/
public ConfigurationClient buildClient() {
return new ConfigurationClient(buildAsyncClient());
}
/**
- * Creates a {@link ConfigurationAsyncClient} based on options set in the Builder. Every time {@code buildAsyncClient()} is
- * called, a new instance of {@link ConfigurationAsyncClient} is created.
+ * Creates a {@link ConfigurationAsyncClient} based on options set in the Builder. Every time
+ * {@code buildAsyncClient()} is called a new instance of {@link ConfigurationAsyncClient} is created.
*
*
- * If {@link ConfigurationClientBuilder#pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and
- * {@link ConfigurationClientBuilder#endpoint(String) endpoint} are used to create the
- * {@link ConfigurationAsyncClient client}. All other builder settings are ignored.
+ * If {@link #pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and
+ * {@link #endpoint(String) endpoint} are used to create the {@link ConfigurationAsyncClient client}. All other
+ * builder settings are ignored.
*
*
* @return A ConfigurationAsyncClient with the options set from the builder.
* @throws NullPointerException If {@code endpoint} has not been set. This setting is automatically set when
- * {@link ConfigurationClientBuilder#credential(ConfigurationClientCredentials) credential} are set through
- * the builder. Or can be set explicitly by calling {@link ConfigurationClientBuilder#endpoint(String)}.
- * @throws IllegalStateException If {@link ConfigurationClientBuilder#credential(ConfigurationClientCredentials)}
- * has not been set.
+ * {@link #credential(ConfigurationClientCredentials) credential} are set through the builder. Or can be set
+ * explicitly by calling {@link #endpoint(String)}.
+ * @throws IllegalStateException If {@link #credential(ConfigurationClientCredentials)} has not been set.
*/
public ConfigurationAsyncClient buildAsyncClient() {
Configuration buildConfiguration = (configuration == null) ? ConfigurationManager.getConfiguration().clone() : configuration;
@@ -193,8 +193,8 @@ public ConfigurationClientBuilder endpoint(String endpoint) {
}
/**
- * Sets the credential to use when authenticating HTTP requests. Also, sets the
- * {@link ConfigurationClientBuilder#endpoint(String) endpoint} for this ConfigurationClientBuilder.
+ * Sets the credential to use when authenticating HTTP requests. Also, sets the {@link #endpoint(String) endpoint}
+ * for this ConfigurationClientBuilder.
*
* @param credential The credential to use for authenticating HTTP requests.
* @return The updated ConfigurationClientBuilder object.
@@ -211,9 +211,10 @@ public ConfigurationClientBuilder credential(ConfigurationClientCredentials cred
*
* @param logLevel The amount of logging output when sending and receiving HTTP requests/responses.
* @return The updated ConfigurationClientBuilder object.
+ * @throws NullPointerException If {@code logLevel} is {@code null}.
*/
public ConfigurationClientBuilder httpLogDetailLevel(HttpLogDetailLevel logLevel) {
- httpLogDetailLevel = logLevel;
+ httpLogDetailLevel = Objects.requireNonNull(logLevel);
return this;
}
@@ -235,10 +236,12 @@ public ConfigurationClientBuilder addPolicy(HttpPipelinePolicy policy) {
*
* @param client The HTTP client to use for requests.
* @return The updated ConfigurationClientBuilder object.
- * @throws NullPointerException If {@code client} is {@code null}.
*/
public ConfigurationClientBuilder httpClient(HttpClient client) {
- Objects.requireNonNull(client);
+ if (this.httpClient != null && client == null) {
+ logger.info("HttpClient is being set to 'null' when it was previously configured.");
+ }
+
this.httpClient = client;
return this;
}
@@ -253,7 +256,10 @@ public ConfigurationClientBuilder httpClient(HttpClient client) {
* @return The updated ConfigurationClientBuilder object.
*/
public ConfigurationClientBuilder pipeline(HttpPipeline pipeline) {
- Objects.requireNonNull(pipeline);
+ if (this.pipeline != null && pipeline == null) {
+ logger.info("HttpPipeline is being set to 'null' when it was previously configured.");
+ }
+
this.pipeline = pipeline;
return this;
}
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/credentials/ConfigurationClientCredentials.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/credentials/ConfigurationClientCredentials.java
index 5759ee76e2f7..6370024bb578 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/credentials/ConfigurationClientCredentials.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/credentials/ConfigurationClientCredentials.java
@@ -73,6 +73,7 @@ public URL baseUri() {
* @param httpMethod the request HTTP method
* @param contents the body content of the request
* @return a flux of headers to add for authorization
+ * @throws NoSuchAlgorithmException If the SHA-256 algorithm doesn't exist.
*/
public Mono