Repository: activemq-artemis Updated Branches: refs/heads/master 4fd2e4e6c -> d905af993
ARTEMIS-1406 removing impossible instanceof Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/94b53c67 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/94b53c67 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/94b53c67 Branch: refs/heads/master Commit: 94b53c67c0e346d9fa89fa652ff5aaa64ec60415 Parents: 4fd2e4e Author: Justin Bertram <[email protected]> Authored: Fri Sep 29 15:21:37 2017 -0500 Committer: Howard Gao <[email protected]> Committed: Wed Jan 3 10:50:13 2018 +0800 ---------------------------------------------------------------------- .../artemis/core/io/mapped/MappedSequentialFile.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/94b53c67/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/MappedSequentialFile.java ---------------------------------------------------------------------- diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/MappedSequentialFile.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/MappedSequentialFile.java index aec4723..4c5e23a 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/MappedSequentialFile.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/MappedSequentialFile.java @@ -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(); }
