diff --git a/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/HttpPipelinePolicyCheck.java b/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/HttpPipelinePolicyCheck.java index a6c6b0b075b7..28ea43e69780 100644 --- a/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/HttpPipelinePolicyCheck.java +++ b/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/HttpPipelinePolicyCheck.java @@ -48,7 +48,7 @@ public void visitToken(DetailAST token) { switch (token.getType()) { case TokenTypes.PACKAGE_DEF: - final String packageName = FullIdent.createFullIdentBelow(token).getText(); + final String packageName = FullIdent.createFullIdent(token.findFirstToken(TokenTypes.DOT)).getText(); isImplementationPackage = packageName.contains("implementation"); break; case TokenTypes.CLASS_DEF: diff --git a/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/JavadocCodeSnippetCheck.java b/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/JavadocCodeSnippetCheck.java new file mode 100644 index 000000000000..56e8821f1880 --- /dev/null +++ b/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/JavadocCodeSnippetCheck.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.tools.checkstyle.checks; + +import com.puppycrawl.tools.checkstyle.DetailNodeTreeStringPrinter; +import com.puppycrawl.tools.checkstyle.api.AbstractCheck; +import com.puppycrawl.tools.checkstyle.api.DetailAST; +import com.puppycrawl.tools.checkstyle.api.DetailNode; +import com.puppycrawl.tools.checkstyle.api.FullIdent; +import com.puppycrawl.tools.checkstyle.api.JavadocTokenTypes; +import com.puppycrawl.tools.checkstyle.api.TokenTypes; +import com.puppycrawl.tools.checkstyle.utils.BlockCommentPosition; +import com.puppycrawl.tools.checkstyle.utils.JavadocUtil; + +import java.util.ArrayDeque; +import java.util.Deque; +import java.util.Locale; + +/** + * Codesnippet description should match naming pattern requirement below: + *
}, {@literal }, or {@literal {@code ...}}
+ * if these tags span multiple lines. Inline code sample are fine as-is', '', or {@literal {@code ...}) if these tags span
+ * multiple lines. Inline code sample are fine as-is.
+ *
+ * @param htmlElementStartNode HTML_ELEMENT_START node
+ */
+ private void checkHtmlElementStart(DetailNode htmlElementStartNode) {
+ final DetailNode tagNameNode = JavadocUtil.findFirstToken(htmlElementStartNode, JavadocTokenTypes.HTML_TAG_NAME);
+ // HTML tags are case-insensitive
+ final String tagName = tagNameNode.getText().toLowerCase();
+ if (!CHECK_TAGS.contains(tagName)) {
+ return;
+ }
+
+ final String tagNameBracket = "<" + tagName + ">";
+ final DetailNode htmlTagNode = htmlElementStartNode.getParent();
+ if (!isInlineCode(htmlTagNode)) {
+ log(htmlTagNode.getLineNumber(), htmlTagNode.getColumnNumber(),
+ String.format(MULTIPLE_LINE_SPAN_ERROR, tagNameBracket, tagNameBracket));
+ }
+ }
+
+ /**
+ * Check to see if the JAVADOC_INLINE_TAG node is {@literal @code} tag. If it is, check if the tag contains a new line
+ * or a leading asterisk, which implies the tag has spanned in multiple lines.
+ *
+ * @param inlineTagNode JAVADOC_INLINE_TAG javadoc node
+ */
+ private void checkJavadocInlineTag(DetailNode inlineTagNode) {
+ final DetailNode codeLiteralNode = JavadocUtil.findFirstToken(inlineTagNode, JavadocTokenTypes.CODE_LITERAL);
+ if (codeLiteralNode == null) {
+ return;
+ }
+
+ final String codeLiteral = codeLiteralNode.getText();
+ if (!isInlineCode(inlineTagNode)) {
+ log(codeLiteralNode.getLineNumber(), codeLiteralNode.getColumnNumber(),
+ String.format(MULTIPLE_LINE_SPAN_ERROR, codeLiteral, codeLiteral));
+ }
+ }
+
+ /**
+ * Find if the given tag node is in-line code sample.
+ * @param node A given node that could be HTML_TAG or JAVADOC_INLINE_TAG
+ * @return false if it is a code block, otherwise, return true if it is a in-line code.
+ */
+ private boolean isInlineCode(DetailNode node) {
+ for (final DetailNode child : node.getChildren()) {
+ final int childType = child.getType();
+ if (childType == JavadocTokenTypes.NEWLINE || childType == JavadocTokenTypes.LEADING_ASTERISK) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
index 0d9f51c9243a..c5603ef049c5 100755
--- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
+++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
@@ -130,4 +130,13 @@
+
+
+
+
+
+
+
+
+
diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle.xml
index 9e868e047b27..bac305e17308 100755
--- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle.xml
+++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle.xml
@@ -282,33 +282,33 @@ page at http://checkstyle.sourceforge.net/config.html -->
-->
-
+
-
+
-
+
-
+
-
+
@@ -322,7 +322,8 @@ page at http://checkstyle.sourceforge.net/config.html -->
-
+
+
@@ -336,5 +337,19 @@ page at http://checkstyle.sourceforge.net/config.html -->
1) Must be a public class.
2) Not in an implementation package or sub-package. -->
+
+
+
+
+
+
+
+
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java
index 33337dcb5734..2289acc99c03 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java
@@ -51,7 +51,7 @@ public final class ConfigurationClient {
*
* Add a setting with the key "prodDBConnection" and value "db_connection".
*
- * {@codesnippet com.azure.data.applicationconfig.configurationclient.addSetting#string-string}
+ * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.addSetting#String-String}
*
* @param key The key of the configuration setting to add.
* @param value The value associated with this configuration setting key.
@@ -74,7 +74,7 @@ public ConfigurationSetting addSetting(String key, String value) {
*
* Add a setting with the key "prodDBConnection", label "westUS", and value "db_connection".
*
- * {@codesnippet com.azure.data.applicationconfig.configurationclient.addSetting#ConfigurationSetting}
+ * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.addSetting#ConfigurationSetting}
*
* @param setting The setting to add to the configuration service.
* @return The {@link ConfigurationSetting} that was created, or {@code null}, if a key collision occurs or the key
@@ -97,7 +97,7 @@ public ConfigurationSetting addSetting(ConfigurationSetting setting) {
*
* Add a setting with the key "prodDBConnection", label "westUS", and value "db_connection".
*
- * {@codesnippet com.azure.data.applicationconfig.configurationclient.addSettingWithResponse#ConfigurationSetting-Context}
+ * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.addSettingWithResponse#ConfigurationSetting-Context}
*
* @param setting The setting to add to the configuration service.
* @param context Additional context that is passed through the Http pipeline during the service call.
@@ -124,7 +124,7 @@ private Response addSetting(ConfigurationSetting setting,
*
* Add a setting with the key "prodDBConnection" and value "db_connection".
*
- * {@codesnippet com.azure.data.applicationconfig.configurationclient.setSetting#string-string}
+ * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.setSetting#String-String}
*
* @param key The key of the configuration setting to create or update.
* @param value The value of this configuration setting.
@@ -151,7 +151,7 @@ public ConfigurationSetting setSetting(String key, String value) {
*
* Add a setting with the key "prodDBConnection", label "westUS", and value "db_connection".
*
- * {@codesnippet com.azure.data.applicationconfig.configurationclient.setSetting#ConfigurationSetting}
+ * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.setSetting#ConfigurationSetting}
*
* @param setting The configuration setting to create or update.
* @return The {@link ConfigurationSetting} that was created or updated, or {@code null}, if the key is an invalid
@@ -181,7 +181,7 @@ public ConfigurationSetting setSetting(ConfigurationSetting setting) {
*
*
Add a setting with the key "prodDBConnection" and value "db_connection".
*
- * {@codesnippet com.azure.data.applicationconfig.configurationclient.setSettingWithResponse#ConfigurationSetting-Context}
+ * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.setSettingWithResponse#ConfigurationSetting-Context}
*
* @param setting The configuration setting to create or update.
* @param context Additional context that is passed through the Http pipeline during the service call.
@@ -210,7 +210,7 @@ private Response setSetting(ConfigurationSetting setting,
*
* Update a setting with the key "prodDBConnection" to have the value "updated_db_connection".
*
- * {@codesnippet com.azure.data.applicationconfig.configurationclient.updateSetting#string-string}
+ * {@codesnippet com.azure.data.appconfiguration.ConfigurationClient.updateSetting#String-String}
*
* @param key The key of the configuration setting to update.
* @param value The updated value of this configuration setting.
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationClientJavaDocCodeSnippets.java b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationClientJavaDocCodeSnippets.java
index 379cce877425..3ffce424c997 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationClientJavaDocCodeSnippets.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java/com/azure/data/appconfiguration/ConfigurationClientJavaDocCodeSnippets.java
@@ -92,31 +92,31 @@ public ConfigurationClient createSyncConfigurationClient() {
*/
public void addSetting() {
ConfigurationClient configurationClient = createSyncConfigurationClient();
- // BEGIN: com.azure.data.applicationconfig.configurationclient.addSetting#string-string
+ // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.addSetting#String-String
ConfigurationSetting result = configurationClient
.addSetting("prodDBConnection", "db_connection");
System.out.printf("Key: %s, Value: %s", result.key(), result.value());
- // END: com.azure.data.applicationconfig.configurationclient.addSetting#string-string
+ // END: com.azure.data.appconfiguration.ConfigurationClient.addSetting#String-String
/*
Generates code sample for using {@link ConfigurationClient#addSetting(ConfigurationSetting)}
*/
- // BEGIN: com.azure.data.applicationconfig.configurationclient.addSetting#ConfigurationSetting
+ // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.addSetting#ConfigurationSetting
ConfigurationSetting resultSetting = configurationClient
.addSetting(new ConfigurationSetting().key("prodDBConnection").label("westUS").value("db_connection"));
System.out.printf("Key: %s, Value: %s", resultSetting.key(), resultSetting.value());
- // END: com.azure.data.applicationconfig.configurationclient.addSetting#ConfigurationSetting
+ // END: com.azure.data.appconfiguration.ConfigurationClient.addSetting#ConfigurationSetting
/*
Generates code sample for using {@link ConfigurationClient#addSettingWithResponse(ConfigurationSetting, Context)}
*/
- // BEGIN: com.azure.data.applicationconfig.configurationclient.addSettingWithResponse#ConfigurationSetting-Context
+ // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.addSettingWithResponse#ConfigurationSetting-Context
Response responseResultSetting = configurationClient
.addSettingWithResponse(
new ConfigurationSetting()
.key("prodDBConnection").label("westUS").value("db_connection"), new Context(key1, value1));
System.out.printf("Key: %s, Value: %s", responseResultSetting.value().key(), responseResultSetting.value().value());
- // END: com.azure.data.applicationconfig.configurationclient.addSettingWithResponse#ConfigurationSetting-Context
+ // END: com.azure.data.appconfiguration.ConfigurationClient.addSettingWithResponse#ConfigurationSetting-Context
}
/**
@@ -124,7 +124,7 @@ public void addSetting() {
*/
public void setSetting() {
ConfigurationClient configurationClient = createSyncConfigurationClient();
- // BEGIN: com.azure.data.applicationconfig.configurationclient.setSetting#string-string
+ // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.setSetting#String-String
ConfigurationSetting result = configurationClient
.setSetting("prodDBConnection", "db_connection");
System.out.printf("Key: %s, Value: %s", result.key(), result.value());
@@ -132,12 +132,12 @@ public void setSetting() {
// Update the value of the setting to "updated_db_connection".
result = configurationClient.setSetting("prodDBConnection", "updated_db_connection");
System.out.printf("Key: %s, Value: %s", result.key(), result.value());
- // END: com.azure.data.applicationconfig.configurationclient.setSetting#string-string
+ // END: com.azure.data.appconfiguration.ConfigurationClient.setSetting#String-String
/*
Generates code sample for using {@link ConfigurationClient#setSetting(ConfigurationSetting)}
*/
- // BEGIN: com.azure.data.applicationconfig.configurationclient.setSetting#ConfigurationSetting
+ // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.setSetting#ConfigurationSetting
// Add a setting with the key "prodDBConnection", label "westUS", and value "db_connection"
ConfigurationSetting resultSetting = configurationClient
.setSetting(new ConfigurationSetting().key("prodDBConnection").label("westUS").value("db_connection"));
@@ -148,12 +148,12 @@ public void setSetting() {
.setSetting(new ConfigurationSetting()
.key("prodDBConnection").label("westUS").value("updated_db_connection"));
System.out.printf("Key: %s, Value: %s", resultSetting.key(), resultSetting.value());
- // END: com.azure.data.applicationconfig.configurationclient.setSetting#ConfigurationSetting
+ // END: com.azure.data.appconfiguration.ConfigurationClient.setSetting#ConfigurationSetting
/*
Generates code sample for using {@link ConfigurationClient#setSettingWithResponse(ConfigurationSetting, Context)}
*/
- // BEGIN: com.azure.data.applicationconfig.configurationclient.setSettingWithResponse#ConfigurationSetting-Context
+ // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.setSettingWithResponse#ConfigurationSetting-Context
// Add a setting with the key "prodDBConnection", label "westUS", and value "db_connection"
Response responseSetting = configurationClient
.setSettingWithResponse(new ConfigurationSetting().key("prodDBConnection").label("westUS")
@@ -165,7 +165,7 @@ public void setSetting() {
.setSettingWithResponse(new ConfigurationSetting().key("prodDBConnection").label("westUS")
.value("updated_db_connection"), new Context(key2, value2));
System.out.printf("Key: %s, Value: %s", responseSetting.value().key(), responseSetting.value().value());
- // END: com.azure.data.applicationconfig.configurationclient.setSettingWithResponse#ConfigurationSetting-Context
+ // END: com.azure.data.appconfiguration.ConfigurationClient.setSettingWithResponse#ConfigurationSetting-Context
}
/**
@@ -206,13 +206,11 @@ public void getSetting() {
*/
public void updateSetting() {
ConfigurationClient configurationClient = createSyncConfigurationClient();
- // BEGIN: com.azure.data.applicationconfig.configurationclient.updateSetting#string-string
-
+ // BEGIN: com.azure.data.appconfiguration.ConfigurationClient.updateSetting#String-String
// Update a setting with the key "prodDBConnection" to have the value "updated_db_connection".
-
ConfigurationSetting result = configurationClient.updateSetting("prodDBConnection", "updated_db_connection");
System.out.printf("Key: %s, Value: %s", result.key(), result.value());
- // END: com.azure.data.applicationconfig.configurationclient.updateSetting#string-string
+ // END: com.azure.data.appconfiguration.ConfigurationClient.updateSetting#String-String
/*
Generates code sample for using {@link ConfigurationClient#updateSetting(ConfigurationSetting)}
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/RetryPolicy.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/RetryPolicy.java
index 5424f705ff1f..b81c5d1ac9e7 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/RetryPolicy.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/RetryPolicy.java
@@ -101,8 +101,8 @@ public Duration calculateRetryDelay(Exception lastException, int retryCount) {
}
/**
- * Calculates the amount of time to delay before the next retry attempt based on the {@code retryCound}, {@code
- * baseDelay}, and {@code baseJitter}.
+ * Calculates the amount of time to delay before the next retry attempt based on the {@code retryCound},
+ * {@code baseDelay}, and {@code baseJitter}.
*
* @param retryCount The number of attempts that have been made, including the initial attempt before any
* retries.
diff --git a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java
index 6bc1b4a0e6ae..2f1a9aa734cd 100644
--- a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java
+++ b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java
@@ -82,8 +82,8 @@ public TestMode getTestMode() {
/**
* Gets the name of the current test being run.
*
- * NOTE: This could not be implemented in the base class using {@link TestName} because it always returns {@code
- * null}. See https://stackoverflow.com/a/16113631/4220757.
+ * NOTE: This could not be implemented in the base class using {@link TestName} because it always returns
+ * {@code null}. See https://stackoverflow.com/a/16113631/4220757.
*
* @return The name of the current test.
*/
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/Poller.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/Poller.java
index 210f1982128d..5c7dc744e3f2 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/Poller.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/Poller.java
@@ -49,7 +49,7 @@
* {@codesnippet com.azure.core.util.polling.poller.block}
*
*
Disable auto polling and polling manually
- * {@codesnippet com.azure.core.util.polling.poller.poll}
+ * {@codesnippet com.azure.core.util.polling.poller.poll-manually}
*
* @param Type of poll response value
* @see PollResponse
@@ -199,7 +199,7 @@ public Flux> getObserver() {
*
* Manual Polling
*
- * {@codesnippet com.azure.core.util.polling.poller.poll.indepth}
+ * {@codesnippet com.azure.core.util.polling.poller.poll-indepth}
*
* @return a Mono of {@link PollResponse} This will call poll operation once. The {@link Mono} returned here could be subscribed
* for receiving {@link PollResponse} in async manner.
diff --git a/sdk/core/azure-core/src/samples/java/com/azure/core/util/polling/PollerJavaDocCodeSnippets.java b/sdk/core/azure-core/src/samples/java/com/azure/core/util/polling/PollerJavaDocCodeSnippets.java
index 3cabbac3a8a4..acbdf8420ba8 100644
--- a/sdk/core/azure-core/src/samples/java/com/azure/core/util/polling/PollerJavaDocCodeSnippets.java
+++ b/sdk/core/azure-core/src/samples/java/com/azure/core/util/polling/PollerJavaDocCodeSnippets.java
@@ -173,7 +173,7 @@ public void poll() {
Poller myPoller = null;
- // BEGIN: com.azure.core.util.polling.poller.poll
+ // BEGIN: com.azure.core.util.polling.poller.poll-manually
myPoller.setAutoPollingEnabled(false);
PollResponse pollResponse = null;
// We assume that we get SUCCESSFULLY_COMPLETED status from pollOperation when polling is complete.
@@ -187,7 +187,7 @@ public void poll() {
}
}
System.out.println("Polling complete with status " + myPoller.getStatus().toString());
- // END: com.azure.core.util.polling.poller.poll
+ // END: com.azure.core.util.polling.poller.poll-manually
}
/**
@@ -197,7 +197,7 @@ public void pollIndepth() {
Poller myPoller = null;
- // BEGIN: com.azure.core.util.polling.poller.poll.indepth
+ // BEGIN: com.azure.core.util.polling.poller.poll-indepth
// Turn off auto polling and this code will take control of polling
myPoller.setAutoPollingEnabled(false);
@@ -216,6 +216,6 @@ public void pollIndepth() {
}
}
System.out.println("Polling complete with status " + myPoller.getStatus().toString());
- // END: com.azure.core.util.polling.poller.poll.indepth
+ // END: com.azure.core.util.polling.poller.poll-indepth
}
}
diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncClient.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncClient.java
index 88db17617af0..46c53a51dc80 100644
--- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncClient.java
+++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubAsyncClient.java
@@ -241,8 +241,8 @@ public EventHubAsyncConsumer createConsumer(String consumerGroup, String partiti
* @param options The set of options to apply when creating the consumer.
* @return An new {@link EventHubAsyncConsumer} that receives events from the partition with all configured {@link
* EventHubConsumerOptions}.
- * @throws NullPointerException If {@code eventPosition}, {@code consumerGroup}, {@code partitionId}, or {@code
- * options} is {@code null}.
+ * @throws NullPointerException If {@code eventPosition}, {@code consumerGroup}, {@code partitionId}, or
+ * {@code options} is {@code null}.
* @throws IllegalArgumentException If {@code consumerGroup} or {@code partitionId} is an empty string.
*/
public EventHubAsyncConsumer createConsumer(String consumerGroup, String partitionId, EventPosition eventPosition,
diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubClient.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubClient.java
index f94c35009a58..74d75c6e91d4 100644
--- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubClient.java
+++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubClient.java
@@ -133,8 +133,8 @@ public EventHubProducer createProducer(EventHubProducerOptions options) {
* @param partitionId The identifier of the Event Hub partition.
* @param eventPosition The position within the partition where the consumer should begin reading events.
* @return A new {@link EventHubConsumer} that receives events from the partition at the given position.
- * @throws NullPointerException If {@code eventPosition}, {@code consumerGroup}, {@code partitionId}, or {@code
- * options} is {@code null}.
+ * @throws NullPointerException If {@code eventPosition}, {@code consumerGroup}, {@code partitionId}, or
+ * {@code options} is {@code null}.
* @throws IllegalArgumentException If {@code consumerGroup} or {@code partitionId} is an empty string.
*/
public EventHubConsumer createConsumer(String consumerGroup, String partitionId, EventPosition eventPosition) {
@@ -168,8 +168,8 @@ public EventHubConsumer createConsumer(String consumerGroup, String partitionId,
* @param options The set of options to apply when creating the consumer.
* @return An new {@link EventHubConsumer} that receives events from the partition with all configured {@link
* EventHubConsumerOptions}.
- * @throws NullPointerException If {@code eventPosition}, {@code consumerGroup}, {@code partitionId}, or {@code
- * options} is {@code null}.
+ * @throws NullPointerException If {@code eventPosition}, {@code consumerGroup}, {@code partitionId}, or
+ * {@code options} is {@code null}.
* @throws IllegalArgumentException If {@code consumerGroup} or {@code partitionId} is an empty string.
*/
public EventHubConsumer createConsumer(String consumerGroup, String partitionId, EventPosition eventPosition,
diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubClientBuilder.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubClientBuilder.java
index 7087bdcee4b3..4c20b7a9b8b2 100644
--- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubClientBuilder.java
+++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubClientBuilder.java
@@ -116,8 +116,8 @@ public EventHubClientBuilder() {
* expected that the Event Hub name and the shared access key properties are contained in this connection
* string.
* @return The updated {@link EventHubClientBuilder} object.
- * @throws IllegalArgumentException if {@code connectionString} is null or empty. Or, the {@code
- * connectionString} does not contain the "EntityPath" key, which is the name of the Event Hub instance.
+ * @throws IllegalArgumentException if {@code connectionString} is null or empty. Or, the {@code connectionString}
+ * does not contain the "EntityPath" key, which is the name of the Event Hub instance.
* @throws AzureException If the shared access signature token credential could not be created using the
* connection string.
*/
@@ -268,8 +268,8 @@ public EventHubClientBuilder retry(RetryOptions retryOptions) {
}
/**
- * Creates a new {@link EventHubAsyncClient} based on options set on this builder. Every time {@code
- * buildAsyncClient()} is invoked, a new instance of {@link EventHubAsyncClient} is created.
+ * Creates a new {@link EventHubAsyncClient} based on options set on this builder. Every time
+ * {@code buildAsyncClient()} is invoked, a new instance of {@link EventHubAsyncClient} is created.
*
*
* The following options are used if ones are not specified in the builder:
diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/EventHubProducerOptions.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/EventHubProducerOptions.java
index 83be11882728..102f0cd538b8 100644
--- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/EventHubProducerOptions.java
+++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/models/EventHubProducerOptions.java
@@ -50,16 +50,16 @@ public EventHubProducerOptions retry(RetryOptions retry) {
/**
* Gets the retry options used to govern retry attempts when an issue is encountered while sending.
*
- * @return the retry options used to govern retry attempts when an issue is encountered while sending. If {@code
- * null}, then the retry options configured on the associated {@link EventHubAsyncClient} is used.
+ * @return the retry options used to govern retry attempts when an issue is encountered while sending. If
+ * {@code null}, then the retry options configured on the associated {@link EventHubAsyncClient} is used.
*/
public RetryOptions retry() {
return retryOptions;
}
/**
- * Gets the identifier of the Event Hub partition that the {@link EventHubAsyncProducer} will be bound to, limiting it to
- * sending events to only that partition.
+ * Gets the identifier of the Event Hub partition that the {@link EventHubAsyncProducer} will be bound to, limiting
+ * it to sending events to only that partition.
*
* If the identifier is not specified, the Event Hubs service will be responsible for routing events that are sent
* to an available partition.
diff --git a/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClient.java b/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClient.java
index ddbec14ef3c1..cd6ef7e7cc3f 100644
--- a/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClient.java
+++ b/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClient.java
@@ -164,7 +164,7 @@ Mono> getKeyWithResponse(Context context) {
*
* Code Samples
* Encrypts the content. Subscribes to the call asynchronously and prints out the encrypted content details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.encrypt#asymmetric-encrypt}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.encrypt#EncryptionAlgorithm-byte}
*
* @param algorithm The algorithm to be used for encryption.
* @param plaintext The content to be encrypted.
@@ -189,7 +189,7 @@ public Mono encrypt(EncryptionAlgorithm algorithm, byte[] plainte
*
* Code Samples
* Encrypts the content. Subscribes to the call asynchronously and prints out the encrypted content details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.encrypt#symmetric-encrypt}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.encrypt#EncryptionAlgorithm-byte-byte-byte}
*
* @param algorithm The algorithm to be used for encryption.
* @param plaintext The content to be encrypted.
@@ -231,7 +231,7 @@ Mono encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, Con
*
* Code Samples
* Decrypts the encrypted content. Subscribes to the call asynchronously and prints out the decrypted content details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.decrypt#asymmetric-decrypt}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.decrypt#EncryptionAlgorithm-byte}
*
* @param algorithm The algorithm to be used for decryption.
* @param cipherText The content to be decrypted.
@@ -255,7 +255,7 @@ public Mono decrypt(EncryptionAlgorithm algorithm, byte[] cipherT
*
* Code Samples
* Decrypts the encrypted content. Subscribes to the call asynchronously and prints out the decrypted content details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.decrypt#symmetric-decrypt}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte}
*
* @param algorithm The algorithm to be used for decryption.
* @param cipherText The content to be decrypted.
@@ -297,7 +297,7 @@ Mono decrypt(EncryptionAlgorithm algorithm, byte[] cipherText, by
*
* Code Samples
* Sings the digest. Subscribes to the call asynchronously and prints out the signature details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.sign}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.sign#SignatureAlgorithm-byte}
*
* @param algorithm The algorithm to use for signing.
* @param digest The content from which signature is to be created.
@@ -337,7 +337,7 @@ Mono sign(SignatureAlgorithm algorithm, byte[] digest, Context conte
*
* Code Samples
* Verifies the signature against the specified digest. Subscribes to the call asynchronously and prints out the verification details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.verify}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.verify#SignatureAlgorithm-byte-byte}
*
* @param algorithm The algorithm to use for signing.
* @param digest The content from which signature is to be created.
@@ -375,7 +375,7 @@ Mono verify(SignatureAlgorithm algorithm, byte[] digest, byte[] si
*
* Code Samples
* Wraps the key content. Subscribes to the call asynchronously and prints out the wrapped key details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.wrap-key}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.wrapKey#KeyWrapAlgorithm-byte}
*
* @param algorithm The encryption algorithm to use for wrapping the key.
* @param key The key content to be wrapped
@@ -413,7 +413,7 @@ Mono wrapKey(KeyWrapAlgorithm algorithm, byte[] key, Context cont
*
* Code Samples
* Unwraps the key content. Subscribes to the call asynchronously and prints out the unwrapped key details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.unwrap-key}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.unwrapKey#KeyWrapAlgorithm-byte}
*
* @param algorithm The encryption algorithm to use for wrapping the key.
* @param encryptedKey The encrypted key content to unwrap.
@@ -453,7 +453,7 @@ Mono unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey,
*
* Code Samples
* Signs the raw data. Subscribes to the call asynchronously and prints out the signature details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.sign-data}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.signData#SignatureAlgorithm-byte}
*
* @param algorithm The algorithm to use for signing.
* @param data The content from which signature is to be created.
@@ -493,7 +493,7 @@ Mono signData(SignatureAlgorithm algorithm, byte[] data, Context con
*
* Code Samples
* Verifies the signature against the raw data. Subscribes to the call asynchronously and prints out the verification details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.verify-data}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.verifyData#SignatureAlgorithm-byte-byte}
*
* @param algorithm The algorithm to use for signing.
* @param data The raw content against which signature is to be verified.
diff --git a/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClient.java b/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClient.java
index a81b0222a896..fc2a10904054 100644
--- a/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClient.java
+++ b/sdk/keyvault/azure-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/cryptography/CryptographyClient.java
@@ -86,7 +86,7 @@ public Response getKeyWithResponse(Context context) {
*
* Code Samples
* Encrypts the content. Prints out the encrypted content details.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.encrypt#symmetric-encrypt}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte-byte-byte}
*
* @param algorithm The algorithm to be used for encryption.
* @param plaintext The content to be encrypted.
@@ -113,7 +113,7 @@ public EncryptResult encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, by
*
* Code Samples
* Encrypts the content. Subscribes to the call asynchronously and prints out the encrypted content details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.encrypt#symmetric-encrypt-Context}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte-byte-byte-Context}
*
* @param algorithm The algorithm to be used for encryption.
* @param plaintext The content to be encrypted.
@@ -141,7 +141,7 @@ public EncryptResult encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, by
*
* Code Samples
* Encrypts the content. Subscribes to the call asynchronously and prints out the encrypted content details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.encrypt#asymmetric-encrypt}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte}
*
* @param algorithm The algorithm to be used for encryption.
* @param plaintext The content to be encrypted.
@@ -165,7 +165,7 @@ public EncryptResult encrypt(EncryptionAlgorithm algorithm, byte[] plaintext) {
*
* Code Samples
* Decrypts the encrypted content. Subscribes to the call asynchronously and prints out the decrypted content details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.decrypt#symmetric-decrypt}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte}
*
* @param algorithm The algorithm to be used for decryption.
* @param cipherText The content to be decrypted.
@@ -192,7 +192,7 @@ public DecryptResult decrypt(EncryptionAlgorithm algorithm, byte[] cipherText, b
*
* Code Samples
* Decrypts the encrypted content. Subscribes to the call asynchronously and prints out the decrypted content details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.decrypt#symmetric-decrypt-Context}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte-Context}
*
* @param algorithm The algorithm to be used for decryption.
* @param cipherText The content to be decrypted.
@@ -220,7 +220,7 @@ public DecryptResult decrypt(EncryptionAlgorithm algorithm, byte[] cipherText, b
*
* Code Samples
* Decrypts the encrypted content. Subscribes to the call asynchronously and prints out the decrypted content details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.decrypt#asymmetric-decrypt}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte}
*
* @param algorithm The algorithm to be used for decryption.
* @param cipherText The content to be decrypted.
@@ -244,7 +244,7 @@ public DecryptResult decrypt(EncryptionAlgorithm algorithm, byte[] cipherText) {
*
* Code Samples
* Sings the digest. Subscribes to the call asynchronously and prints out the signature details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.sign-Context}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.sign#SignatureAlgorithm-byte-Context}
*
* @param algorithm The algorithm to use for signing.
* @param digest The content from which signature is to be created.
@@ -269,7 +269,7 @@ public SignResult sign(SignatureAlgorithm algorithm, byte[] digest, Context cont
*
* Code Samples
* Sings the digest. Subscribes to the call asynchronously and prints out the signature details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.sign}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.sign#SignatureAlgorithm-byte}
*
* @param algorithm The algorithm to use for signing.
* @param digest The content from which signature is to be created.
@@ -293,7 +293,7 @@ public SignResult sign(SignatureAlgorithm algorithm, byte[] digest) {
*
* Code Samples
* Verifies the signature against the specified digest. Subscribes to the call asynchronously and prints out the verification details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.verify}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.verify#SignatureAlgorithm-byte-byte}
*
* @param algorithm The algorithm to use for signing.
* @param digest The content from which signature was created.
@@ -318,7 +318,7 @@ public VerifyResult verify(SignatureAlgorithm algorithm, byte[] digest, byte[] s
*
* Code Samples
* Verifies the signature against the specified digest. Subscribes to the call asynchronously and prints out the verification details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.verify-Context}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.verify#SignatureAlgorithm-byte-byte-Context}
*
* @param algorithm The algorithm to use for signing.
* @param digest The content from which signature is to be created.
@@ -341,7 +341,7 @@ public VerifyResult verify(SignatureAlgorithm algorithm, byte[] digest, byte[] s
*
* Code Samples
* Wraps the key content. Subscribes to the call asynchronously and prints out the wrapped key details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.wrap-key}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.wrapKey#KeyWrapAlgorithm-byte}
*
* @param algorithm The encryption algorithm to use for wrapping the key.
* @param key The key content to be wrapped
@@ -362,7 +362,7 @@ public KeyWrapResult wrapKey(KeyWrapAlgorithm algorithm, byte[] key) {
*
* Code Samples
* Wraps the key content. Subscribes to the call asynchronously and prints out the wrapped key details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.wrap-key-Context}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.wrapKey#KeyWrapAlgorithm-byte-Context}
*
* @param algorithm The encryption algorithm to use for wrapping the key.
* @param key The key content to be wrapped
@@ -385,7 +385,7 @@ public KeyWrapResult wrapKey(KeyWrapAlgorithm algorithm, byte[] key, Context con
*
* Code Samples
* Unwraps the key content. Subscribes to the call asynchronously and prints out the unwrapped key details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.unwrap-key}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.unwrapKey#KeyWrapAlgorithm-byte}
*
* @param algorithm The encryption algorithm to use for wrapping the key.
* @param encryptedKey The encrypted key content to unwrap.
@@ -407,7 +407,7 @@ public KeyUnwrapResult unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey
*
* Code Samples
* Unwraps the key content. Subscribes to the call asynchronously and prints out the unwrapped key details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.unwrap-key-Context}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.unwrapKey#KeyWrapAlgorithm-byte-Context}
*
* @param algorithm The encryption algorithm to use for wrapping the key.
* @param encryptedKey The encrypted key content to unwrap.
@@ -432,7 +432,7 @@ public KeyUnwrapResult unwrapKey(KeyWrapAlgorithm algorithm, byte[] encryptedKey
*
* Code Samples
* Signs the raw data. Subscribes to the call asynchronously and prints out the signature details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.sign-data}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.signData#SignatureAlgorithm-byte}
*
* @param algorithm The algorithm to use for signing.
* @param data The content from which signature is to be created.
@@ -456,7 +456,7 @@ public SignResult signData(SignatureAlgorithm algorithm, byte[] data) {
*
* Code Samples
* Signs the raw data. Subscribes to the call asynchronously and prints out the signature details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.sign-data-Context}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.signData#SignatureAlgorithm-byte-Context}
*
* @param algorithm The algorithm to use for signing.
* @param data The content from which signature is to be created.
@@ -481,7 +481,7 @@ public SignResult signData(SignatureAlgorithm algorithm, byte[] data, Context co
*
* Code Samples
* Verifies the signature against the raw data. Subscribes to the call asynchronously and prints out the verification details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.verify-data}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.verifyData#SignatureAlgorithm-byte-byte}
*
* @param algorithm The algorithm to use for signing.
* @param data The raw content against which signature is to be verified.
@@ -506,7 +506,7 @@ public VerifyResult verifyData(SignatureAlgorithm algorithm, byte[] data, byte[]
*
* Code Samples
* Verifies the signature against the raw data. Subscribes to the call asynchronously and prints out the verification details when a response has been received.
- * {@codesnippet com.azure.security.keyvault.keys.cryptography.cryptographyclient.verify-data-Context}
+ * {@codesnippet com.azure.security.keyvault.keys.cryptography.CryptographyClient.verifyData#SignatureAlgorithm-byte-byte-Context}
*
* @param algorithm The algorithm to use for signing.
* @param data The raw content against which signature is to be verified.
diff --git a/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java
index d6c226adc048..a2825703065c 100644
--- a/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java
+++ b/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyAsyncClientJavaDocCodeSnippets.java
@@ -118,7 +118,7 @@ public void encrypt() {
(byte) 0x69, (byte) 0x70, (byte) 0x6c, (byte) 0x65, (byte) 0x20, (byte) 0x6f, (byte) 0x66, (byte) 0x20, (byte) 0x41, (byte) 0x75, (byte) 0x67, (byte) 0x75, (byte) 0x73, (byte) 0x74, (byte) 0x65, (byte) 0x20,
(byte) 0x4b, (byte) 0x65, (byte) 0x72, (byte) 0x63, (byte) 0x6b, (byte) 0x68, (byte) 0x6f, (byte) 0x66, (byte) 0x66, (byte) 0x73
};
- // BEGIN: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.encrypt#asymmetric-encrypt
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.encrypt#EncryptionAlgorithm-byte
byte[] plainText = new byte[100];
new Random(0x1234567L).nextBytes(plainText);
cryptographyAsyncClient.encrypt(EncryptionAlgorithm.RSA_OAEP, plainText)
@@ -126,16 +126,16 @@ public void encrypt() {
.subscribe(encryptResult ->
System.out.printf("Received encrypted content of length %d with algorithm %s \n",
encryptResult.cipherText().length, encryptResult.algorithm().toString()));
- // END: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.encrypt#asymmetric-encrypt
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.encrypt#EncryptionAlgorithm-byte
- // BEGIN: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.encrypt#symmetric-encrypt
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.encrypt#EncryptionAlgorithm-byte-byte-byte
cryptographyAsyncClient.encrypt(EncryptionAlgorithm.A192CBC_HS384, plainText, iv, authData)
.subscriberContext(reactor.util.context.Context.of(key1, value1, key2, value2))
.subscribe(encryptResult ->
System.out.printf("Received encrypted content of length %d with algorithm %s \n",
encryptResult.cipherText().length, encryptResult.algorithm().toString()));
- // END: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.encrypt#symmetric-encrypt
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.encrypt#EncryptionAlgorithm-byte-byte-byte
}
/**
@@ -151,23 +151,23 @@ public void decrypt() {
(byte) 0x4b, (byte) 0x65, (byte) 0x72, (byte) 0x63, (byte) 0x6b, (byte) 0x68, (byte) 0x6f, (byte) 0x66, (byte) 0x66, (byte) 0x73
};
byte[] authTag = {(byte) 0x65, (byte) 0x2c, (byte) 0x3f, (byte) 0xa3, (byte) 0x6b, (byte) 0x0a, (byte) 0x7c, (byte) 0x5b, (byte) 0x32, (byte) 0x19, (byte) 0xfa, (byte) 0xb3, (byte) 0xa3, (byte) 0x0b, (byte) 0xc1, (byte) 0xc4};
- // BEGIN: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.decrypt#asymmetric-decrypt
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.decrypt#EncryptionAlgorithm-byte
byte[] plainText = new byte[100];
new Random(0x1234567L).nextBytes(plainText);
cryptographyAsyncClient.decrypt(EncryptionAlgorithm.RSA_OAEP, plainText)
.subscriberContext(reactor.util.context.Context.of(key1, value1, key2, value2))
.subscribe(decryptResult ->
System.out.printf("Received decrypted content of length %d\n", decryptResult.plainText().length));
- // END: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.decrypt#asymmetric-decrypt
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.decrypt#EncryptionAlgorithm-byte
- // BEGIN: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.decrypt#symmetric-decrypt
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte
cryptographyAsyncClient.decrypt(EncryptionAlgorithm.A192CBC_HS384, plainText, iv, authData, authTag)
.subscriberContext(reactor.util.context.Context.of(key1, value1, key2, value2))
.subscribe(encryptResult ->
System.out.printf("Received decrypted content of length %d with algorithm %s \n",
encryptResult.plainText().length));
- // END: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.decrypt#symmetric-decrypt
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte
}
/**
@@ -179,7 +179,7 @@ public void decrypt() {
public void signVerify() throws NoSuchAlgorithmException {
CryptographyAsyncClient cryptographyAsyncClient = createAsyncClient();
byte[] signature = new byte[100];
- // BEGIN: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.sign
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.sign#SignatureAlgorithm-byte
byte[] data = new byte[100];
new Random(0x1234567L).nextBytes(data);
MessageDigest md = MessageDigest.getInstance("SHA-256");
@@ -189,14 +189,14 @@ public void signVerify() throws NoSuchAlgorithmException {
.subscriberContext(reactor.util.context.Context.of(key1, value1, key2, value2))
.subscribe(signResult ->
System.out.printf("Received signature of length %d with algorithm %s", signResult.signature().length));
- // END: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.sign
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.sign#SignatureAlgorithm-byte
- // BEGIN: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.verify
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.verify#SignatureAlgorithm-byte-byte
cryptographyAsyncClient.verify(SignatureAlgorithm.ES256, digest, signature)
.subscriberContext(reactor.util.context.Context.of(key1, value1, key2, value2))
.subscribe(verifyResult ->
System.out.printf("Verification status %s", verifyResult.isValid()));
- // END: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.verify
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.verify#SignatureAlgorithm-byte-byte
}
@@ -209,21 +209,21 @@ public void signVerify() throws NoSuchAlgorithmException {
public void signDataVerifyData() throws NoSuchAlgorithmException {
CryptographyAsyncClient cryptographyAsyncClient = createAsyncClient();
byte[] signature = new byte[100];
- // BEGIN: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.sign-data
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.signData#SignatureAlgorithm-byte
byte[] data = new byte[100];
new Random(0x1234567L).nextBytes(data);
cryptographyAsyncClient.sign(SignatureAlgorithm.ES256, data)
.subscriberContext(reactor.util.context.Context.of(key1, value1, key2, value2))
.subscribe(signResult ->
System.out.printf("Received signature of length %d with algorithm %s", signResult.signature().length));
- // END: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.sign-data
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.signData#SignatureAlgorithm-byte
- // BEGIN: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.verify-data
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.verifyData#SignatureAlgorithm-byte-byte
cryptographyAsyncClient.verify(SignatureAlgorithm.ES256, data, signature)
.subscriberContext(reactor.util.context.Context.of(key1, value1, key2, value2))
.subscribe(verifyResult ->
System.out.printf("Verification status %s", verifyResult.isValid()));
- // END: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.verify-data
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.verifyData#SignatureAlgorithm-byte-byte
}
/**
@@ -233,7 +233,7 @@ public void signDataVerifyData() throws NoSuchAlgorithmException {
public void wrapKeyUnwrapKey() {
CryptographyAsyncClient cryptographyAsyncClient = createAsyncClient();
byte[] encryptedKey = new byte[100];
- // BEGIN: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.wrap-key
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.wrapKey#KeyWrapAlgorithm-byte
byte[] key = new byte[100];
new Random(0x1234567L).nextBytes(key);
cryptographyAsyncClient.wrapKey(KeyWrapAlgorithm.RSA_OAEP, key)
@@ -241,14 +241,14 @@ public void wrapKeyUnwrapKey() {
.subscribe(keyWrapResult ->
System.out.printf("Received encypted key of length %d with algorithm %s",
keyWrapResult.encryptedKey().length, keyWrapResult.algorithm().toString()));
- // END: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.wrap-key
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.wrapKey#KeyWrapAlgorithm-byte
- // BEGIN: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.unwrap-key
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.unwrapKey#KeyWrapAlgorithm-byte
cryptographyAsyncClient.unwrapKey(KeyWrapAlgorithm.RSA_OAEP, encryptedKey)
.subscriberContext(reactor.util.context.Context.of(key1, value1, key2, value2))
.subscribe(keyUnwrapResult ->
System.out.printf("Received key of length %d", keyUnwrapResult.key().length));
- // END: com.azure.security.keyvault.keys.cryptography.async.cryptographyclient.unwrap-key
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient.unwrapKey#KeyWrapAlgorithm-byte
}
/**
diff --git a/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientJavaDocCodeSnippets.java
index 7d07f0e8be3e..88cab358f41e 100644
--- a/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientJavaDocCodeSnippets.java
+++ b/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/CryptographyClientJavaDocCodeSnippets.java
@@ -80,29 +80,29 @@ public void encrypt() {
(byte) 0x69, (byte) 0x70, (byte) 0x6c, (byte) 0x65, (byte) 0x20, (byte) 0x6f, (byte) 0x66, (byte) 0x20, (byte) 0x41, (byte) 0x75, (byte) 0x67, (byte) 0x75, (byte) 0x73, (byte) 0x74, (byte) 0x65, (byte) 0x20,
(byte) 0x4b, (byte) 0x65, (byte) 0x72, (byte) 0x63, (byte) 0x6b, (byte) 0x68, (byte) 0x6f, (byte) 0x66, (byte) 0x66, (byte) 0x73
};
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.encrypt#asymmetric-encrypt
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte
byte[] plainText = new byte[100];
new Random(0x1234567L).nextBytes(plainText);
EncryptResult encryptResult = cryptographyClient.encrypt(EncryptionAlgorithm.RSA_OAEP, plainText);
System.out.printf("Received encrypted content of length %d with algorithm %s \n",
encryptResult.cipherText().length, encryptResult.algorithm().toString());
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.encrypt#asymmetric-encrypt
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.encrypt#symmetric-encrypt
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte-byte-byte
EncryptResult encryptionResult = cryptographyClient.encrypt(EncryptionAlgorithm.A192CBC_HS384, plainText,
iv, authData);
System.out.printf("Received encrypted content of length %d with algorithm %s \n",
encryptionResult.cipherText().length, encryptResult.algorithm().toString());
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.encrypt#symmetric-encrypt
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte-byte-byte
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.encrypt#symmetric-encrypt-Context
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte-byte-byte-Context
EncryptResult encryptionResponse = cryptographyClient.encrypt(EncryptionAlgorithm.A192CBC_HS384, plainText,
iv, authData, new Context(key1, value1));
System.out.printf("Received encrypted content of length %d with algorithm %s \n",
encryptionResponse.cipherText().length, encryptResult.algorithm().toString());
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.encrypt#symmetric-encrypt-Context
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.encrypt#EncryptionAlgorithm-byte-byte-byte-Context
}
/**
@@ -118,26 +118,26 @@ public void decrypt() {
(byte) 0x4b, (byte) 0x65, (byte) 0x72, (byte) 0x63, (byte) 0x6b, (byte) 0x68, (byte) 0x6f, (byte) 0x66, (byte) 0x66, (byte) 0x73
};
byte[] authTag = {(byte) 0x65, (byte) 0x2c, (byte) 0x3f, (byte) 0xa3, (byte) 0x6b, (byte) 0x0a, (byte) 0x7c, (byte) 0x5b, (byte) 0x32, (byte) 0x19, (byte) 0xfa, (byte) 0xb3, (byte) 0xa3, (byte) 0x0b, (byte) 0xc1, (byte) 0xc4};
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.decrypt#asymmetric-decrypt
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte
byte[] plainText = new byte[100];
new Random(0x1234567L).nextBytes(plainText);
DecryptResult decryptResult = cryptographyClient.decrypt(EncryptionAlgorithm.RSA_OAEP, plainText);
System.out.printf("Received decrypted content of length %d\n", decryptResult.plainText().length);
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.decrypt#asymmetric-decrypt
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.decrypt#symmetric-decrypt
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte
DecryptResult decryptionResult = cryptographyClient.decrypt(EncryptionAlgorithm.A192CBC_HS384, plainText,
iv, authData, authTag);
System.out.printf("Received decrypted content of length %d with algorithm %s \n",
decryptionResult.plainText().length);
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.decrypt#symmetric-decrypt
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.decrypt#symmetric-decrypt-Context
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte-Context
DecryptResult decryptionResponse = cryptographyClient.decrypt(EncryptionAlgorithm.A192CBC_HS384, plainText,
iv, authData, authTag, new Context(key2, value2));
System.out.printf("Received decrypted content of length %d with algorithm %s \n",
decryptionResponse.plainText().length);
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.decrypt#symmetric-decrypt-Context
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.decrypt#EncryptionAlgorithm-byte-byte-byte-byte-Context
}
/**
@@ -149,7 +149,7 @@ public void decrypt() {
public void signVerify() throws NoSuchAlgorithmException {
CryptographyClient cryptographyClient = createClient();
byte[] signature = new byte[100];
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.sign
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.sign#SignatureAlgorithm-byte
byte[] data = new byte[100];
new Random(0x1234567L).nextBytes(data);
MessageDigest md = MessageDigest.getInstance("SHA-256");
@@ -158,9 +158,9 @@ public void signVerify() throws NoSuchAlgorithmException {
SignResult signResult = cryptographyClient.sign(SignatureAlgorithm.ES256, digest);
System.out.printf("Received signature of length %d with algorithm %s", signResult.signature().length,
signResult.algorithm().toString());
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.sign
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.sign#SignatureAlgorithm-byte
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.sign-Context
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.sign#SignatureAlgorithm-byte-Context
byte[] plainTextData = new byte[100];
new Random(0x1234567L).nextBytes(plainTextData);
MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
@@ -169,17 +169,17 @@ public void signVerify() throws NoSuchAlgorithmException {
SignResult signResponse = cryptographyClient.sign(SignatureAlgorithm.ES256, digetContent);
System.out.printf("Received signature of length %d with algorithm %s", signResponse.signature().length,
signResponse.algorithm().toString(), new Context(key1, value1));
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.sign-Context
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.sign#SignatureAlgorithm-byte-Context
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.verify
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.verify#SignatureAlgorithm-byte-byte
VerifyResult verifyResult = cryptographyClient.verify(SignatureAlgorithm.ES256, digest, signature);
System.out.printf("Verification status %s", verifyResult.isValid());
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.verify
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.verify#SignatureAlgorithm-byte-byte
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.verify-Context
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.verify#SignatureAlgorithm-byte-byte-Context
VerifyResult verifyResponse = cryptographyClient.verify(SignatureAlgorithm.ES256, digest, signature);
System.out.printf("Verification status %s", verifyResponse.isValid(), new Context(key2, value2));
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.verify-Context
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.verify#SignatureAlgorithm-byte-byte-Context
}
@@ -192,30 +192,30 @@ public void signVerify() throws NoSuchAlgorithmException {
public void signDataVerifyData() throws NoSuchAlgorithmException {
CryptographyClient cryptographyClient = createClient();
byte[] signature = new byte[100];
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.sign-data
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.signData#SignatureAlgorithm-byte
byte[] data = new byte[100];
new Random(0x1234567L).nextBytes(data);
SignResult signResult = cryptographyClient.sign(SignatureAlgorithm.ES256, data);
System.out.printf("Received signature of length %d with algorithm %s", signResult.signature().length);
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.sign-data
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.signData#SignatureAlgorithm-byte
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.sign-data-Context
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.signData#SignatureAlgorithm-byte-Context
byte[] plainTextData = new byte[100];
new Random(0x1234567L).nextBytes(plainTextData);
SignResult signReponse = cryptographyClient.sign(SignatureAlgorithm.ES256, plainTextData);
System.out.printf("Received signature of length %d with algorithm %s", signReponse.signature().length,
new Context(key1, value1));
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.sign-data-Context
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.signData#SignatureAlgorithm-byte-Context
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.verify-data
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.verifyData#SignatureAlgorithm-byte-byte
VerifyResult verifyResult = cryptographyClient.verify(SignatureAlgorithm.ES256, data, signature);
System.out.printf("Verification status %s", verifyResult.isValid());
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.verify-data
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.verifyData#SignatureAlgorithm-byte-byte
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.verify-data-Context
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.verifyData#SignatureAlgorithm-byte-byte-Context
VerifyResult verifyResponse = cryptographyClient.verify(SignatureAlgorithm.ES256, data, signature);
System.out.printf("Verification status %s", verifyResponse.isValid(), new Context(key2, value2));
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.verify-data-Context
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.verifyData#SignatureAlgorithm-byte-byte-Context
}
/**
@@ -225,32 +225,32 @@ public void signDataVerifyData() throws NoSuchAlgorithmException {
public void wrapKeyUnwrapKey() {
CryptographyClient cryptographyClient = createClient();
byte[] encryptedKey = new byte[100];
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.wrap-key
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.wrapKey#KeyWrapAlgorithm-byte
byte[] key = new byte[100];
new Random(0x1234567L).nextBytes(key);
KeyWrapResult keyWrapResult = cryptographyClient.wrapKey(KeyWrapAlgorithm.RSA_OAEP, key);
System.out.printf("Received encypted key of length %d with algorithm %s", keyWrapResult.encryptedKey().length,
keyWrapResult.algorithm().toString());
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.wrap-key
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.wrapKey#KeyWrapAlgorithm-byte
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.wrap-key-Context
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.wrapKey#KeyWrapAlgorithm-byte-Context
byte[] keyContent = new byte[100];
new Random(0x1234567L).nextBytes(keyContent);
KeyWrapResult keyWrapResponse = cryptographyClient.wrapKey(KeyWrapAlgorithm.RSA_OAEP, keyContent);
System.out.printf("Received encypted key of length %d with algorithm %s", keyWrapResponse.encryptedKey().length,
keyWrapResponse.algorithm().toString(), new Context(key1, value1));
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.wrap-key-Context
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.wrapKey#KeyWrapAlgorithm-byte-Context
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.unwrap-key
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.unwrapKey#KeyWrapAlgorithm-byte
KeyUnwrapResult keyUnwrapResult = cryptographyClient.unwrapKey(KeyWrapAlgorithm.RSA_OAEP, encryptedKey);
System.out.printf("Received key of length %d", keyUnwrapResult.key().length);
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.unwrap-key
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.unwrapKey#KeyWrapAlgorithm-byte
- // BEGIN: com.azure.security.keyvault.keys.cryptography.cryptographyclient.unwrap-key-Context
+ // BEGIN: com.azure.security.keyvault.keys.cryptography.CryptographyClient.unwrapKey#KeyWrapAlgorithm-byte-Context
KeyUnwrapResult keyUnwrapResponse = cryptographyClient.unwrapKey(KeyWrapAlgorithm.RSA_OAEP, encryptedKey,
new Context(key2, value2));
System.out.printf("Received key of length %d", keyUnwrapResponse.key().length);
- // END: com.azure.security.keyvault.keys.cryptography.cryptographyclient.unwrap-key-Context
+ // END: com.azure.security.keyvault.keys.cryptography.CryptographyClient.unwrapKey#KeyWrapAlgorithm-byte-Context
}
/**
diff --git a/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretAsyncClient.java b/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretAsyncClient.java
index a571789e07ec..ff6107644914 100644
--- a/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretAsyncClient.java
+++ b/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretAsyncClient.java
@@ -159,8 +159,7 @@ Mono> setSecretWithResponse(String name, String value, Context
/**
* Get the specified secret with specified version from the key vault. The get operation is
- * applicable to any secret stored in Azure Key Vault. This operation requires the {@code
- * secrets/get} permission.
+ * applicable to any secret stored in Azure Key Vault. This operation requires the {@code secrets/get} permission.
*
* Code Samples
* Gets a specific version of the secret in the key vault. Subscribes to the call
@@ -185,8 +184,7 @@ public Mono getSecret(String name, String version) {
/**
* Get the specified secret with specified version from the key vault. The get operation is
- * applicable to any secret stored in Azure Key Vault. This operation requires the {@code
- * secrets/get} permission.
+ * applicable to any secret stored in Azure Key Vault. This operation requires the {@code secrets/get} permission.
*
* Code Samples
* Gets a specific version of the secret in the key vault. Subscribes to the call
diff --git a/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java b/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java
index 86c25a17ba65..7e1805b0dfb0 100644
--- a/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java
+++ b/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java
@@ -175,8 +175,7 @@ public Secret getSecret(String name) {
/**
* Get the specified secret with specified version from the key vault. The get operation is
- * applicable to any secret stored in Azure Key Vault. This operation requires the {@code
- * secrets/get} permission.
+ * applicable to any secret stored in Azure Key Vault. This operation requires the {@code secrets/get} permission.
*
*
Code Samples
* Gets a specific version of the secret in the key vault. Subscribes to the call
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java
index fcf14e937fe0..33df9e4c9371 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java
@@ -1149,7 +1149,7 @@ public Mono getAccountInfo() {
*
* Code Samples
*
- * {@codesnippet com.azure.storage.blob.BlobAsyncClient.getAccountInfo}
+ * {@codesnippet com.azure.storage.blob.BlobAsyncClient.getAccountInfoWithResponse}
*
* For more information, see the
* Azure Docs
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java
index 55b504ef5364..09b9dd0b30cd 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java
@@ -649,7 +649,7 @@ public void setTier(AccessTier tier) {
*
* Code Samples
*
- * {@codesnippet com.azure.storage.blob.BlobClient.setTier#AccessTier-LeaseAccessConditions-Duration-Context}
+ * {@codesnippet com.azure.storage.blob.BlobClient.setTierWithResponse#AccessTier-LeaseAccessConditions-Duration-Context}
*
* For more information, see the
* Azure Docs
diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/SASQueryParameters.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/SASQueryParameters.java
index 139fd8179f93..46573fec9996 100644
--- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/SASQueryParameters.java
+++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/SASQueryParameters.java
@@ -128,8 +128,7 @@ private T getQueryParameter(Map parameters, String name, B
* @param protocol A {@code String} representing the allowed HTTP protocol(s) or {@code null}.
* @param startTime A {@code java.util.Date} representing the start time for this SAS token or {@code null}.
* @param expiryTime A {@code java.util.Date} representing the expiry time for this SAS token.
- * @param ipRange A {@link IPRange} representing the range of valid IP addresses for this SAS token or {@code
- * null}.
+ * @param ipRange A {@link IPRange} representing the range of valid IP addresses for this SAS token or {@code null}.
* @param identifier A {@code String} representing the signed identifier (only for Service SAS) or {@code null}.
* @param resource A {@code String} representing the storage container or blob (only for Service SAS).
* @param permissions A {@code String} representing the storage permissions or {@code null}.
diff --git a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java
index 710e8fd65f53..5df4837bbfa7 100644
--- a/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java
+++ b/sdk/storage/azure-storage-blob/src/samples/java/com/azure/storage/blob/BlobClientJavaDocCodeSnippets.java
@@ -393,12 +393,12 @@ public void createSnapshotWithResponseCodeSnippets() {
* Code snippets for {@link BlobClient#setTierWithResponse(AccessTier, LeaseAccessConditions, Duration, Context)}
*/
public void setTierWithResponseCodeSnippets() {
- // BEGIN: com.azure.storage.blob.BlobClient.setTier#AccessTier-LeaseAccessConditions-Duration-Context
+ // BEGIN: com.azure.storage.blob.BlobClient.setTierWithResponse#AccessTier-LeaseAccessConditions-Duration-Context
LeaseAccessConditions accessConditions = new LeaseAccessConditions().leaseId(leaseId);
System.out.printf("Set tier completed with status code %d%n",
client.setTierWithResponse(AccessTier.HOT, accessConditions, timeout, new Context(key2, value2)).statusCode());
- // END: com.azure.storage.blob.BlobClient.setTier#AccessTier-LeaseAccessConditions-Duration-Context
+ // END: com.azure.storage.blob.BlobClient.setTierWithResponse#AccessTier-LeaseAccessConditions-Duration-Context
}
/**
diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java
index 46ea76e8719e..42fbcce913a7 100644
--- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java
+++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/RequestRetryOptions.java
@@ -37,22 +37,22 @@ public RequestRetryOptions() {
/**
* Configures how the {@link com.azure.core.http.HttpPipeline} should retry requests.
*
- * @param retryPolicyType A {@link RetryPolicyType} specifying the type of retry pattern to use. A value of {@code
- * null} accepts the default.
+ * @param retryPolicyType A {@link RetryPolicyType} specifying the type of retry pattern to use. A value of
+ * {@code null} accepts the default.
* @param maxTries Specifies the maximum number of attempts an operation will be tried before producing an error. A
* value of {@code null} means that you accept our default policy. A value of 1 means 1 try and no retries.
- * @param tryTimeout Indicates the maximum time allowed for any single try of an HTTP request. A value of {@code
- * null} means that you accept our default. NOTE: When transferring large amounts of data, the default TryTimeout
- * will probably not be sufficient. You should override this value based on the bandwidth available to the host
- * machine and proximity to the Storage service. A good starting point may be something like (60 seconds per MB of
- * anticipated-payload-size).
+ * @param tryTimeout Indicates the maximum time allowed for any single try of an HTTP request. A value of
+ * {@code null} means that you accept our default. NOTE: When transferring large amounts of data, the default
+ * TryTimeout will probably not be sufficient. You should override this value based on the bandwidth available to
+ * the host machine and proximity to the Storage service. A good starting point may be something like (60 seconds
+ * per MB of anticipated-payload-size).
* @param retryDelayInMs Specifies the amount of delay to use before retrying an operation. A value of {@code null}
* means you accept the default value. The delay increases (exponentially or linearly) with each retry up to a
* maximum specified by MaxRetryDelay. If you specify {@code null}, then you must also specify {@code null} for
* MaxRetryDelay.
- * @param maxRetryDelayInMs Specifies the maximum delay allowed before retrying an operation. A value of {@code
- * null} means you accept the default value. If you specify {@code null}, then you must also specify {@code null}
- * for RetryDelay.
+ * @param maxRetryDelayInMs Specifies the maximum delay allowed before retrying an operation. A value of
+ * {@code null} means you accept the default value. If you specify {@code null}, then you must also specify
+ * {@code null} for RetryDelay.
* @param secondaryHost If a secondaryHost is specified, retries will be tried against this host. If secondaryHost
* is {@code null} (the default) then operations are not retried against another host. NOTE: Before setting this
* field, make sure you understand the issues around reading stale and potentially-inconsistent data at
diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java
index 782214db2844..d78b89c1d3ea 100644
--- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java
+++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java
@@ -189,7 +189,6 @@ Mono> createWithResponse(Map metadata, C
String filePermission = "inherit";
String fileCreationTime = "now";
String fileLastWriteTime = "now";
-
return azureFileStorageClient.directorys().createWithRestResponseAsync(shareName, directoryPath, fileAttributes, fileCreationTime, fileLastWriteTime, null, metadata, filePermission, null, context)
.map(this::createWithRestResponse);
}
@@ -201,7 +200,7 @@ Mono> createWithResponse(Map metadata, C
*
* Delete the directory
*
- * {@codesnippet com.azure.storage.file.directoryClient.delete}
+ * {@codesnippet com.azure.storage.file.directoryAsyncClient.delete}
*
* For more information, see the
* Azure Docs.
@@ -344,7 +343,7 @@ Mono> setMetadataWithResponse(MapList all sub-directories and files in the account
*
- * {@codesnippet com.azure.storage.file.directoryClient.listFilesAndDirectories}
+ * {@codesnippet com.azure.storage.file.directoryAsyncClient.listFilesAndDirectories}
*
* For more information, see the
* Azure Docs.
diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java
index caf39e2053ff..26c0f9e361d2 100644
--- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java
+++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java
@@ -148,7 +148,7 @@ public void delete() {
*
* Delete the directory
*
- * {@codesnippet com.azure.storage.file.directoryClient.deleteWithResponse}
+ * {@codesnippet com.azure.storage.file.DirectoryClient.deleteWithResponse#Context}
*
* For more information, see the
* Azure Docs.
@@ -239,7 +239,7 @@ public DirectorySetMetadataInfo setMetadata(Map metadata) {
*
* Clear the metadata of the directory
*
- * {@codesnippet com.azure.storage.file.directoryClient.setMetadataWithResponse#map.clearMetadata}
+ * {@codesnippet com.azure.storage.file.DirectoryClient.setMetadataWithResponse#Map-Context.clearMetadata}
*
* For more information, see the
* Azure Docs.
@@ -299,7 +299,7 @@ public Iterable listFilesAndDirectories(String prefix, Integer maxResul
*
* Get 10 handles with recursive call.
*
- * {@codesnippet com.azure.storage.file.directoryClient.listHandles}
+ * {@codesnippet com.azure.storage.file.directoryClient.listHandles#Integer-boolean}
*
* For more information, see the
* Azure Docs.
@@ -489,7 +489,7 @@ public void deleteFile(String fileName) {
*
* Delete the file "filetest"
*
- * {@codesnippet com.azure.storage.file.directoryClient.deleteFile#string}
+ * {@codesnippet com.azure.storage.file.DirectoryClient.deleteFileWithResponse#String-Context}
*
* For more information, see the
* Azure Docs.
diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java
index 02f98692ce4e..fc5c246cea39 100644
--- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java
+++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java
@@ -692,8 +692,7 @@ Mono> uploadWithResponse(Flux data, long le
*
* @param data The data which will upload to the storage file.
* @param length Specifies the number of bytes being transmitted in the request body.
- * @param offset Optional starting point of the upload range. It will start from the beginning if it is {@code
- * null}
+ * @param offset Optional starting point of the upload range. It will start from the beginning if it is {@code null}
* @return The {@link FileUploadInfo file upload info}
* @throws StorageErrorException If you attempt to upload a range that is larger than 4 MB, the service returns status code 413 (Request Entity Too Large)
*/
@@ -763,8 +762,7 @@ public Mono clearRange(long length) {
* Azure Docs.
*
* @param length Specifies the number of bytes being cleared in the request body.
- * @param offset Optional starting point of the upload range. It will start from the beginning if it is {@code
- * null}
+ * @param offset Optional starting point of the upload range. It will start from the beginning if it is {@code null}
* @return A response of {@link FileUploadInfo file upload info} that only contains headers and response status code
*/
public Mono> clearRangeWithResponse(long length, long offset) {
diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java
index 7a77192e082e..5d2fa97b4270 100644
--- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java
+++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java
@@ -429,7 +429,7 @@ public FileMetadataInfo setMetadata(Map metadata) {
*
* Set the metadata to "file:updatedMetadata"
*
- * {@codesnippet com.azure.storage.file.fileClient.setMetadata#map}
+ * {@codesnippet com.azure.storage.file.fileClient.setMetadataWithResponse#map-Context}
*
* Clear the metadata of the file
*
diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java
index 7d92ab78b69f..9b3b0dbb8782 100644
--- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java
+++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java
@@ -261,7 +261,7 @@ public ShareClient createShare(String shareName) {
*
* Create the share "test" with a quota of 10 GB
*
- * {@codesnippet com.azure.storage.file.fileServiceClient.createShareWithResponse#string-map-integer.quota-Context}
+ * {@codesnippet com.azure.storage.file.FileServiceClient.createShareWithResponse#String-Map-Integer-Context}
*
* For more information, see the
* Azure Docs.
diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java
index 20e98bb6e0a9..da746cd44ddc 100644
--- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java
+++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java
@@ -272,7 +272,7 @@ public Mono delete() {
*
* Delete the share
*
- * {@codesnippet com.azure.storage.file.shareAsyncClient.delete}
+ * {@codesnippet com.azure.storage.file.shareAsyncClient.deleteWithResponse}
*
* For more information, see the
* Azure Docs.
@@ -341,7 +341,7 @@ Mono> getPropertiesWithResponse(Context context) {
*
* Set the quota to 1024 GB
*
- * {@codesnippet com.azure.storage.file.shareAsyncClient.setQuota}
+ * {@codesnippet com.azure.storage.file.ShareAsyncClient.setQuota#int}
*
* For more information, see the
* Azure Docs.
@@ -361,7 +361,7 @@ public Mono setQuota(int quotaInGB) {
*
* Set the quota to 1024 GB
*
- * {@codesnippet com.azure.storage.file.shareAsyncClient.setQuotaWithResponse}
+ * {@codesnippet com.azure.storage.file.ShareAsyncClient.setQuotaWithResponse#int}
*
* For more information, see the
* Azure Docs.
@@ -463,7 +463,7 @@ public Flux getAccessPolicy() {
*
* Set a read only stored access policy
*
- * {@codesnippet com.azure.storage.file.shareAsyncClient.setAccessPolicy}
+ * {@codesnippet com.azure.storage.file.ShareAsyncClient.setAccessPolicy#List}
*
* For more information, see the
* Azure Docs.
@@ -484,7 +484,7 @@ public Mono setAccessPolicy(List permissions) {
*
* Set a read only stored access policy
*
- * {@codesnippet com.azure.storage.file.shareAsyncClient.setAccessPolicyWithResponse}
+ * {@codesnippet com.azure.storage.file.ShareAsyncClient.setAccessPolicyWithResponse#List}
*
* For more information, see the
* Azure Docs.
diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java
index ff76e5cc73b6..5c7156fe7061 100644
--- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java
+++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java
@@ -116,11 +116,11 @@ public ShareInfo create() {
*
* Create the share with metadata "share:metadata"
*
- * {@codesnippet com.azure.storage.file.shareClient.createWithResponse#map-integer.metadata}
+ * {@codesnippet com.azure.storage.file.ShareClient.createWithResponse#Map-Integer-Context.metadata}
*
* Create the share with a quota of 10 GB
*
- * {@codesnippet com.azure.storage.file.shareClient.createWithResponse#map-integer.quota}
+ * {@codesnippet com.azure.storage.file.ShareClient.createWithResponse#Map-Integer-Context.quota}
*
* For more information, see the
* Azure Docs.
@@ -266,7 +266,7 @@ public Response getPropertiesWithResponse(Context context) {
*
* Set the quota to 1024 GB
*
- * {@codesnippet com.azure.storage.file.shareClient.setQuota}
+ * {@codesnippet com.azure.storage.file.ShareClient.setQuota#int}
*
* For more information, see the
* Azure Docs.
@@ -375,7 +375,7 @@ public Iterable getAccessPolicy() {
*
* Set a read only stored access policy
*
- * {@codesnippet com.azure.storage.file.shareClient.setAccessPolicy}
+ * {@codesnippet com.azure.storage.file.ShareClient.setAccessPolicy#List}
*
* For more information, see the
* Azure Docs.
diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryJavaDocCodeSamples.java
index a41dea8e8058..2f46ad28709c 100644
--- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryJavaDocCodeSamples.java
+++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/DirectoryJavaDocCodeSamples.java
@@ -188,10 +188,10 @@ public void listDirectoriesAndFilesMaxOverload() {
*/
public void deleteFile() {
DirectoryClient directoryClient = createClientWithSASToken();
- // BEGIN: com.azure.storage.file.directoryClient.deleteFile#string
+ // BEGIN: com.azure.storage.file.DirectoryClient.deleteFileWithResponse#String-Context
directoryClient.deleteFile("myfile");
System.out.println("Completed deleting the file.");
- // END: com.azure.storage.file.directoryClient.deleteFile#string
+ // END: com.azure.storage.file.DirectoryClient.deleteFileWithResponse#String-Context
}
/**
@@ -244,10 +244,10 @@ public void deleteDirectory() {
*/
public void deleteWithResponse() {
DirectoryClient directoryClient = createClientWithSASToken();
- // BEGIN: com.azure.storage.file.directoryClient.deleteWithResponse
+ // BEGIN: com.azure.storage.file.DirectoryClient.deleteWithResponse#Context
VoidResponse response = directoryClient.deleteWithResponse(new Context(key1, value1));
System.out.println("Completed deleting the file with status code: " + response.statusCode());
- // END: com.azure.storage.file.directoryClient.deleteWithResponse
+ // END: com.azure.storage.file.DirectoryClient.deleteWithResponse#Context
}
/**
@@ -313,11 +313,11 @@ public void clearSetMetadata() {
*/
public void clearMetadata() {
DirectoryClient directoryClient = createClientWithSASToken();
- // BEGIN: com.azure.storage.file.directoryClient.setMetadataWithResponse#map.clearMetadata
+ // BEGIN: com.azure.storage.file.DirectoryClient.setMetadataWithResponse#Map-Context.clearMetadata
Response response = directoryClient.setMetadataWithResponse(null,
new Context(key1, value1));
System.out.printf("Directory latest modified date is %s.", response.statusCode());
- // END: com.azure.storage.file.directoryClient.setMetadataWithResponse#map.clearMetadata
+ // END: com.azure.storage.file.DirectoryClient.setMetadataWithResponse#Map-Context.clearMetadata
}
/**
@@ -325,10 +325,10 @@ public void clearMetadata() {
*/
public void listHandles() {
DirectoryClient directoryClient = createClientWithSASToken();
- // BEGIN: com.azure.storage.file.directoryClient.listHandles
+ // BEGIN: com.azure.storage.file.directoryClient.listHandles#Integer-boolean
Iterable result = directoryClient.listHandles(10, true);
System.out.printf("Get handles completed with handle id %s", result.iterator().next().handleId());
- // END: com.azure.storage.file.directoryClient.listHandles
+ // END: com.azure.storage.file.directoryClient.listHandles#Integer-boolean
}
/**
@@ -345,8 +345,6 @@ public void forceCloseHandles() {
// END: com.azure.storage.file.directoryClient.forceCloseHandles
}
-
-
/**
* Generates a code sample for using {@link DirectoryClient#getShareSnapshotId()}
*/
diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceJavaDocCodeSamples.java
index 27e7e5a13c90..acac6a361c2f 100644
--- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceJavaDocCodeSamples.java
+++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/FileServiceJavaDocCodeSamples.java
@@ -107,11 +107,11 @@ public void createShare() {
*/
public void createShareWithMetadata() {
FileServiceClient fileServiceClient = createClientWithSASToken();
- // BEGIN: com.azure.storage.file.fileServiceClient.createShareWithResponse#string-map-integer.quota-Context
+ // BEGIN: com.azure.storage.file.FileServiceClient.createShareWithResponse#String-Map-Integer-Context
Response response = fileServiceClient.createShareWithResponse("test",
Collections.singletonMap("share", "metadata"), null, new Context(key1, value1));
System.out.printf("Creating the share completed with status code %d", response.statusCode());
- // END: com.azure.storage.file.fileServiceClient.createShareWithResponse#string-map-integer.quota-Context
+ // END: com.azure.storage.file.FileServiceClient.createShareWithResponse#String-Map-Integer-Context
}
/**
diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java
index c089ec60078a..fc38bde290aa 100644
--- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java
+++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareAsyncJavaDocCodeSamples.java
@@ -304,11 +304,11 @@ public void getPropertiesWithResponse() {
*/
public void setQuotaAsync() {
ShareAsyncClient shareAsyncClient = createAsyncClientWithSASToken();
- // BEGIN: com.azure.storage.file.shareAsyncClient.setQuota
+ // BEGIN: com.azure.storage.file.ShareAsyncClient.setQuota#int
shareAsyncClient.setQuota(1024).doOnSuccess(response ->
System.out.println("Setting the share quota completed.")
);
- // END: com.azure.storage.file.shareAsyncClient.setQuota
+ // END: com.azure.storage.file.ShareAsyncClient.setQuota#int
}
/**
@@ -316,12 +316,12 @@ public void setQuotaAsync() {
*/
public void setQuotaWithResponse() {
ShareAsyncClient shareAsyncClient = createAsyncClientWithSASToken();
- // BEGIN: com.azure.storage.file.shareAsyncClient.setQuotaWithResponse
+ // BEGIN: com.azure.storage.file.ShareAsyncClient.setQuotaWithResponse#int
shareAsyncClient.setQuotaWithResponse(1024)
.subscribe(response ->
System.out.printf("Setting the share quota completed with status code %d", response.statusCode())
);
- // END: com.azure.storage.file.shareAsyncClient.setQuotaWithResponse
+ // END: com.azure.storage.file.ShareAsyncClient.setQuotaWithResponse#int
}
@@ -380,7 +380,7 @@ public void getAccessPolicyAsync() {
*/
public void setAccessPolicyAsync() {
ShareAsyncClient shareAsyncClient = createAsyncClientWithSASToken();
- // BEGIN: com.azure.storage.file.shareAsyncClient.setAccessPolicy
+ // BEGIN: com.azure.storage.file.ShareAsyncClient.setAccessPolicy#List
AccessPolicy accessPolicy = new AccessPolicy().permission("r")
.start(OffsetDateTime.now(ZoneOffset.UTC))
.expiry(OffsetDateTime.now(ZoneOffset.UTC).plusDays(10));
@@ -388,7 +388,7 @@ public void setAccessPolicyAsync() {
SignedIdentifier permission = new SignedIdentifier().id("mypolicy").accessPolicy(accessPolicy);
shareAsyncClient.setAccessPolicy(Collections.singletonList(permission)).doOnSuccess(
response -> System.out.println("Setting access policies completed."));
- // END: com.azure.storage.file.shareAsyncClient.setAccessPolicy
+ // END: com.azure.storage.file.ShareAsyncClient.setAccessPolicy#List
}
/**
@@ -396,7 +396,7 @@ public void setAccessPolicyAsync() {
*/
public void setAccessPolicyWithResponse() {
ShareAsyncClient shareAsyncClient = createAsyncClientWithSASToken();
- // BEGIN: com.azure.storage.file.shareAsyncClient.setAccessPolicyWithResponse
+ // BEGIN: com.azure.storage.file.ShareAsyncClient.setAccessPolicyWithResponse#List
AccessPolicy accessPolicy = new AccessPolicy().permission("r")
.start(OffsetDateTime.now(ZoneOffset.UTC))
.expiry(OffsetDateTime.now(ZoneOffset.UTC).plusDays(10));
@@ -405,7 +405,7 @@ public void setAccessPolicyWithResponse() {
shareAsyncClient.setAccessPolicyWithResponse(Collections.singletonList(permission))
.subscribe(response -> System.out.printf("Setting access policies completed completed with status code %d",
response.statusCode()));
- // END: com.azure.storage.file.shareAsyncClient.setAccessPolicyWithResponse
+ // END: com.azure.storage.file.ShareAsyncClient.setAccessPolicyWithResponse#List
}
/**
diff --git a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java
index 9c8fd1c821ce..5ee0f9ae1549 100644
--- a/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java
+++ b/sdk/storage/azure-storage-file/src/samples/java/com/azure/storage/file/ShareJavaDocCodeSamples.java
@@ -116,10 +116,10 @@ public void createShareMaxOverloadMetadata() {
*/
public void createWithResponse() {
ShareClient shareClient = createClientWithSASToken();
- // BEGIN: com.azure.storage.file.shareClient.createWithResponse#map-integer.quota
+ // BEGIN: com.azure.storage.file.ShareClient.createWithResponse#Map-Integer-Context.quota
Response response = shareClient.createWithResponse(null, 10, new Context(key1, value1));
System.out.println("Complete creating the shares with status code: " + response.statusCode());
- // END: com.azure.storage.file.shareClient.createWithResponse#map-integer.quota
+ // END: com.azure.storage.file.ShareClient.createWithResponse#Map-Integer-Context.quota
}
/**
@@ -127,11 +127,11 @@ public void createWithResponse() {
*/
public void createWithResponseMetadata() {
ShareClient shareClient = createClientWithSASToken();
- // BEGIN: com.azure.storage.file.shareClient.createWithResponse#map-integer.metadata
+ // BEGIN: com.azure.storage.file.ShareClient.createWithResponse#Map-Integer-Context.metadata
Response response = shareClient.createWithResponse(Collections.singletonMap("share", "metadata"), null,
new Context(key1, value1));
System.out.println("Complete creating the shares with status code: " + response.statusCode());
- // END: com.azure.storage.file.shareClient.createWithResponse#map-integer.metadata
+ // END: com.azure.storage.file.ShareClient.createWithResponse#Map-Integer-Context.metadata
}
/**
@@ -297,9 +297,9 @@ public void getPropertiesWithResponse() {
*/
public void setQuota() {
ShareClient shareClient = createClientWithSASToken();
- // BEGIN: com.azure.storage.file.shareClient.setQuota
+ // BEGIN: com.azure.storage.file.ShareClient.setQuota#int
System.out.println("Setting the share quota completed." + shareClient.setQuota(1024));
- // END: com.azure.storage.file.shareClient.setQuota
+ // END: com.azure.storage.file.ShareClient.setQuota#int
}
/**
@@ -367,7 +367,7 @@ public void getAccessPolicy() {
*/
public void setAccessPolicy() {
ShareClient shareClient = createClientWithSASToken();
- // BEGIN: com.azure.storage.file.shareClient.setAccessPolicy
+ // BEGIN: com.azure.storage.file.ShareClient.setAccessPolicy#List
AccessPolicy accessPolicy = new AccessPolicy().permission("r")
.start(OffsetDateTime.now(ZoneOffset.UTC))
.expiry(OffsetDateTime.now(ZoneOffset.UTC).plusDays(10));
@@ -376,7 +376,7 @@ public void setAccessPolicy() {
shareClient.setAccessPolicy(Collections.singletonList(permission));
System.out.println("Setting access policies completed.");
- // END: com.azure.storage.file.shareClient.setAccessPolicy
+ // END: com.azure.storage.file.ShareClient.setAccessPolicy#List
}
/**
diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java
index 1caba2c43780..b27ff642fa17 100644
--- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java
+++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueAsyncClient.java
@@ -321,7 +321,7 @@ public Flux getAccessPolicy() {
*
* Set a read only stored access policy
*
- * {@codesnippet com.azure.storage.queue.queueAsyncClient.setAccessPolicy}
+ * {@codesnippet com.azure.storage.queue.QueueAsyncClient.setAccessPolicy#List}
*
* For more information, see the
* Azure Docs.
@@ -342,7 +342,7 @@ public Mono setAccessPolicy(List permissions) {
*
* Set a read only stored access policy
*
- * {@codesnippet com.azure.storage.queue.queueAsyncClient.setAccessPolicyWithResponse}
+ * {@codesnippet com.azure.storage.queue.QueueAsyncClient.setAccessPolicyWithResponse#List}
*
* For more information, see the
* Azure Docs.
@@ -437,7 +437,7 @@ public Mono enqueueMessage(String messageText) {
*
* Add a message of "Goodbye, Azure" that has a time to live of 5 seconds
*
- * {@codesnippet com.azure.storage.queue.queueAsyncClient.enqueueMessageWithResponseLiveTime#string-duration-duration}
+ * {@codesnippet com.azure.storage.queue.QueueAsyncClient.enqueueMessageWithResponse-liveTime#String-Duration-Duration}
*
* For more information, see the
* Azure Docs.
@@ -597,7 +597,7 @@ public Flux peekMessages(Integer maxMessages) {
*
* Dequeue the first message and update it to "Hello again, Azure" and hide it for 5 seconds
*
- * {@codesnippet com.azure.storage.queue.queueAsyncClient.updateMessage}
+ * {@codesnippet com.azure.storage.queue.QueueAsyncClient.updateMessage#String-String-String-Duration}
*
* For more information, see the
* Azure Docs.
@@ -623,7 +623,7 @@ public Mono updateMessage(String messageText, String messageId,
*
* Dequeue the first message and update it to "Hello again, Azure" and hide it for 5 seconds
*
- * {@codesnippet com.azure.storage.queue.queueAsyncClient.updateMessageWithResponse}
+ * {@codesnippet com.azure.storage.queue.QueueAsyncClient.updateMessageWithResponse#String-String-String-Duration}
*
* For more information, see the
* Azure Docs.
@@ -655,7 +655,7 @@ Mono> updateMessageWithResponse(String messageText, Str
*
* Delete the first message
*
- * {@codesnippet com.azure.storage.queue.queueAsyncClient.deleteMessage}
+ * {@codesnippet com.azure.storage.queue.QueueAsyncClient.deleteMessage#String-String}
*
* For more information, see the
* Azure Docs.
@@ -676,7 +676,7 @@ public Mono deleteMessage(String messageId, String popReceipt) {
*
* Delete the first message
*
- * {@codesnippet com.azure.storage.queue.queueAsyncClient.deleteMessageWithResponse}
+ * {@codesnippet com.azure.storage.queue.QueueAsyncClient.deleteMessageWithResponse#String-String}
*
* For more information, see the
* Azure Docs.
diff --git a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java
index 575113755d43..865be06f413f 100644
--- a/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java
+++ b/sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/QueueClient.java
@@ -252,7 +252,7 @@ public Iterable getAccessPolicy() {
*
* Set a read only stored access policy
*
- * {@codesnippet com.azure.storage.queue.queueClient.setAccessPolicy}
+ * {@codesnippet com.azure.storage.queue.QueueClient.setAccessPolicy#List}
*
* For more information, see the
* Azure Docs.
@@ -358,7 +358,7 @@ public EnqueuedMessage enqueueMessage(String messageText) {
*
* Add a message of "Goodbye, Azure" that has a time to live of 5 seconds
*
- * {@codesnippet com.azure.storage.queue.queueClient.enqueueMessageWithResponseLiveTime#string-duration-duration-Context}
+ * {@codesnippet com.azure.storage.queue.QueueClient.enqueueMessageWithResponse-liveTime#String-Duration-Duration-Context}
*
* For more information, see the
* Azure Docs.
@@ -507,7 +507,7 @@ public Iterable peekMessages(Integer maxMessages) {
*
* Dequeue the first message and update it to "Hello again, Azure" and hide it for 5 seconds
*
- * {@codesnippet com.azure.storage.queue.queueClient.updateMessage}
+ * {@codesnippet com.azure.storage.queue.QueueClient.updateMessage#String-String-String-Duration}
*
* For more information, see the
* Azure Docs.
@@ -533,7 +533,7 @@ public UpdatedMessage updateMessage(String messageText, String messageId, String
*
* Dequeue the first message and update it to "Hello again, Azure" and hide it for 5 seconds
*
- * {@codesnippet com.azure.storage.queue.queueClient.updateMessageWithResponse}
+ * {@codesnippet com.azure.storage.queue.QueueClient.updateMessageWithResponse#String-String-String-Duration-Context}
*
* For more information, see the
* Azure Docs.
@@ -560,7 +560,7 @@ public Response updateMessageWithResponse(String messageText, St
*
* Delete the first message
*
- * {@codesnippet com.azure.storage.queue.queueClient.deleteMessage}
+ * {@codesnippet com.azure.storage.queue.QueueClient.deleteMessage#String-String}
*
* For more information, see the
* Azure Docs.
@@ -580,7 +580,7 @@ public void deleteMessage(String messageId, String popReceipt) {
*
* Delete the first message
*
- * {@codesnippet com.azure.storage.queue.queueClient.deleteMessageWithResponse#Context}
+ * {@codesnippet com.azure.storage.queue.QueueClient.deleteMessageWithResponse#String-String-Context}
*
* For more information, see the
* Azure Docs.
diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java
index 89a44e0d1535..8a216a555f8e 100644
--- a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java
+++ b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueAsyncJavaDocCodeSamples.java
@@ -155,7 +155,7 @@ public void enqueueMessageAsyncWithTimeoutOverload() {
*/
public void enqueueMessageAsyncWithLiveTimeOverload() {
QueueAsyncClient queueAsyncClient = createAsyncClientWithSASToken();
- // BEGIN: com.azure.storage.queue.queueAsyncClient.enqueueMessageWithResponseLiveTime#string-duration-duration
+ // BEGIN: com.azure.storage.queue.QueueAsyncClient.enqueueMessageWithResponse-liveTime#String-Duration-Duration
queueAsyncClient.enqueueMessageWithResponse("Goodbye, Azure",
null, Duration.ofSeconds(5)).subscribe(
response -> System.out.printf("Message %s expires at %s", response.value().messageId(),
@@ -163,7 +163,7 @@ public void enqueueMessageAsyncWithLiveTimeOverload() {
error -> System.err.print(error.toString()),
() -> System.out.println("Complete enqueuing the message!")
);
- // END: com.azure.storage.queue.queueAsyncClient.enqueueMessageWithResponseLiveTime#string-duration-duration
+ // END: com.azure.storage.queue.QueueAsyncClient.enqueueMessageWithResponse-liveTime#String-Duration-Duration
}
/**
@@ -246,7 +246,7 @@ public void peekMessageAsyncMaxOverload() {
*/
public void updateMessageAsync() {
QueueAsyncClient queueAsyncClient = createAsyncClientWithSASToken();
- // BEGIN: com.azure.storage.queue.queueAsyncClient.updateMessage
+ // BEGIN: com.azure.storage.queue.QueueAsyncClient.updateMessage#String-String-String-Duration
queueAsyncClient.dequeueMessages().subscribe(
dequeuedMessage -> {
queueAsyncClient.updateMessage("newText", dequeuedMessage.messageId(),
@@ -259,7 +259,7 @@ public void updateMessageAsync() {
dequeueError -> System.err.print(dequeueError.toString()),
() -> System.out.println("Complete dequeueing the message!")
);
- // END: com.azure.storage.queue.queueAsyncClient.updateMessage
+ // END: com.azure.storage.queue.QueueAsyncClient.updateMessage#String-String-String-Duration
}
/**
@@ -267,7 +267,7 @@ public void updateMessageAsync() {
*/
public void updateMessageWithResponse() {
QueueAsyncClient queueAsyncClient = createAsyncClientWithSASToken();
- // BEGIN: com.azure.storage.queue.queueAsyncClient.updateMessageWithResponse
+ // BEGIN: com.azure.storage.queue.QueueAsyncClient.updateMessageWithResponse#String-String-String-Duration
queueAsyncClient.dequeueMessages().subscribe(
dequeuedMessage -> {
queueAsyncClient.updateMessageWithResponse("newText", dequeuedMessage.messageId(),
@@ -281,7 +281,7 @@ public void updateMessageWithResponse() {
dequeueError -> System.err.print(dequeueError.toString()),
() -> System.out.println("Complete dequeueing the message!")
);
- // END: com.azure.storage.queue.queueAsyncClient.updateMessageWithResponse
+ // END: com.azure.storage.queue.QueueAsyncClient.updateMessageWithResponse#String-String-String-Duration
}
/**
@@ -289,7 +289,7 @@ public void updateMessageWithResponse() {
*/
public void deleteMessageAsync() {
QueueAsyncClient queueAsyncClient = createAsyncClientWithSASToken();
- // BEGIN: com.azure.storage.queue.queueAsyncClient.deleteMessage
+ // BEGIN: com.azure.storage.queue.QueueAsyncClient.deleteMessage#String-String
queueAsyncClient.dequeueMessages().subscribe(
dequeuedMessage -> {
queueAsyncClient.deleteMessage(dequeuedMessage.messageId(), dequeuedMessage.popReceipt()).subscribe(
@@ -301,7 +301,7 @@ public void deleteMessageAsync() {
dequeueError -> System.err.print(dequeueError.toString()),
() -> System.out.println("Complete dequeueing the message!")
);
- // END: com.azure.storage.queue.queueAsyncClient.deleteMessage
+ // END: com.azure.storage.queue.QueueAsyncClient.deleteMessage#String-String
}
/**
@@ -309,7 +309,7 @@ public void deleteMessageAsync() {
*/
public void deleteMessageWithResponse() {
QueueAsyncClient queueAsyncClient = createAsyncClientWithSASToken();
- // BEGIN: com.azure.storage.queue.queueAsyncClient.deleteMessageWithResponse
+ // BEGIN: com.azure.storage.queue.QueueAsyncClient.deleteMessageWithResponse#String-String
queueAsyncClient.dequeueMessages().subscribe(
dequeuedMessage -> {
queueAsyncClient.deleteMessageWithResponse(dequeuedMessage.messageId(), dequeuedMessage.popReceipt()).subscribe(
@@ -321,7 +321,7 @@ public void deleteMessageWithResponse() {
dequeueError -> System.err.print(dequeueError.toString()),
() -> System.out.println("Complete dequeueing the message!")
);
- // END: com.azure.storage.queue.queueAsyncClient.deleteMessageWithResponse
+ // END: com.azure.storage.queue.QueueAsyncClient.deleteMessageWithResponse#String-String
}
/**
@@ -440,7 +440,7 @@ public void getAccessPolicyAsync() {
*/
public void setAccessPolicyWithResponse() {
QueueAsyncClient queueAsyncClient = createAsyncClientWithSASToken();
- // BEGIN: com.azure.storage.queue.queueAsyncClient.setAccessPolicyWithResponse
+ // BEGIN: com.azure.storage.queue.QueueAsyncClient.setAccessPolicyWithResponse#List
AccessPolicy accessPolicy = new AccessPolicy().permission("r")
.start(OffsetDateTime.now(ZoneOffset.UTC))
.expiry(OffsetDateTime.now(ZoneOffset.UTC).plusDays(10));
@@ -449,7 +449,7 @@ public void setAccessPolicyWithResponse() {
queueAsyncClient.setAccessPolicyWithResponse(Collections.singletonList(permission))
.subscribe(response -> System.out.printf("Setting access policies completed with status code %d",
response.statusCode()));
- // END: com.azure.storage.queue.queueAsyncClient.setAccessPolicyWithResponse
+ // END: com.azure.storage.queue.QueueAsyncClient.setAccessPolicyWithResponse#List
}
/**
@@ -457,7 +457,7 @@ public void setAccessPolicyWithResponse() {
*/
public void setAccessPolicyAsync() {
QueueAsyncClient queueAsyncClient = createAsyncClientWithSASToken();
- // BEGIN: com.azure.storage.queue.queueAsyncClient.setAccessPolicy
+ // BEGIN: com.azure.storage.queue.QueueAsyncClient.setAccessPolicy#List
AccessPolicy accessPolicy = new AccessPolicy().permission("r")
.start(OffsetDateTime.now(ZoneOffset.UTC))
.expiry(OffsetDateTime.now(ZoneOffset.UTC).plusDays(10));
@@ -465,7 +465,7 @@ public void setAccessPolicyAsync() {
SignedIdentifier permission = new SignedIdentifier().id("mypolicy").accessPolicy(accessPolicy);
queueAsyncClient.setAccessPolicy(Collections.singletonList(permission))
.subscribe(response -> System.out.printf("Setting access policies completed."));
- // END: com.azure.storage.queue.queueAsyncClient.setAccessPolicy
+ // END: com.azure.storage.queue.QueueAsyncClient.setAccessPolicy#List
}
/**
diff --git a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java
index 1bf8f43b6352..1f3daec0921d 100644
--- a/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java
+++ b/sdk/storage/azure-storage-queue/src/samples/java/com/azure/storage/queue/QueueJavaDocCodeSamples.java
@@ -136,11 +136,11 @@ public void enqueueMessageWithTimeoutOverload() {
*/
public void enqueueMessageWithLiveTimeOverload() {
QueueClient queueClient = createClientWithSASToken();
- // BEGIN: com.azure.storage.queue.queueClient.enqueueMessageWithResponseLiveTime#string-duration-duration-Context
+ // BEGIN: com.azure.storage.queue.QueueClient.enqueueMessageWithResponse-liveTime#String-Duration-Duration-Context
EnqueuedMessage enqueuedMessage = queueClient.enqueueMessageWithResponse("Goodbye, Azure",
null, Duration.ofSeconds(5), new Context(key1, value1)).value();
System.out.printf("Message %s expires at %s", enqueuedMessage.messageId(), enqueuedMessage.expirationTime());
- // END: com.azure.storage.queue.queueClient.enqueueMessageWithResponseLiveTime#string-duration-duration-Context
+ // END: com.azure.storage.queue.QueueClient.enqueueMessageWithResponse-liveTime#String-Duration-Duration-Context
}
/**
@@ -215,7 +215,7 @@ public void peekMessageMaxOverload() {
*/
public void updateMessage() {
QueueClient queueClient = createClientWithSASToken();
- // BEGIN: com.azure.storage.queue.queueClient.updateMessage
+ // BEGIN: com.azure.storage.queue.QueueClient.updateMessage#String-String-String-Duration
queueClient.dequeueMessages().forEach(
dequeuedMessage -> {
UpdatedMessage response = queueClient.updateMessage("newText",
@@ -223,7 +223,7 @@ public void updateMessage() {
System.out.println("Complete updating the message.");
}
);
- // END: com.azure.storage.queue.queueClient.updateMessage
+ // END: com.azure.storage.queue.QueueClient.updateMessage#String-String-String-Duration
}
/**
@@ -231,7 +231,7 @@ public void updateMessage() {
*/
public void updateMessageWithResponse() {
QueueClient queueClient = createClientWithSASToken();
- // BEGIN: com.azure.storage.queue.queueClient.updateMessageWithResponse
+ // BEGIN: com.azure.storage.queue.QueueClient.updateMessageWithResponse#String-String-String-Duration-Context
queueClient.dequeueMessages().forEach(
dequeuedMessage -> {
Response response = queueClient.updateMessageWithResponse("newText",
@@ -240,7 +240,7 @@ public void updateMessageWithResponse() {
System.out.println("Complete updating the message with status code " + response.statusCode());
}
);
- // END: com.azure.storage.queue.queueClient.updateMessageWithResponse
+ // END: com.azure.storage.queue.QueueClient.updateMessageWithResponse#String-String-String-Duration-Context
}
/**
@@ -248,14 +248,14 @@ public void updateMessageWithResponse() {
*/
public void deleteMessage() {
QueueClient queueClient = createClientWithSASToken();
- // BEGIN: com.azure.storage.queue.queueClient.deleteMessage
+ // BEGIN: com.azure.storage.queue.QueueClient.deleteMessage#String-String
queueClient.dequeueMessages().forEach(
dequeuedMessage -> {
queueClient.deleteMessage(dequeuedMessage.messageId(), dequeuedMessage.popReceipt());
System.out.println("Complete deleting the message.");
}
);
- // END: com.azure.storage.queue.queueClient.deleteMessage
+ // END: com.azure.storage.queue.QueueClient.deleteMessage#String-String
}
/**
@@ -263,7 +263,7 @@ public void deleteMessage() {
*/
public void deleteMessageWithResponse() {
QueueClient queueClient = createClientWithSASToken();
- // BEGIN: com.azure.storage.queue.queueClient.deleteMessageWithResponse#Context
+ // BEGIN: com.azure.storage.queue.QueueClient.deleteMessageWithResponse#String-String-Context
queueClient.dequeueMessages().forEach(
dequeuedMessage -> {
VoidResponse response = queueClient.deleteMessageWithResponse(dequeuedMessage.messageId(),
@@ -271,7 +271,7 @@ public void deleteMessageWithResponse() {
System.out.println("Complete deleting the message with status code " + response.statusCode());
}
);
- // END: com.azure.storage.queue.queueClient.deleteMessageWithResponse#Context
+ // END: com.azure.storage.queue.QueueClient.deleteMessageWithResponse#String-String-Context
}
/**
@@ -382,14 +382,14 @@ public void getAccessPolicy() {
*/
public void setAccessPolicy() {
QueueClient queueClient = createClientWithSASToken();
- // BEGIN: com.azure.storage.queue.queueClient.setAccessPolicy
+ // BEGIN: com.azure.storage.queue.QueueClient.setAccessPolicy#List
AccessPolicy accessPolicy = new AccessPolicy().permission("r")
.start(OffsetDateTime.now(ZoneOffset.UTC))
.expiry(OffsetDateTime.now(ZoneOffset.UTC).plusDays(10));
SignedIdentifier permission = new SignedIdentifier().id("mypolicy").accessPolicy(accessPolicy);
queueClient.setAccessPolicy(Collections.singletonList(permission));
System.out.printf("Setting access policies completed.");
- // END: com.azure.storage.queue.queueClient.setAccessPolicy
+ // END: com.azure.storage.queue.QueueClient.setAccessPolicy#List
}
/**