You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ha...@apache.org on 2014/03/12 03:21:44 UTC
[18/20] git commit: https://issues.apache.org/jira/browse/AMQ-3725 -
close delegated file only if not null
https://issues.apache.org/jira/browse/AMQ-3725 - close delegated file only if not null
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/a675bd96
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/a675bd96
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/a675bd96
Branch: refs/heads/activemq-5.9
Commit: a675bd96f062b97247e7e623d2a6509a71b6c9f2
Parents: a38d26b
Author: Dejan Bosanac <de...@nighttale.net>
Authored: Fri Nov 1 14:02:49 2013 +0100
Committer: Hadrian Zbarcea <ha...@apache.org>
Committed: Tue Mar 11 21:20:05 2014 -0400
----------------------------------------------------------------------
.../org/apache/activemq/util/RecoverableRandomAccessFile.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/a675bd96/activemq-kahadb-store/src/main/java/org/apache/activemq/util/RecoverableRandomAccessFile.java
----------------------------------------------------------------------
diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/util/RecoverableRandomAccessFile.java b/activemq-kahadb-store/src/main/java/org/apache/activemq/util/RecoverableRandomAccessFile.java
index fbb3212..35c1586 100644
--- a/activemq-kahadb-store/src/main/java/org/apache/activemq/util/RecoverableRandomAccessFile.java
+++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/util/RecoverableRandomAccessFile.java
@@ -56,7 +56,9 @@ public class RecoverableRandomAccessFile implements java.io.DataOutput, java.io.
@Override
public void close() throws IOException {
- raf.close();
+ if (raf != null) {
+ raf.close();
+ }
}
@Override