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

Jean-Noel Rouvignac
08.48.2015 a89f7014aeb71dba5c94404dfea7eb89e7eeee74
opendj-server-legacy/src/test/java/org/opends/server/api/DITCacheMapTestCase.java
@@ -46,8 +46,7 @@
 */
public class DITCacheMapTestCase extends APITestCase
{
  private static final DITCacheMap<String> ditMap =
          new DITCacheMap<String>();
  private static final DITCacheMap<String> ditMap = new DITCacheMap<>();
  private static final String dn0String =
          "cn=Object0,dc=example,dc=com";
@@ -83,8 +82,7 @@
  private void putAllAndVerify()
  {
    Map<DN,String> hashMap =
          new HashMap<DN,String>();
    Map<DN,String> hashMap = new HashMap<>();
    hashMap.put(dn0, dn0String);
    hashMap.put(dn1, dn1String);
@@ -333,7 +331,7 @@
    assertFalse(entrySet.isEmpty());
    assertEquals(entrySet.size(), 10);
    Iterator<Entry<DN,String>> iterator = entrySet.iterator();
    Map<DN,String> tempMap = new HashMap<DN,String>();
    Map<DN,String> tempMap = new HashMap<>();
    while (iterator.hasNext())
    {
      Entry<DN,String> entry = iterator.next();
@@ -381,10 +379,8 @@
    putAllAndVerify();
    Set<String> removeSet = new HashSet<String>();
    assertTrue(ditMap.removeSubtree(DN.valueOf(
            "dc=example,dc=com"),
            removeSet));
    Set<String> removeSet = new HashSet<>();
    assertTrue(ditMap.removeSubtree(DN.valueOf("dc=example,dc=com"), removeSet));
    assertFalse(removeSet.isEmpty());
    assertEquals(removeSet.size(), 10);
    assertTrue(removeSet.contains(dn0String));