changeset 4288:53d759eb580c

7050358: (fs spec) Path.toUri doesn't allow custom providers to use opaque URIs Reviewed-by: sherman
author alanb
date Sat, 04 Jun 2011 11:18:33 +0100
parents 39de8937c1d8
children 1f39ca0b9598
files src/share/classes/java/nio/file/Path.java
diffstat 1 files changed, 7 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/nio/file/Path.java	Thu Jun 02 13:38:28 2011 -0700
+++ b/src/share/classes/java/nio/file/Path.java	Sat Jun 04 11:18:33 2011 +0100
@@ -460,15 +460,13 @@
     /**
      * Returns a URI to represent this path.
      *
-     * <p> This method constructs a hierarchical {@link URI} that is absolute
-     * with a non-empty path component. Its {@link URI#getScheme() scheme} is
-     * equal to the URI scheme that identifies the provider. The exact form of
-     * the other URI components is highly provider dependent. In particular, it
-     * is implementation dependent if its query, fragment, and authority
-     * components are defined or undefined.
+     * <p> This method constructs an absolute {@link URI} with a {@link
+     * URI#getScheme() scheme} equal to the URI scheme that identifies the
+     * provider. The exact form of the scheme specific part is highly provider
+     * dependent.
      *
-     * <p> For the default provider the {@link URI#getPath() path} component
-     * will represent the {@link #toAbsolutePath absolute} path; the query,
+     * <p> In the case of the default provider, the URI is hierarchical with
+     * a {@link URI#getPath() path} component that is absolute. The query and
      * fragment components are undefined. Whether the authority component is
      * defined or not is implementation dependent. There is no guarantee that
      * the {@code URI} may be used to construct a {@link java.io.File java.io.File}.
@@ -497,7 +495,7 @@
      * A format for compound URIs is not defined in this release; such a scheme
      * may be added in a future release.
      *
-     * @return  an absolute, hierarchical URI with a non-empty path component
+     * @return  the URI representing this path
      *
      * @throws  java.io.IOError
      *          if an I/O error occurs obtaining the absolute path, or where a