JDK RFR of 8064466: (fs spec) Files.readAttributes(Path, String, LinkOption...) not clear when called with zero attributes

Alan Bateman Alan.Bateman at oracle.com
Tue Feb 2 12:58:26 UTC 2016


On 01/02/2016 20:29, Brian Burkhalter wrote:
> Please review at your convenience:
>
> Issue:https://bugs.openjdk.java.net/browse/JDK-8064466
> Patch:
>
> diff --git a/src/java.base/share/classes/java/nio/file/Files.java 
> b/src/java.base/share/classes/java/nio/file/Files.java
> --- a/src/java.base/share/classes/java/nio/file/Files.java
> +++ b/src/java.base/share/classes/java/nio/file/Files.java
> @@ -1898,7 +1898,7 @@
>       * many file systems.
>       *
>       * <p> The <i>attribute-list</i> component is a comma separated 
> list of
> -     * *zero* or more names of attributes to read. If the list 
> contains the value
> +     * *one* or more names of attributes to read. If the list 
> contains the value
>       * {@code "*"} then all attributes are read. Attributes that are 
> not supported
>       * are ignored and will not be present in the returned map. It is
>       * implementation specific if all attributes are read as an 
> atomic operation
> @@ -1948,7 +1948,7 @@
>       * @throws  UnsupportedOperationException
>       *          if the attribute view is not available
>       * @throws  IllegalArgumentException
> -     *          if no attributes are specified or an unrecognized 
> *attributes* is
> +     *          if no attributes are specified or an unrecognized 
> *attribute* is
>       *          specified
>       * @throws  IOException
>       *          if an I/O error occurs
>
> Assuming this is accurate I shall file a CCC request. The regression 
> tests appear to cover this case already.
>
This looks right, it should be "one" rather than "zero", the IAE makes 
this clear of course.

-Alan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20160202/76751894/attachment.html>


More information about the nio-dev mailing list