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

NoClassDefFoundError on Android platform when try to use DefaultDnsSe… #8656

Merged
merged 1 commit into from Dec 14, 2018

Conversation

Projects
None yet
3 participants
@normanmaurer
Copy link
Member

normanmaurer commented Dec 13, 2018

…rverAddressStreamProvider.

Motivation:

Andoid does not contain javax.naming.* so we should not try to use it to prevent a NoClassDefFoundError on init.

Modifications:

Only try to use javax.naming.* to retrieve nameservers when not using Android.

Result:

Fixes #8654.

NoClassDefFoundError on Android platform when try to use DefaultDnsSe…
…rverAddressStreamProvider.

Motivation:

Andoid does not contain javax.naming.* so we should not try to use it to prevent a NoClassDefFoundError on init.

Modifications:

Only try to use javax.naming.* to retrieve nameservers when not using Android.

Result:

Fixes #8654.
@normanmaurer

This comment has been minimized.

Copy link
Member Author

normanmaurer commented Dec 14, 2018

@netty-bot test this please

@normanmaurer normanmaurer merged commit a3844da into 4.1 Dec 14, 2018

4 checks passed

pull request validation (centos6-java11) Build finished.
Details
pull request validation (centos6-java12) Build finished.
Details
pull request validation (centos6-java8) Build finished.
Details
pull request validation (centos6-java9) Build finished.
Details

@normanmaurer normanmaurer deleted the dns_android branch Dec 14, 2018

normanmaurer added a commit that referenced this pull request Dec 14, 2018

NoClassDefFoundError on Android platform when try to use DefaultDnsSe…
…rverAddressStreamProvider. (#8656)

Motivation:

Andoid does not contain javax.naming.* so we should not try to use it to prevent a NoClassDefFoundError on init.

Modifications:

Only try to use javax.naming.* to retrieve nameservers when not using Android.

Result:

Fixes #8654.
@carl-mastrangelo
Copy link
Member

carl-mastrangelo left a comment

LGTM

}
}
}
} catch (NamingException ignore) {

This comment has been minimized.

@carl-mastrangelo

carl-mastrangelo Dec 19, 2018

Member

Optional: logging fine the the NamingExceptions was useful when developing gRPC's DNS support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment