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 3e3332a04638..8b37b15909ed 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
@@ -2155,6 +2155,15 @@
RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE,
RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
+
+
+
+
+
+
+
+
+
diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml
index ba96835388a2..b4ee7ebf1a72 100644
--- a/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml
+++ b/sdk/resourcemanager/azure-resourcemanager-resources/pom.xml
@@ -54,11 +54,6 @@
azure-core-management
1.0.0-beta.3
-
- com.github.spotbugs
- spotbugs-annotations
- 4.0.2
-
org.slf4j
slf4j-simple
diff --git a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/dag/TaskGroup.java b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/dag/TaskGroup.java
index 42277726d814..121e6f4fca32 100644
--- a/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/dag/TaskGroup.java
+++ b/sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/dag/TaskGroup.java
@@ -6,7 +6,6 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.resources.fluentcore.model.Indexable;
import com.azure.resourcemanager.resources.fluentcore.utils.SdkContext;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;
@@ -122,7 +121,6 @@ public String key() {
* @param taskId the task item id
* @return the task result, null will be returned if task has not yet been invoked
*/
- @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST_OF_RETURN_VALUE", justification = "Incorrect spot bugs")
public Indexable taskResult(String taskId) {
TaskGroupEntry taskGroupEntry = super.getNode(taskId);
if (taskGroupEntry != null) {
@@ -379,7 +377,6 @@ private Set runBeforeGroupInvoke(final Set skip) {
/**
* @return list with current task entries in this task group
*/
- @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST_OF_RETURN_VALUE", justification = "Incorrect spot bugs")
private List> entriesSnapshot() {
List> entries = new ArrayList<>();
super.prepareForEnumeration();
@@ -401,7 +398,6 @@ private List> entriesSnapshot() {
// Due to it takes approximate 3ms in flux for returning, it cannot be guaranteed to return in topological order.
// One simply fix for guaranteeing the last element could be https://github.com/Azure/azure-sdk-for-java/pull/15074
@SuppressWarnings({"unchecked", "rawtypes"})
- @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST_OF_RETURN_VALUE", justification = "Incorrect spot bugs")
private Flux invokeReadyTasksAsync(final InvocationContext context) {
TaskGroupEntry readyTaskEntry = super.getNext();
final List> observables = new ArrayList<>();
@@ -762,7 +758,6 @@ void addDependentTaskGroup(TaskGroup dependentTaskGroup) {
/**
* Initialize the proxy TaskGroup if not initialized yet.
*/
- @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST_OF_RETURN_VALUE", justification = "Incorrect spot bugs")
private void initProxyTaskGroup() {
if (this.proxyTaskGroup == null) {
// Creates proxy TaskGroup with an instance of ProxyTaskItem as root TaskItem which delegates actions on
diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml
index b601034cbeac..95aa61684c97 100644
--- a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml
+++ b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml
@@ -143,6 +143,11 @@
5.6.2
test
+
+ com.github.spotbugs
+ spotbugs-annotations
+ 4.0.2
+
@@ -208,6 +213,7 @@
org.eclipse.jgit:org.eclipse.jgit:[4.5.7.201904151645-r]
com.github.cverges.expect4j:expect4j:[1.6]
commons-net:commons-net:[3.6]
+ com.github.spotbugs:spotbugs-annotations:[4.0.2]