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

Implement NullFilter. #264

Closed

Conversation

blackwinter
Copy link
Member

Some modules can't handle null values (e.g. FormetaEncoder and SimpleXmlEncoder), which (at least) MarcXmlHandler may generate (ref.). There are several options to deal with this situation:

  1. Fix all modules to not insert null values into the stream.
  2. Fix all modules to handle null values (as has happened with StreamUnicodeNormalizer, see Ignore null values in StreamUnicodeNormalizer. #262).
  3. Add a new filter to discard or replace null values.

This pull request implements the latter option.

@cboehme
Copy link
Member

cboehme commented Dec 16, 2016

I remember Markus and I discussing the issue a couple of years ago. I think, we decided that id and name parameters should never be null while value may be null. I am not sure if allowing null for values is a sensible choice. We should discuss this.

For now a NullFilter is good short-term remedy for modules emitting null values.

@blackwinter
Copy link
Member Author

I am not sure if allowing null for values is a sensible choice.

I would think so. Ideally, all modules would handle null values gracefully (option 2); either deal with them appropriately (e.g., JsonEncoder) or ignore them/pass them through (e.g., StreamUnicodeNormalizer). But this looks like a daunting task ;)

@blackwinter blackwinter force-pushed the implement-null-filter branch from e92beb0 to c257000 Compare December 19, 2016 10:20
@cboehme cboehme closed this in 34e7218 Dec 25, 2016
@blackwinter blackwinter deleted the implement-null-filter branch December 27, 2016 09:12
blackwinter added a commit that referenced this pull request Dec 13, 2024
…sources

Fix `NoSuchFieldError` in lobid-resources web app.
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.

2 participants