Repository navigation
Trim the license names in includedLicenses and excludedLicenses - #734
Merged
Merged
Conversation
An empty list also used to hold one entry, the empty string, which matches no license and so was harmless, but it is gone now. Co-authored-by: Jan-Hendrik Diederich <1955253+Master-Code-Programmer@users.noreply.github.com>
slachiewicz
marked this pull request as ready for review
August 23, 2026 10:30
Master-Code-Programmer
added a commit
to Master-Code-Programmer/license-maven-plugin
that referenced
this pull request
Sep 19, 2026
âĶhaus#734) An empty list also used to hold one entry, the empty string, which matches no license and so was harmless, but it is gone now. Co-authored-by: Jan-Hendrik Diederich <1955253+Master-Code-Programmer@users.noreply.github.com>
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.
The pipe-separated form of
includedLicensesandexcludedLicensesonly tolerated whitespace around the separator, so the first and last name in a list broken over several lines kept the indentation the XML gave them and matched nothing:That form is not just a matter of taste. An XML formatter breaks a long enough value over several lines on its own.
Extracted from #622, where @Master-Code-Programmer reported it. Trimming in
addEntryToListcovers the element-per-license form too, where the whitespace comes from the same place.One behaviour change beyond the fix: an empty value used to produce a list holding the empty string, which matched no license, and now produces an empty list.
Verified: the new
StringToListTestfails on master on both counts.This change was created with AI assistance.