Skip to content
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

Ignore inline comments when parsing nameservers #9894

Merged
merged 1 commit into from Dec 18, 2019
Merged

Conversation

@normanmaurer
Copy link
Member

normanmaurer commented Dec 18, 2019

Motivation:

The resolv.conf file may contain inline comments which should be ignored

Modifications:

  • Detect if we have a comment after the ipaddress and if so skip it
  • Add unit test

Result:

Fixes #9889

Motivation:

The resolv.conf file may contain inline comments which should be ignored

Modifications:

- Detect if we have a comment after the ipaddress and if so skip it
- Add unit test

Result:

Fixes #9889
@@ -542,7 +542,7 @@ public static boolean isNullOrEmpty(String s) {
*
* @param seq The string to search.
* @param offset The offset to start searching at.
* @return the index of the first non-white space character or <{@code 0} if none was found.
* @return the index of the first non-white space character or <{@code -1} if none was found.

This comment has been minimized.

Copy link
@normanmaurer

normanmaurer Dec 18, 2019

Author Member

fixed this while I am here as the docs are incorrect :)

@normanmaurer

This comment has been minimized.

Copy link
Member Author

normanmaurer commented Dec 18, 2019

@normanmaurer normanmaurer requested review from slandelle, franz1981 and njhill Dec 18, 2019
@njhill
njhill approved these changes Dec 18, 2019
Copy link
Member

njhill left a comment

LGTM

@normanmaurer normanmaurer merged commit 68cfab4 into 4.1 Dec 18, 2019
3 checks passed
3 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
@normanmaurer normanmaurer deleted the parsing_nameserver branch Dec 18, 2019
normanmaurer added a commit that referenced this pull request Dec 18, 2019
Motivation:

The resolv.conf file may contain inline comments which should be ignored

Modifications:

- Detect if we have a comment after the ipaddress and if so skip it
- Add unit test

Result:

Fixes #9889
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.