-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
okhttp: Removed Annotation SuppressWarnings("GuardedBy") #11620
base: master
Are you sure you want to change the base?
Changes from all commits
d13c3c8
2274a77
3d0d34c
ae2865a
8cbadd9
8181b6c
ffbbb1e
003b878
c061f2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,13 +151,14 @@ public void run() { | |
return new StartCallback().clientStream; | ||
} | ||
|
||
@SuppressWarnings("GuardedBy") | ||
@GuardedBy("lock") | ||
private void startStream(CronetClientStream stream) { | ||
streams.add(stream); | ||
// TODO(b/145386688): This access should be guarded by 'stream.transportState().lock'; instead | ||
// found: 'this.lock' | ||
stream.transportState().start(streamFactory); | ||
synchronized (lock) { | ||
streams.add(stream); | ||
synchronized (stream.transportState().lock) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. stream.transportState().lock is never accessed outside of synchronized(lock) so this change should also not be needed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can see a query raised with Eric as below , hope as of now no action required. please confirm? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @shivaspeaks @kannanjgithub I can see Eric replied on last raised query #6578 (comment) as below.
I have made similar changes in current PR. Kindly suggest how to proceed further on the same. |
||
stream.transportState().start(streamFactory); | ||
} | ||
} | ||
} | ||
|
||
@Override | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
synchronized (lock) already exists at the caller site (newStream method) and should not be necessary to add.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see a query raised with Eric as below , hope as of now no action required. please confirm?
#6578 (comment)
FYI, I can also see a note in the issue description as below.
If we can't remove them or if it would make the code worse, we can leave them as-is and close this issue.