Treat literal "null" string as null when reading marketplace CSV#6826
Merged
Treat literal "null" string as null when reading marketplace CSV#6826
Conversation
RecipeMarketplaceReader already normalizes blank CSV values to null, but does not handle the literal string "null". This can cause RecipeBundle.version and requestedVersion to become the string "null" after a CSV round-trip, leading to display artifacts like "file:///path/to/file.yml:null" in mod config recipes list.
Remove setNullValue("") so univocity returns null for empty fields
natively, eliminating the need for the redundant StringUtils.isBlank
check in the reading loop.
pstreef
approved these changes
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
RecipeMarketplaceReaderalready normalizes blank CSV values tonull, but does not handle the literal string"null". This causesRecipeBundle.versionandrequestedVersionto become the string"null"after a CSV round-trip, leading to display artifacts likefile:///path/to/file.yml:nullinmod config recipes list."null"the same as blank — one extra condition applied uniformly to all columns.nullin CSV, one for round-trip preservation of null versions.Test plan
RecipeMarketplaceReaderTest.nullLiteralVersionIsTreatedAsNull— parses CSV with literalnullin version columns, asserts they become JavanullRecipeMarketplaceReaderTest.roundTripPreservesNullVersions— write → read round-trip with null versions stays nullRecipeMarketplaceReaderTesttests continue to pass