diff --git a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml index e3ee998e78e29..6cfdbbd519233 100755 --- a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml +++ b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml @@ -116,8 +116,8 @@ + https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/BatchOptions.java#L50 + https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/BatchOptions.java#L57 --> @@ -125,16 +125,16 @@ + https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/MessageReceiver.java#L247 + https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/MessageReceiver.java#L251 + https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/MessagingFactory.java#L146 --> + https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/EventHubRuntimeInformation.java#L62 --> @@ -143,7 +143,7 @@ + https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/EventHubRuntimeInformation.java#L27 --> @@ -151,7 +151,7 @@ + https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/EventHubClientImpl.java#L41 --> @@ -159,7 +159,7 @@ + https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/EventHubClientImpl.java#L47 --> @@ -167,7 +167,7 @@ + https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/ReplayableWorkItem.java#L35 --> @@ -175,8 +175,8 @@ + https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/FaultTolerantObject.java#L80 + https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/FaultTolerantObject.java#L123 --> @@ -184,8 +184,8 @@ + https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/EventDataImpl.java#L150 + https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/PartitionReceiverImpl.java#L278 --> @@ -193,7 +193,7 @@ + https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/microsoft-azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/impl/ConnectionHandler.java#L88 --> @@ -511,9 +511,7 @@ - - - + diff --git a/eng/spotbugs-aggregate-report/pom.xml b/eng/spotbugs-aggregate-report/pom.xml index cba0749eeef85..0f5b722b2db4a 100644 --- a/eng/spotbugs-aggregate-report/pom.xml +++ b/eng/spotbugs-aggregate-report/pom.xml @@ -56,11 +56,11 @@ ..\..\sdk\appconfiguration\azure-data-appconfiguration\src\main\java ..\..\sdk\appconfiguration\azure-data-appconfiguration\src\samples\java - ..\..\core\azure-core\src\main\java - ..\..\core\azure-core\src\samples\java - ..\..\core\azure-core-amqp\src\main\java - ..\..\core\azure-core-management\src\main\java - ..\..\core\azure-core-test\src\main\java + ..\..\sdk\core\azure-core\src\main\java + ..\..\sdk\core\azure-core\src\samples\java + ..\..\sdk\core\azure-core-amqp\src\main\java + ..\..\sdk\core\azure-core-management\src\main\java + ..\..\sdk\core\azure-core-test\src\main\java ..\..\sdk\eventhubs\azure-messaging-eventhubs\src\main\java ..\..\sdk\eventhubs\azure-messaging-eventhubs\src\samples\java ..\..\sdk\identity\azure-identity\src\main\java @@ -99,8 +99,9 @@ ..\..\sdk\eventhubs\microsoft-azure-eventhubs-eph\src\main\java ..\..\sdk\eventhubs\microsoft-azure-eventhubs-extensions\src\main\java - + dependency in eventhubs code. This issue is under investigation. + Issue Link: https://github.com/Azure/azure-sdk-for-java/issues/3096 --> + ..\..\sdk\keyvault\microsoft-azure-keyvault\src\main\java ..\..\sdk\keyvault\microsoft-azure-keyvault-cryptography\src\main\java ..\..\sdk\keyvault\microsoft-azure-keyvault-core\src\main\java diff --git a/pom.client.xml b/pom.client.xml index 9435413e1a7bb..f47444c872289 100644 --- a/pom.client.xml +++ b/pom.client.xml @@ -541,13 +541,13 @@ So, path for aggregate reports have to be defined relative to parent pom --> -maxLineLength 120 -snippetpath ${project.basedir}/sdk/appconfiguration/azure-data-appconfiguration/src/samples/java - -snippetpath ${project.basedir}/core/azure-core/src/samples/java + -snippetpath ${project.basedir}/sdk/core/azure-core/src/samples/java -snippetpath ${project.basedir}/sdk/eventhubs/azure-messaging-eventhubs/src/samples/java -snippetpath ${project.basedir}/sdk/keyvault/azure-keyvault-keys/src/samples/java -snippetpath ${project.basedir}/sdk/keyvault/azure-keyvault-secrets/src/samples/java - -snippetpath ${project.basedir}/storage/client/blob/src/samples/java - -snippetpath ${project.basedir}/storage/client/file/src/samples/java - -snippetpath ${project.basedir}/storage/client/queue/src/samples/java + -snippetpath ${project.basedir}/sdk/storage/azure-storage-blob/src/samples/java + -snippetpath ${project.basedir}/sdk/storage/azure-storage-file/src/samples/java + -snippetpath ${project.basedir}/sdk/storage/azure-storage-queue/src/samples/java diff --git a/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/IterableResponseJavaDocCodeSnippets.java b/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/IterableResponseJavaDocCodeSnippets.java index 1be07c3fba249..9ccdd4157ed4a 100644 --- a/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/IterableResponseJavaDocCodeSnippets.java +++ b/sdk/core/azure-core/src/samples/java/com/azure/core/http/rest/IterableResponseJavaDocCodeSnippets.java @@ -40,9 +40,9 @@ public void streamSnippet() throws MalformedURLException { // process the stream myIterableResponse.stream().forEach(resp -> { if (resp.statusCode() == HttpURLConnection.HTTP_OK) { - System.out.printf("Response headers are %s. Url %s \n", resp.deserializedHeaders(), resp.request().url()); + System.out.printf("Response headers are %s. Url %s%n", resp.deserializedHeaders(), resp.request().url()); resp.items().forEach(value -> { - System.out.printf("Response value is %d \n", value); + System.out.printf("Response value is %d%n", value); }); } }); @@ -69,9 +69,9 @@ public void iteratorwhileSnippet() throws MalformedURLException { while (ite.hasNext()) { PagedResponseBase resp = ite.next(); if (resp.statusCode() == HttpURLConnection.HTTP_OK) { - System.out.printf("Response headers are %s. Url %s \n", resp.deserializedHeaders(), resp.request().url()); + System.out.printf("Response headers are %s. Url %s%n", resp.deserializedHeaders(), resp.request().url()); resp.items().forEach(value -> { - System.out.printf("Response value is %d \n", value); + System.out.printf("Response value is %d%n", value); }); } } @@ -97,9 +97,9 @@ public void iteratorStreamFilterSnippet() throws MalformedURLException { myIterableResponse.stream().filter(resp -> resp.statusCode() == HttpURLConnection.HTTP_OK) .limit(10) .forEach(resp -> { - System.out.printf("Response headers are %s. Url %s \n", resp.deserializedHeaders(), resp.request().url()); + System.out.printf("Response headers are %s. Url %s%n", resp.deserializedHeaders(), resp.request().url()); resp.items().forEach(value -> { - System.out.printf("Response value is %d \n", value); + System.out.printf("Response value is %d%n", value); }); }); // END: com.azure.core.http.rest.iterableResponse.stream.filter diff --git a/sdk/core/azure-core/src/samples/java/com/azure/core/implementation/util/FluxUtilJavaDocCodeSnippets.java b/sdk/core/azure-core/src/samples/java/com/azure/core/implementation/util/FluxUtilJavaDocCodeSnippets.java index 3c21660a27020..83226a267923c 100644 --- a/sdk/core/azure-core/src/samples/java/com/azure/core/implementation/util/FluxUtilJavaDocCodeSnippets.java +++ b/sdk/core/azure-core/src/samples/java/com/azure/core/implementation/util/FluxUtilJavaDocCodeSnippets.java @@ -56,34 +56,4 @@ private Flux serviceCallReturnsCollection(String prefix, Context context private Mono serviceCallReturnsSingle(String prefix, Context context) { return Mono.empty(); } - - /** - * Implementation not provided - * @param value The value - * @return A {@link Mono} containing a {@link Response} containing a {@link Response#value() value}. - */ - private Mono> getMonoRestResponse(T value) { - Response response = new Response() { - @Override - public int statusCode() { - return 200; - } - - @Override - public HttpHeaders headers() { - return null; - } - - @Override - public HttpRequest request() { - return null; - } - - @Override - public T value() { - return value; - } - }; - return Mono.just(response); - } }