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

Yannick Lecaillez
19.36.2015 36d769dbcacdcf7e3952430ea2b178ed32a501b3
Minor cleanup (use diamond & interface)
2 files modified
15 ■■■■ changed files
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/api/EntryCache.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/monitors/EntryCacheMonitorProvider.java 11 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/api/EntryCache.java
@@ -391,11 +391,11 @@
   * be returned to the client if the corresponding monitor entry is
   * requested.
   *
   * @return  A set of attributes containing monitor data that should
   * @return  A list of attributes containing monitor data that should
   *          be returned to the client if the corresponding monitor
   *          entry is requested.
   */
  public abstract ArrayList<Attribute> getMonitorData();
  public abstract List<Attribute> getMonitorData();
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/monitors/EntryCacheMonitorProvider.java
@@ -27,6 +27,8 @@
package org.opends.server.monitors;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.slf4j.LocalizedLogger;
@@ -124,17 +126,14 @@
  /** {@inheritDoc} */
  @Override
  public ArrayList<Attribute> getMonitorData()
  public List<Attribute> getMonitorData()
  {
    ArrayList<Attribute> attrs = new ArrayList<Attribute>();
    if ((entryCache != null) &&
        (monitorConfiguration != null) &&
        (monitorConfiguration.isEnabled())) {
      // Get monitor data from the cache.
      attrs = entryCache.getMonitorData();
      return entryCache.getMonitorData();
    }
    return attrs;
    return Collections.emptyList();
  }
}