diff --git a/jdk/src/share/classes/java/nio/file/Files.java b/jdk/src/share/classes/java/nio/file/Files.java index 00e1014526c617b4335d2514ccd1d3fb8af35915..bf596409e5a5724364e342b9fb35331e262268a7 100644 --- a/jdk/src/share/classes/java/nio/file/Files.java +++ b/jdk/src/share/classes/java/nio/file/Files.java @@ -133,10 +133,11 @@ public final class Files { *

This method walks a file tree rooted at a given starting file. The * file tree traversal is depth-first with the given {@link * FileVisitor} invoked for each file encountered. File tree traversal - * completes when all accessible files in the tree have been visited, a - * visitor returns a result of {@link FileVisitResult#TERMINATE TERMINATE}, - * or the visitor terminates due to an uncaught {@code Error} or {@code - * RuntimeException}. + * completes when all accessible files in the tree have been visited, or a + * visit method returns a result of {@link FileVisitResult#TERMINATE + * TERMINATE}. Where a visit method terminates due an uncaught error or + * runtime exception then the traversal is terminated and the error or + * exception is propagated to the caller of this method. * *

For each file encountered this method attempts to gets its {@link * java.nio.file.attribute.BasicFileAttributes}. If the file is not a diff --git a/jdk/src/share/classes/java/nio/file/SimpleFileVisitor.java b/jdk/src/share/classes/java/nio/file/SimpleFileVisitor.java index 761773513ede4781cf42f56bb77384543c48383b..f252ef03eea8e7a8d777381bf251be0dbc11f043 100644 --- a/jdk/src/share/classes/java/nio/file/SimpleFileVisitor.java +++ b/jdk/src/share/classes/java/nio/file/SimpleFileVisitor.java @@ -124,8 +124,8 @@ public class SimpleFileVisitor implements FileVisitor { * cause. * * @throws IOError - * if iteration of the directory completed prematurely due to an - * I/O error + * with the I/O exception thrown when iteration of the directory + * completed prematurely due to an I/O error */ @Override public FileVisitResult postVisitDirectory(T dir, IOException exc) {