解决RegisterPersistenceThread没有合理的使用offset文件和offset.bak文件

This commit is contained in:
zhangxin10 2015-11-30 23:10:18 +08:00
parent ccbfbe578f
commit 52e268f577
1 changed files with 6 additions and 2 deletions

View File

@ -95,8 +95,12 @@ public class MemoryRegister {
reader = new BufferedReader(new FileReader(file));
String offsetData;
while ((offsetData = reader.readLine()) != null && !"EOF".equals(offsetData)) {
String[] ss = offsetData.split("\t");
entries.put(ss[0], new FileRegisterEntry(ss[0], Integer.valueOf(ss[1]), FileRegisterEntry.FileRegisterEntryStatus.UNREGISTER));
try {
String[] ss = offsetData.split("\t");
entries.put(ss[0], new FileRegisterEntry(ss[0], Integer.valueOf(ss[1]), FileRegisterEntry.FileRegisterEntryStatus.UNREGISTER));
} catch (Exception e) {
continue;
}
}
}
} catch (FileNotFoundException e) {