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

NUTCH-3044 Generator: NPE when extracting the host part of a URL fails #815

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sebastian-nagel
Copy link
Contributor

No description provided.

Copy link
Member

@lewismc lewismc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 LGTM

I was thinking we could provide a TestGenerator#testNullHostInReducer test case which would bootstrap the SelectorReducer.reduce with some "well formed" and "not well-formed" URLs in order to validate that no NPE is thrown. The test case should fail before your patch is applied and pass afterwards.

- add unit test to proof that URLs without a host part do not cause
  errors
@sebastian-nagel
Copy link
Contributor Author

we could provide a TestGenerator#testNullHostInReducer test case

Good idea! Done, see 4729786.

- replace deprecated method call
- improve and format Javadoc
@sebastian-nagel
Copy link
Contributor Author

... also fixed the Javadoc error.

@lewismc
Copy link
Member

lewismc commented Apr 28, 2024

Excellent @sebastian-nagel +1

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