mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Yannick Lecaillez
02.27.2015 dfe6772274d4642b2c332740ea6f65550b8cb855
Fix: Ensure latch is released if beforeImport() throws.
1 files modified
10 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/OnDiskMergeImporter.java 10 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/OnDiskMergeImporter.java
@@ -719,8 +719,14 @@
          final CountDownLatch newLatch = new CountDownLatch(1);
          if (importedContainers.putIfAbsent(container, newLatch) == null)
          {
            importStrategy.beforeImport(container);
            newLatch.countDown();
            try
            {
              importStrategy.beforeImport(container);
            }
            finally
            {
              newLatch.countDown();
            }
          }
          latch = importedContainers.get(container);
        }