Skip to content

Conversation

vimanikag
Copy link
Contributor

Fixes : #11922

Copy link
Contributor

@kannanjgithub kannanjgithub left a 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) {
Copy link
Contributor

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.

Copy link
Contributor Author

@vimanikag vimanikag Sep 2, 2025

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UdsChannelBuilder does not work with WiFi Proxy on Android
2 participants