Hello dev.java team!
As the lengthy review of the "File System Basics" section concludes in #210 , I am filing here a separate issue to track the few typos found in the relatively much shorter "File Operations Basics" and "Putting It All Together" sections remaining in the "The Java I/O API" tutorial ( https://dev.java/learn/java-io/reading-writing/ and https://dev.java/learn/java-io/putting-it-all-together/ ).
Just a few items this time that may be of interest to fix.
In the latest version of https://dev.java/learn/java-io/reading-writing/
(archived as is at https://web.archive.org/web/20260425231842/https://dev.java/learn/java-io/reading-writing/ ),
In the latest version of https://dev.java/learn/java-io/reading-writing/common-operations/ (archived as is at https://web.archive.org/web/20260425231924/https://dev.java/learn/java-io/reading-writing/common-operations/ ),
-
In the sentence
Leaving resources unclose will cause your application to crash in the long run.
"unclose" should be "open" or "unclosed".
-
Trivial thing but FWIW, in the sentence
For example, in the following method signature, the ellipses notation after the CopyOption argument indicates that the method accepts a variable number of arguments, or varargs, as they are typically called
"the ellipses notation" should probably be "the ellipsis notation" (ellipses is plural of ellipsis, but there is a single one, though this is a minor thing).
[Compare https://www.merriam-webster.com/dictionary/ellipsis and https://www.merriam-webster.com/dictionary/ellipses ]
-
In the code snippet
UserPrincipal group =
file.getFileSystem()
.getUserPrincipalLookupService()
.lookupPrincipalByName("me");
It would be recommended by this humble reader to declare the variable file here in this snippet. Since the variable file is not defined, the user is left to guess what it was declared as (e.g. File or Path? Spoiler: It is a Path).
Since it has the method "getFileSystem" it must be a java.nio.file.Path and NOT a java.io.File (as the name might suggest) , so
the variable name "file" is slightly confusing, especially as in an earlier snippet on the same page there was a "file" variable declared of type java.io.File.
Additionally, the variable name "group" for a UserPrincipal may be confusing, as the entity returned may be a user, e.g. of type sun.nio.fs.UnixUserPrincipals$User.
In the latest version of https://dev.java/learn/java-io/reading-writing/small-files/ (archived as is at https://web.archive.org/web/20260425231939/https://dev.java/learn/java-io/reading-writing/small-files/ ),
-
In the sentence
When you see an ellipses notation after the type of the argument, it indicates that the method accepts a variable number of arguments, or varargs.
"ellipses" should probably be "ellipsis"
-
In the sentence
POSIX File Permissions has an example that uses createFile(Path, FileAttribute<?>) to create a file with pre-set permissions.
Should "POSIX File Permissions" be hyperlinked?
-
In the sentence
Reading and Writing Files With Channel I/O shows that the Path.newByteChannel() methods return an instance of a SeekableByteChannel.
Should "Reading and Writing Files With Channel I/O" be hyperlinked?
In the latest version of https://dev.java/learn/java-io/putting-it-all-together/ (archived as is at https://web.archive.org/web/20260426192003/https://dev.java/learn/java-io/putting-it-all-together/?cache=false ),
-
In the sentence
It is very unlikely that Shakespeare writes any more sonnet (he died in 1616), but you still need to write this number here.
"writes any more sonnet" should be "writes any more sonnets".
-
In the sentence
The readNextSonnet() method read the text of the sonnet.
"read" should be "reads".
-
In the sentence
The first part of this code loops through all the sonnets and compress them to a first array of bytes.
"compress" should be "compresses".
Thanks so much for these excellent articles. (As always, my motivation is that sharing the typos I find is the least I can do to give back.)
Hello dev.java team!
As the lengthy review of the "File System Basics" section concludes in #210 , I am filing here a separate issue to track the few typos found in the relatively much shorter "File Operations Basics" and "Putting It All Together" sections remaining in the "The Java I/O API" tutorial ( https://dev.java/learn/java-io/reading-writing/ and https://dev.java/learn/java-io/putting-it-all-together/ ).
Just a few items this time that may be of interest to fix.
In the latest version of https://dev.java/learn/java-io/reading-writing/
(archived as is at https://web.archive.org/web/20260425231842/https://dev.java/learn/java-io/reading-writing/ ),
In the sentences
"It makes the difference between small files [...] and large files [...]" should probably be "It explains the difference between small files [...] and large files [...]."
In the latest version of https://dev.java/learn/java-io/reading-writing/common-operations/ (archived as is at https://web.archive.org/web/20260425231924/https://dev.java/learn/java-io/reading-writing/common-operations/ ),
In the sentence
"unclose" should be "open" or "unclosed".
Trivial thing but FWIW, in the sentence
"the ellipses notation" should probably be "the ellipsis notation" (ellipses is plural of ellipsis, but there is a single one, though this is a minor thing).
[Compare https://www.merriam-webster.com/dictionary/ellipsis and https://www.merriam-webster.com/dictionary/ellipses ]
In the code snippet
It would be recommended by this humble reader to declare the variable file here in this snippet. Since the variable file is not defined, the user is left to guess what it was declared as (e.g. File or Path? Spoiler: It is a Path).
Since it has the method "getFileSystem" it must be a java.nio.file.Path and NOT a java.io.File (as the name might suggest) , so
the variable name "file" is slightly confusing, especially as in an earlier snippet on the same page there was a "file" variable declared of type java.io.File.
Additionally, the variable name "group" for a UserPrincipal may be confusing, as the entity returned may be a user, e.g. of type
sun.nio.fs.UnixUserPrincipals$User.In the latest version of https://dev.java/learn/java-io/reading-writing/small-files/ (archived as is at https://web.archive.org/web/20260425231939/https://dev.java/learn/java-io/reading-writing/small-files/ ),
In the sentence
"ellipses" should probably be "ellipsis"
In the sentence
Should "POSIX File Permissions" be hyperlinked?
In the sentence
Should "Reading and Writing Files With Channel I/O" be hyperlinked?
In the latest version of https://dev.java/learn/java-io/putting-it-all-together/ (archived as is at https://web.archive.org/web/20260426192003/https://dev.java/learn/java-io/putting-it-all-together/?cache=false ),
In the sentence
"writes any more sonnet" should be "writes any more sonnets".
In the sentence
"read" should be "reads".
In the sentence
"compress" should be "compresses".
Thanks so much for these excellent articles. (As always, my motivation is that sharing the typos I find is the least I can do to give back.)