提交 23c62477 编写于 作者: A alanb

6907737: (file) FileVisitor and Files.walkFileTree issues

Reviewed-by: jjg
上级 308c50f9
......@@ -366,11 +366,11 @@ public class JavacPathFileManager extends BaseFileManager implements PathFileMan
// }
// }
int maxDepth = (recurse ? Integer.MAX_VALUE : 1);
Set<FileVisitOption> opts = EnumSet.of(DETECT_CYCLES, FOLLOW_LINKS);
Set<FileVisitOption> opts = EnumSet.of(FOLLOW_LINKS);
Files.walkFileTree(packageDir, opts, maxDepth,
new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult preVisitDirectory(Path dir) {
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {
if (SourceVersion.isIdentifier(dir.getName().toString())) // JSR 292?
return FileVisitResult.CONTINUE;
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册