airbnb / DeepLinkDispatch

A simple, annotation-based library for making deep link handling better on Android
http://nerds.airbnb.com/deeplinkdispatch/
4.37k stars 407 forks source link

Fix placeholder match #308

Closed rossbacher closed 3 years ago

rossbacher commented 3 years ago

Because of the way the index is sorted two deeplinks that are only differentiated by the number of placeholders in the match like:

app://host/{a}{b}and app://host/{c}

would have the shorter one not match if the placeholder in question is lexicographic after the ones in the longer one.

This e.g. would have worked:

app://host/{c}{b}and app://host/{a}

This fixes this by checking all elements on on one level of the trie before reporting no match.

This fixes https://github.com/airbnb/DeepLinkDispatch/issues/303