commit | 983adeea9ed9f243c1580b3e1112a6c4a4fd58b4 | [log] [tgz] |
---|---|---|
author | David Pursehouse <dpursehouse@collab.net> | Tue Jun 25 10:26:37 2019 +0900 |
committer | David Pursehouse <dpursehouse@collab.net> | Tue Jun 25 10:27:26 2019 +0900 |
tree | cb19acb3bbea5760fd1edadfc83171edf9b62f88 | |
parent | 2d6e4d1bb053864840bfbafadb84ca9e4313722e [diff] |
ListImportedProjects: Stop using deprecated fileTreeTraverser method Use fileTraverser as recommended. Also replace preOrderTraversal with depthFirstPreOrder as recommended. Change-Id: I1c13397e3b123879d9c1f6780da80eb3122005d9
diff --git a/src/main/java/com/googlesource/gerrit/plugins/importer/ListImportedProjects.java b/src/main/java/com/googlesource/gerrit/plugins/importer/ListImportedProjects.java index 2e6379c..1381d08 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/importer/ListImportedProjects.java +++ b/src/main/java/com/googlesource/gerrit/plugins/importer/ListImportedProjects.java
@@ -64,7 +64,7 @@ Collection<File> importFiles = new HashSet<>(); File lockRoot = projects.FS_LAYOUT.getLockRoot(); Path lockRootPath = lockRoot.toPath(); - for (File f : Files.fileTreeTraverser().preOrderTraversal(lockRoot)) { + for (File f : Files.fileTraverser().depthFirstPreOrder(lockRoot)) { if (f.isFile() && !f.getName().endsWith(".lock") && matches(lockRootPath.relativize(f.toPath()))) {