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

matthew_swift
14.00.2007 44811bc0ac80b3decf81e72f0da0f05f5efdf979
Fix bug in aggregation property change listener call-back which was incorrectly failing when any property was modified, not just when the "disabled" property was modified.
1 files modified
17 ■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/admin/AggregationPropertyDefinition.java 17 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/admin/AggregationPropertyDefinition.java
@@ -321,8 +321,18 @@
     * {@inheritDoc}
     */
    public ConfigChangeResult applyConfigurationChange(S configuration) {
      throw new IllegalStateException("Attempting to disable a referenced "
          + configuration.definition().getUserFriendlyName());
      PropertyProvider provider = configuration.properties();
      Collection<Boolean> values = provider
          .getPropertyValues(getTargetEnabledPropertyDefinition());
      if (values.iterator().next() == false) {
        // This should not happen - the
        // isConfigurationChangeAcceptable() call-back should have
        // trapped this.
        throw new IllegalStateException("Attempting to disable a referenced "
            + configuration.definition().getUserFriendlyName());
      } else {
        return new ConfigChangeResult(ResultCode.SUCCESS, false);
      }
    }
@@ -383,6 +393,9 @@
     * {@inheritDoc}
     */
    public ConfigChangeResult applyConfigurationDelete(S configuration) {
      // This should not happen - the
      // isConfigurationDeleteAcceptable() call-back should have
      // trapped this.
      if (configuration.dn().equals(dn)) {
        throw new IllegalStateException("Attempting to delete a referenced "
            + configuration.definition().getUserFriendlyName());