Properly format and safely escape to CSV in DecodeEventLogger #1092
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1038.
Hand-crafting a serialized format will always be a losing proposition. Brings in Apache's Commons CSV to provide a bulletproof CSV-formatted string to be written into the log. This has an additional benefit of making aliases and details safe to use quotes and commas (as well as other "reserved" CSV characters).
To preserve the existing behaviour of SDR Trunk's CSV logging, every value/cell is wrapped in quotes, even if it isn't explicitly needed.
Adds tests to ensure the strings are as we expect.