public class LocationUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
ensureRelativeNonNull(String location)
Handles given location when it is either
null or starts with "/". |
static List<String> |
parsePathToSegments(String path)
Parses the given path to parts split by the path separator, ignoring the
query string and fragment if either present.
|
static QueryParameters |
parseQueryParameters(String location)
Parses query parameters from the given location.
|
static void |
verifyRelativePath(String path)
Throws
InvalidLocationException if the provided path is not
parseable as a relative path. |
public static void verifyRelativePath(String path)
InvalidLocationException if the provided path is not
parseable as a relative path. A relative path should be parseable as a
URI without a scheme or host, it should not contain any ..
segments and it shouldn't start with /.path - the (decoded) path to check, not nullpublic static List<String> parsePathToSegments(String path)
verifyRelativePath(String).path - the path to parsepublic static String ensureRelativeNonNull(String location)
null or starts with "/".location - the location to handlenullpublic static QueryParameters parseQueryParameters(String location)
location - the location to parse the query parameters fromCopyright © 2025. All rights reserved.