-
Notifications
You must be signed in to change notification settings - Fork 3.9k
11922 :: UdsChannelBuilder does not work with WiFi Proxy on Android. #12324
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
base: master
Are you sure you want to change the base?
Conversation
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.
.
@@ -81,7 +82,10 @@ public static ManagedChannelBuilder<?> forPath(String path, Namespace namespace) | |||
OKHTTP_CHANNEL_BUILDER_CLASS | |||
.getMethod("socketFactory", SocketFactory.class) | |||
.invoke(builder, new UdsSocketFactory(path, namespace)); | |||
return builder; | |||
if (builder == null) { |
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.
Remove this check for builder == null. There is no need for this check.
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.
Thanks @kannanjgithub for the review. I've added a null check to resolve the following warnings and satisfy the code quality check:
Warning:(85, 22) Method invocation 'proxyDetector' may produce 'NullPointerException'
The warnings will be resolved with 'assert builder != null' or a 'null check'. Could you please confirm if it's okay for me to ignore these warnings and remove the null check?
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.
You can suppress the warnings. NPE will happen for reflected methods when the requested method name or class name is not available but that cannot happen here since we know they are definitely available.
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.
Thanks for the suggestions @kannanjgithub , I have addressed the review comments and please review it once You get some bandwidth.
Fixes : #11922