提交 1e198e6f 编写于 作者: J Jesse Glick

ItemsTest.moveItem showed that if migrate is called on a nonexistent...

ItemsTest.moveItem showed that if migrate is called on a nonexistent directory, we should do nothing.
上级 c6486e2b
......@@ -144,6 +144,10 @@ public final class RunIdMigrator {
LOGGER.log(Level.FINER, "migration already performed for {0}", dir);
return false;
}
if (!dir.isDirectory()) {
LOGGER.log(/* normal during Job.movedTo */Level.FINE, "{0} was unexpectedly missing", dir);
return false;
}
LOGGER.log(Level.INFO, "Migrating build records in {0}", dir);
doMigrate(dir);
save(dir);
......@@ -173,10 +177,6 @@ public final class RunIdMigrator {
private void doMigrate(File dir) {
idToNumber = new TreeMap<String,Integer>();
File[] kids = dir.listFiles();
if (kids == null) {
LOGGER.warning("dir was unexpectedly missing");
return;
}
// Need to process symlinks first so we can rename to them.
List<File> kidsList = new ArrayList<File>(Arrays.asList(kids));
Iterator<File> it = kidsList.iterator();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册