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

Gaetan Boismal
05.26.2015 417be4d6281f4361737794697e742aaf8c35db52
OPENDJ-1934 Little bug fixing

* org.opends.guitools.controlpanel.ui.AbstractIndexPanel.java
* org.opends.guitools.controlpanel.ui.AbstractVLVIndexPanel.java
** Moves exception check after context close. Otherwise exceptions thrown during the close phase may remain uncaught.
2 files modified
4 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractIndexPanel.java 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractVLVIndexPanel.java 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractIndexPanel.java
@@ -393,7 +393,6 @@
      final List<IOException> exceptions = new ArrayList<>();
      final ManagementContext context = LDAPManagementContext.newLDIFManagementContext(
              Installation.getLocal().getCurrentConfigurationFile(), LDAPProfile.getInstance(), exceptions);
      Utilities.throwFirstFrom(exceptions);
      final BackendCfgClient backend = context.getRootConfiguration().getBackend(backendName);
      if (backend instanceof LocalDBBackendCfgClient)
      {
@@ -406,6 +405,7 @@
            (PluggableBackendCfgClient) backend, indexToModify, attributeName, indexTypes, indexEntryLimit);
      }
      context.close();
      Utilities.throwFirstFrom(exceptions);
    }
    catch (final Exception e)
    {
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractVLVIndexPanel.java
@@ -1108,7 +1108,6 @@
      final List<IOException> exceptions = new ArrayList<>();
      final ManagementContext context = LDAPManagementContext.newLDIFManagementContext(
              Installation.getLocal().getCurrentConfigurationFile(), LDAPProfile.getInstance(), exceptions);
      Utilities.throwFirstFrom(exceptions);
      final BackendCfgClient backend = context.getRootConfiguration().getBackend(backendName);
      if (backend instanceof LocalDBBackendCfgClient)
      {
@@ -1121,6 +1120,7 @@
            searchScope, sortOrder);
      }
      context.close();
      Utilities.throwFirstFrom(exceptions);
    }
    catch (final Exception e)
    {