Absolute paths such as /.. (Unix) or X:\.. (Windows) should be forbidden. Let's add the corresponding validation into the AbsolutePath constructor.
Also check the behavior of new AbsolutePath("smth") / new RelativePath("..") — it should be the same w.r.t. the exceptions thrown.
Absolute paths such as
/..(Unix) orX:\..(Windows) should be forbidden. Let's add the corresponding validation into theAbsolutePathconstructor.Also check the behavior of
new AbsolutePath("smth") / new RelativePath("..")— it should be the same w.r.t. the exceptions thrown.