Skip to content

Commit 7e6ccdb

Browse files
ejona86AgraVator
authored andcommitted
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 ae3a9e0 commit 7e6ccdb

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)