Skip to content

Commit 4b5ce99

Browse files
committed
binder: Fix synchronization instead of suppressing GuardedBy
There's no reason why we shouldn't just have proper synchronization here, even if only used in tests. We shouldn't get into the habit of suppressing them.
1 parent ead6a54 commit 4b5ce99

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

binder/src/main/java/io/grpc/binder/internal/BinderTransport.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,7 @@ Map<Integer, Inbound<?>> getOngoingCalls() {
574574
}
575575

576576
@VisibleForTesting
577-
@SuppressWarnings("GuardedBy")
578-
LeakSafeOneWayBinder getIncomingBinderForTesting() {
577+
synchronized LeakSafeOneWayBinder getIncomingBinderForTesting() {
579578
return this.incomingBinder;
580579
}
581580

0 commit comments

Comments
 (0)