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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2155,6 +2155,15 @@
RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE,
RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>

<!-- Exclude BC_UNCONFIRMED_CAST_OF_RETURN_VALUE as false positive -->
<Match>
<Or>
<Class name="com.azure.resourcemanager.resources.fluentcore.dag.TaskGroup"/>
<Class name="com.azure.resourcemanager.resources.fluentcore.dag.TaskGroup$ProxyTaskGroupWrapper"/>
</Or>
<Bug pattern="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE"/>
</Match>

<!-- Exclude from spring related classes -->
<Match>
Expand Down
5 changes: 0 additions & 5 deletions sdk/resourcemanager/azure-resourcemanager-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@
<artifactId>azure-core-management</artifactId>
<version>1.0.0-beta.3</version> <!-- {x-version-update;com.azure:azure-core-management;dependency} -->
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<version>4.0.2</version> <!-- {x-version-update;com.github.spotbugs:spotbugs-annotations;external_dependency} -->
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<TaskItem> taskGroupEntry = super.getNode(taskId);
if (taskGroupEntry != null) {
Expand Down Expand Up @@ -379,7 +377,6 @@ private Set<String> runBeforeGroupInvoke(final Set<String> 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<TaskGroupEntry<TaskItem>> entriesSnapshot() {
List<TaskGroupEntry<TaskItem>> entries = new ArrayList<>();
super.prepareForEnumeration();
Expand All @@ -401,7 +398,6 @@ private List<TaskGroupEntry<TaskItem>> 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<Indexable> invokeReadyTasksAsync(final InvocationContext context) {
TaskGroupEntry<TaskItem> readyTaskEntry = super.getNext();
final List<Flux<Indexable>> observables = new ArrayList<>();
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions sdk/resourcemanager/azure-resourcemanager-samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@
<version>5.6.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-api;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The change is required due to docker-java we used have com.google.code.findbugs.annotation as provided scope.

<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<version>4.0.2</version> <!-- {x-version-update;com.github.spotbugs:spotbugs-annotations;external_dependency} -->
</dependency>
</dependencies>
<profiles>
<profile>
Expand Down Expand Up @@ -208,6 +213,7 @@
<include>org.eclipse.jgit:org.eclipse.jgit:[4.5.7.201904151645-r]</include> <!-- {x-include-update;org.eclipse.jgit:org.eclipse.jgit;external_dependency} -->
<include>com.github.cverges.expect4j:expect4j:[1.6]</include> <!-- {x-include-update;com.github.cverges.expect4j:expect4j;external_dependency} -->
<include>commons-net:commons-net:[3.6]</include> <!-- {x-include-update;commons-net:commons-net;external_dependency} -->
<include>com.github.spotbugs:spotbugs-annotations:[4.0.2]</include> <!-- {x-include-update;com.github.spotbugs:spotbugs-annotations;external_dependency} -->
</includes>
</bannedDependencies>
</rules>
Expand Down