Fix JDBCSequentialFileFactory build on 1.7

This commit is contained in:
Ville Skyttä 2016-07-28 21:24:55 +03:00
parent fc35f61287
commit 2ec6a6d45d
1 changed files with 3 additions and 1 deletions

View File

@ -81,7 +81,9 @@ public class JDBCSequentialFileFactory implements SequentialFileFactory, ActiveM
@Override @Override
public SequentialFile createSequentialFile(String fileName) { public SequentialFile createSequentialFile(String fileName) {
try { 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)); JDBCSequentialFile file = new JDBCSequentialFile(this, fileName, executor, dbDriver, fileLocks.get(fileName));
files.add(file); files.add(file);
return file; return file;