culturegraph/metafacture-core — pull request #143 by dr0i (2013-11-04 16:34:42+00:00)
Title: Fix WildcardTrie using SimpleCharacterClasses: ensure the uniqueness of values

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 `` results in more than 3000 times sending "foo" (run MabXml2lobidTest of https://github.com/lobid/lodmill/pull/245 to reproduce).