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

Fabio Pistolesi
16.00.2015 a1393c28fbaa1385f5a14aa7810034a729bae074
opendj-server-legacy/src/main/java/org/opends/server/backends/persistit/PersistItStorage.java
@@ -784,9 +784,18 @@
  /** {@inheritDoc} */
  @Override
  public boolean isConfigurationChangeAcceptable(PersistitBackendCfg cfg, List<LocalizableMessage> unacceptableReasons)
  public boolean isConfigurationChangeAcceptable(PersistitBackendCfg newCfg,
      List<LocalizableMessage> unacceptableReasons)
  {
    return checkConfigurationDirectories(cfg, unacceptableReasons);
    long newSize = computeSize(newCfg);
    long oldSize = computeSize(config);
    return (newSize <= oldSize || memQuota.isMemoryAvailable(newSize - oldSize))
        && checkConfigurationDirectories(newCfg, unacceptableReasons);
  }
  private long computeSize(PersistitBackendCfg cfg)
  {
    return cfg.getDBCacheSize() > 0 ? cfg.getDBCacheSize() : memQuota.memPercentToBytes(cfg.getDBCachePercent());
  }
  /**