Fix WildcardTrie using SimpleCharacterClasses: ensure the uniqueness of values #143
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 use of a Set instead of a List avoids redundant values by ensuring the uniqueness of values.
You may want at first to cherry pick 2fb06df to test against the actual master to understand the problem. The test will result in 2 hits, not the expected 1.
More details:
Using Simple Character Classes, as introduced with #135, in combination with the OR pattern can lead to send redundantly multiple same values via Metamorph. E.g. a matching of "412-1.a" with metamorph
<data source="41[278][-abcu][-12].[ag]|61[36][-abcu][-12].a" name="foo">results in more than 3000 times sending "foo" (run MabXml2lobidTest of lobid/lodmill#245 to reproduce).