Package org.apache.maven.model.path
Interface UrlNormalizer
- All Known Implementing Classes:
DefaultUrlNormalizer
public interface UrlNormalizer
Simplifies URLs by removing parent directory references ("/../") and collapsing path segments.
This performs purely string-based normalization without full URL parsing or validation.
The normalization process iteratively removes "/../" segments by eliminating the preceding path segment, effectively resolving relative path traversals.
This does not guarantee that the resulting URL is valid or reachable; it simply produces a more canonical representation of the input string.
- Author:
- Benjamin Bentmann
-
Method Summary
-
Method Details
-
normalize
Normalizes the specified URL.- Parameters:
url- The URL to normalize, may benull.- Returns:
- The normalized URL or
nullif the input wasnull.
-