This commit is contained in:
Howard Gao 2018-01-03 10:51:45 +08:00
commit 7232302f03
1 changed files with 1 additions and 8 deletions

View File

@ -366,14 +366,7 @@ final class MappedSequentialFile implements SequentialFile {
@Override
public void renameTo(String newFileName) throws Exception {
try {
close();
} catch (Exception e) {
if (e instanceof IOException) {
factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(), this);
}
throw e;
}
close();
if (this.fileName == null) {
this.fileName = this.file.getName();
}