activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [04/11] activemq-artemis git commit: Fix JDBCSequentialFileFactory build on 1.7
Date Thu, 28 Jul 2016 21:27:11 GMT
Fix JDBCSequentialFileFactory build on 1.7


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/2ec6a6d4
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/2ec6a6d4
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/2ec6a6d4

Branch: refs/heads/master
Commit: 2ec6a6d45d020ed3b9bbcbb812ddc27ecfa3969e
Parents: fc35f61
Author: Ville Skyttä <ville.skytta@iki.fi>
Authored: Thu Jul 28 21:24:55 2016 +0300
Committer: Ville Skyttä <ville.skytta@iki.fi>
Committed: Thu Jul 28 23:30:02 2016 +0300

----------------------------------------------------------------------
 .../artemis/jdbc/store/file/JDBCSequentialFileFactory.java       | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2ec6a6d4/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactory.java
----------------------------------------------------------------------
diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactory.java
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactory.java
index 3454757..cf45a8a 100644
--- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactory.java
+++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactory.java
@@ -81,7 +81,9 @@ public class JDBCSequentialFileFactory implements SequentialFileFactory,
ActiveM
    @Override
    public SequentialFile createSequentialFile(String fileName) {
       try {
-         fileLocks.putIfAbsent(fileName, new Object());
+         if (fileLocks.get(fileName) == null) {
+            fileLocks.put(fileName, new Object());
+         }
          JDBCSequentialFile file = new JDBCSequentialFile(this, fileName, executor, dbDriver,
fileLocks.get(fileName));
          files.add(file);
          return file;


Mime
View raw message