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.
This is an attempt to get rid of the old
UriTemplate
,UriMatchTemplate
, andUriTypeMatchTemplate
(not used in Core). The implementation of matching/expanding is very confusing and hard to understand, with all the things being changed in the inherited constructor methods, etc. It does not allow adding any changes that we might need.The new implementation is split into a parser, an expander, and an alternative URI template matcher. The matcher now matches segments of the path, allowing to match without always using the regexp; this should improve the performance of matching basic
/hello
or/hello/{world}.
In the future, we can implement routing, which will combine similar segments into one, reducing the complexity for N to something better, considering most routes share the same prefix.The new matcher passes previous tests and is now used to match the routes. However, there are still some cases where the old template is used: resolving conflicts and the URI builder. Next, I will investigate what needs to be aligned with the JAX-RS implementation.
Unfortunately, the classes are public and cannot be removed or changed, so we have a new implementation until v5.