Skip to content

Commit 0318e49

Browse files
author
Brian Burkhalter
committed
8351415: (fs) Path::toAbsolutePath should specify if an absolute path has a root component
Reviewed-by: alanb
1 parent b8c69df commit 0318e49

File tree

1 file changed

+4
-2
lines changed
  • src/java.base/share/classes/java/nio/file

1 file changed

+4
-2
lines changed

src/java.base/share/classes/java/nio/file/Path.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2007, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -749,7 +749,9 @@ default Path resolveSibling(String other) {
749749

750750
/**
751751
* Returns a {@code Path} object representing the absolute path of this
752-
* path.
752+
* path. Where this {@code Path} is associated with the default provider,
753+
* then the returned absolute path will have a non-{@code null}
754+
* {@linkplain #getRoot root component}.
753755
*
754756
* <p> If this path is already {@link Path#isAbsolute absolute} then this
755757
* method simply returns this path. Otherwise, this method resolves the path

0 commit comments

Comments
 (0)