Implementation of a new spotbugs/findbugs rule to detect blocking calls:
CompletableFuture.join()
CompletableFuture.get()
CompletableFutureUtils.joinLikeSync()
Thread.sleep()
Object.wait()
HttpResourcesUtils.readResource()
HttpCredentialsLoader.loadloadCredentials()
The rule will flag any method calls made from anywhere and fails the maven build. To supress legitimate calls made to these methods outside of the async code path, the spotbugs-suppressions.xml must be updated.
Motivation and Context
As part of our effort to remove blocking call from the async code path, we need a way to detect existing blocking calls and prevent new blocking calls from making their way into the async code path.
Modifications
New spotbugs/findbugs rule and suppression for it.
Testing
Manually build the sdk with the new rule enabled, adding suppression for any the new rule findings
Implementation of a new spotbugs/findbugs rule to detect blocking calls:
CompletableFuture.join()
CompletableFuture.get()
CompletableFutureUtils.joinLikeSync()
Thread.sleep()
Object.wait()
HttpResourcesUtils.readResource()
HttpCredentialsLoader.loadloadCredentials()
The rule will flag any method calls made from anywhere and fails the maven build. To supress legitimate calls made to these methods outside of the async code path, the
spotbugs-suppressions.xml
must be updated.Motivation and Context
As part of our effort to remove blocking call from the async code path, we need a way to detect existing blocking calls and prevent new blocking calls from making their way into the async code path.
Modifications
New spotbugs/findbugs rule and suppression for it.
Testing
Manually build the sdk with the new rule enabled, adding suppression for any the new rule findings