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

Jean-Noel Rouvignac
08.48.2015 a89f7014aeb71dba5c94404dfea7eb89e7eeee74
opendj-server-legacy/src/main/java/org/opends/server/plugins/UniqueAttributePlugin.java
@@ -84,7 +84,7 @@
   * The set of attributes that will be requested when performing internal
   * search operations.  This indicates that no attributes should be returned.
   */
  private static final Set<String> SEARCH_ATTRS = new LinkedHashSet<String>(1);
  private static final Set<String> SEARCH_ATTRS = new LinkedHashSet<>(1);
  static
  {
    SEARCH_ATTRS.add(SchemaConstants.NO_ATTRIBUTES);
@@ -154,7 +154,7 @@
      }
    }
    uniqueAttrValue2Dn  = new ConcurrentHashMap<ByteString,DN>();
    uniqueAttrValue2Dn  = new ConcurrentHashMap<>();
    DirectoryServer.registerAlertGenerator(this);
  }
@@ -186,7 +186,7 @@
    }
    DN entryDN = entry.getName();
    List<ByteString> recordedValues = new LinkedList<ByteString>();
    List<ByteString> recordedValues = new LinkedList<>();
    for (AttributeType t : config.getType())
    {
      List<Attribute> attrList = entry.getAttribute(t);
@@ -227,7 +227,7 @@
      return PluginResult.PreOperation.continueOperationProcessing();
    }
    List<ByteString> recordedValues = new LinkedList<ByteString>();
    List<ByteString> recordedValues = new LinkedList<>();
    for (Modification m : modifyOperation.getModifications())
    {
      Attribute a = m.getAttribute();
@@ -358,7 +358,7 @@
      return PluginResult.PreOperation.continueOperationProcessing();
    }
    List<ByteString> recordedValues = new LinkedList<ByteString>();
    List<ByteString> recordedValues = new LinkedList<>();
    RDN newRDN = modifyDNOperation.getNewRDN();
    for (int i=0; i < newRDN.getNumValues(); i++)
    {
@@ -629,8 +629,7 @@
    }
    else
    {
      List<SearchFilter> equalityFilters =
           new ArrayList<SearchFilter>(attrTypes.size());
      List<SearchFilter> equalityFilters = new ArrayList<>(attrTypes.size());
      for (AttributeType t : attrTypes)
      {
        equalityFilters.add(SearchFilter.createEqualityFilter(t, value));
@@ -774,7 +773,7 @@
  @Override
  public Map<String,String> getAlerts()
  {
    Map<String,String> alerts = new LinkedHashMap<String,String>(2);
    Map<String,String> alerts = new LinkedHashMap<>(2);
    alerts.put(ALERT_TYPE_UNIQUE_ATTR_SYNC_CONFLICT,
               ALERT_DESCRIPTION_UNIQUE_ATTR_SYNC_CONFLICT);