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

Use default value on no match regardless of ElementConverter presence #74

Merged
merged 1 commit into from
Dec 2, 2022
Merged

Use default value on no match regardless of ElementConverter presence #74

merged 1 commit into from
Dec 2, 2022

Conversation

veyndan
Copy link
Contributor

@veyndan veyndan commented Oct 3, 2019

Closes #72.

When no match occurs, Jspoon should use the default value given by the user instead of passing null to the node of ElementConverter. ElementConverter shouldn't receive null as the Javadoc of Selector#converter states that the converter should only be used for matched (i.e. non-null) elements:

/** @return The converter to be used for the matched {@link Element element} */
@SuppressWarnings("rawtypes")
Class<? extends ElementConverter> converter() default ElementConverter.class;

@koral-- koral-- merged commit 72958bc into DroidsOnRoids:master Dec 2, 2022
@veyndan veyndan deleted the converter-no-match branch March 21, 2023 21:35
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.

ElementConverter Element node should be nullable
2 participants