Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.4.0
Description
In order to make the RestServerEndpoint more easily extendable, we should automatically sort the returned list of rest handler when calling RestServerEndpoint#initializeHandlers. That way the order in which the handlers are added to the list is independent of the actual registration order. This is, for example, important for the static file server which always needs to be registered last.
I propose to add a special String Comparator which considers the charactor ':' to be the character with the largest value. That way we should get always the following sort order:
- URLs without path parameters have precedence over similar URLs where parts are replaced by path parameters (e.g. /jobs/overview, /jobs/:jobid and /jobs/:jobid/config, /jobs/:jobid/vertices/:vertexId)
- Prefixes are sorted before URLs containing the prefix (e.g. /jobs, /jobs/overview)
Attachments
Issue Links
- links to