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

Jean-Noel Rouvignac
19.47.2015 04f34e5caa2b83751287ff30c0b3f6283ebacd72
opendj-sdk/opendj-copyright-maven-plugin/src/main/java/org/forgerock/maven/CopyrightAbstractMojo.java
@@ -79,22 +79,22 @@
    private String scmRepositoryUrl;
    /** The file extensions to test. */
    public static final List<String> CHECKED_EXTENSIONS = new LinkedList<String>(Arrays.asList(
    public static final List<String> CHECKED_EXTENSIONS = new LinkedList<>(Arrays.asList(
            "bat", "c", "h", "html", "java", "ldif", "Makefile", "mc", "sh", "txt", "xml", "xsd", "xsl"));
    private static final List<String> EXCLUDED_END_COMMENT_BLOCK_TOKEN = new LinkedList<String>(Arrays.asList(
    private static final List<String> EXCLUDED_END_COMMENT_BLOCK_TOKEN = new LinkedList<>(Arrays.asList(
                    "*/", "-->"));
    private static final List<String> SUPPORTED_COMMENT_MIDDLE_BLOCK_TOKEN = new LinkedList<String>(Arrays.asList(
    private static final List<String> SUPPORTED_COMMENT_MIDDLE_BLOCK_TOKEN = new LinkedList<>(Arrays.asList(
                    "*", "#", "rem", "!"));
    private static final List<String> SUPPORTED_START_BLOCK_COMMENT_TOKEN = new LinkedList<String>(Arrays.asList(
    private static final List<String> SUPPORTED_START_BLOCK_COMMENT_TOKEN = new LinkedList<>(Arrays.asList(
                    "/*", "<!--"));
    /** The string representation of the current year. */
    Integer currentYear = Calendar.getInstance().get(Calendar.YEAR);
    private final List<String> incorrectCopyrightFilePaths = new LinkedList<String>();
    private final List<String> incorrectCopyrightFilePaths = new LinkedList<>();
    /** The overall SCM Client Manager. */
    private ScmManager scmManager;
@@ -166,7 +166,7 @@
            }
            List<ScmFile> scmFiles = statusResult.getChangedFiles();
            List<String> changedFilePaths = new LinkedList<String>();
            List<String> changedFilePaths = new LinkedList<>();
            for (ScmFile scmFile : scmFiles) {
                if (scmFile.getStatus() != ScmFileStatus.UNKNOWN) {
                    changedFilePaths.add(scmFile.getPath());
opendj-sdk/opendj-copyright-maven-plugin/src/main/java/org/forgerock/maven/UpdateCopyrightMojo.java
@@ -109,7 +109,7 @@
    private final class UpdateCopyrightFile {
        private final String filePath;
        private final List<String> bufferedLines = new LinkedList<String>();
        private final List<String> bufferedLines = new LinkedList<>();
        private boolean copyrightUpdated;
        private boolean lineBeforeCopyrightReaded;
        private boolean commentBlockEnded;
opendj-sdk/opendj-copyright-maven-plugin/src/test/java/org/forgerock/maven/UpdateCopyrightTestCase.java
@@ -97,8 +97,8 @@
    public void testUpdateCopyright(String testCaseFolderPath, String lineBeforeCopyrightToken,
            int nbLinesToSkip, int numberSpacesIndentation, String newPortionCopyrightString,
            String newCopyrightStartString, String copyrightEndToken, String newCopyrightOwnerStr) throws Exception {
        List<String> testFilePaths = new LinkedList<String>();
        List<String> updatedTestFilePaths = new LinkedList<String>();
        List<String> testFilePaths = new LinkedList<>();
        List<String> updatedTestFilePaths = new LinkedList<>();
        File[] changedFiles = new File(RESOURCE_DIR, testCaseFolderPath)
            .listFiles(new FilenameExtensionFilter(".txt"));
opendj-sdk/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateMessageFileMojo.java
@@ -98,9 +98,7 @@
    /**
     * One-line descriptions for log reference categories.
     */
    private static final HashMap<String, LocalizableMessage> CATEGORY_DESCRIPTIONS =
            new HashMap<String, LocalizableMessage>();
    private static final HashMap<String, LocalizableMessage> CATEGORY_DESCRIPTIONS = new HashMap<>();
    static {
        CATEGORY_DESCRIPTIONS.put("ACCESS_CONTROL", CATEGORY_ACCESS_CONTROL.get());
        CATEGORY_DESCRIPTIONS.put("ADMIN", CATEGORY_ADMIN.get());
@@ -200,7 +198,7 @@
         * @return A map of this log reference entry, suitable for use with FreeMarker.
         */
        public Map<String, Object> toMap() {
            Map<String, Object> map = new HashMap<String, Object>();
            Map<String, Object> map = new HashMap<>();
            String id = (ordinal != null) ? ordinal.toString() : MESSAGE_NO_ORDINAL.get().toString();
            map.put("xmlId", "log-ref-" + xmlId);
            map.put("id", MESSAGE_ORDINAL_ID.get(id));
@@ -238,10 +236,10 @@
         * @return A map of this log reference category, suitable for use with FreeMarker.
         */
        public Map<String, Object> toMap() {
            Map<String, Object> map = new HashMap<String, Object>();
            Map<String, Object> map = new HashMap<>();
            map.put("id", category);
            map.put("category", MESSAGE_CATEGORY.get(category));
            List<Map<String, Object>> messageEntries = new LinkedList<Map<String, Object>>();
            List<Map<String, Object>> messageEntries = new LinkedList<>();
            for (MessageRefEntry entry : messages) {
                messageEntries.add(entry.toMap());
            }
@@ -340,13 +338,13 @@
            throw new MojoExecutionException(errorMsg);
        }
        Map<String, Object> map = new HashMap<String, Object>();
        Map<String, Object> map = new HashMap<>();
        map.put("year", new SimpleDateFormat("yyyy").format(new Date()));
        map.put("lang", locale);
        map.put("title", LOG_REF_TITLE.get());
        map.put("indexterm", LOG_REF_INDEXTERM.get());
        map.put("intro", LOG_REF_INTRO.get());
        List<Map<String, Object>> categories = new LinkedList<Map<String, Object>>();
        List<Map<String, Object>> categories = new LinkedList<>();
        for (String category : messageFileNames) {
            File source = new File(messagesDirectory, category + ".properties");
            categories.add(getCategoryMap(source, category.toUpperCase()));
@@ -375,8 +373,8 @@
        try {
            properties.load(new FileInputStream(source));
            Map<MessagePropertyKey, String> errorMessages = loadErrorProperties(properties);
            TreeSet<MessageRefEntry> messageRefEntries = new TreeSet<MessageRefEntry>();
            Set<Integer> usedOrdinals = new HashSet<Integer>();
            TreeSet<MessageRefEntry> messageRefEntries = new TreeSet<>();
            Set<Integer> usedOrdinals = new HashSet<>();
            for (MessagePropertyKey msgKey : errorMessages.keySet()) {
                String formatString = errorMessages.get(msgKey).replaceAll("<", "&lt;");
@@ -398,7 +396,7 @@
    }
    private Map<MessagePropertyKey, String> loadErrorProperties(Properties properties) throws Exception {
        Map<MessagePropertyKey, String> errorMessage = new TreeMap<MessagePropertyKey, String>();
        Map<MessagePropertyKey, String> errorMessage = new TreeMap<>();
        for (Object propO : properties.keySet()) {
            String propKey = propO.toString();
            try {
opendj-sdk/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateRefEntriesMojo.java
@@ -110,7 +110,7 @@
    private URLClassLoader getBootToolsClassLoader() throws MojoFailureException {
        try {
            List<String> runtimeClasspathElements = project.getRuntimeClasspathElements();
            Set<URL> runtimeUrls = new LinkedHashSet<URL>();
            Set<URL> runtimeUrls = new LinkedHashSet<>();
            for (String element : runtimeClasspathElements) {
                runtimeUrls.add(new File(element).toURI().toURL());
            }
@@ -141,7 +141,7 @@
        final String toolScript = tool.getName();
        final String toolSects  = pathsToXIncludes(tool.getTrailingSectionPaths());
        final String toolClass  = tool.getApplication();
        List<String> commands   = new LinkedList<String>();
        List<String> commands   = new LinkedList<>();
        commands.add(getJavaCommand());
        commands.addAll(getJavaArgs(toolScript, toolSects));
        commands.add("-classpath");
@@ -208,7 +208,7 @@
     * @return The Java args for running a tool.
     */
    private List<String> getJavaArgs(final String scriptName, final String trailingSections) {
        List<String> args = new LinkedList<String>();
        List<String> args = new LinkedList<>();
        args.add("-Dorg.forgerock.opendj.gendoc=true");
        args.add("-Dorg.opends.server.ServerRoot=" + System.getProperty("java.io.tmpdir"));
        args.add("-Dcom.forgerock.opendj.ldap.tools.scriptName=" + scriptName);
opendj-sdk/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateSchemaDocMojo.java
@@ -92,7 +92,7 @@
     * @return A DocBook XML Section element documenting supported locales and language subtypes.
     */
    private String getLocalesAndSubTypesDocumentation(final Locale currentLocale) {
        final Map<String, Object> map = new HashMap<String, Object>();
        final Map<String, Object> map = new HashMap<>();
        map.put("year", new SimpleDateFormat("yyyy").format(new Date()));
        map.put("lang", getTagFromLocale(currentLocale));
        map.put("title", DOC_LOCALE_SECTION_TITLE.get());
@@ -183,7 +183,7 @@
     * @return A map of languages to Locale documentation containers.
     */
    private Map<String, LocaleDoc> getLanguagesToLocalesMap(final Locale currentLocale) {
        Map<String, LocaleDoc> locales = new TreeMap<String, LocaleDoc>();
        Map<String, LocaleDoc> locales = new TreeMap<>();
        for (String tag : localeTagsToOids.keySet()) {
            final Locale locale = getLocaleFromTag(tag);
            if (locale == null) {
@@ -210,15 +210,15 @@
     * @return A map of information for documenting supported locales.
     */
    private Map<String, Object> getLocalesDocMap(final Locale currentLocale) {
        final Map<String, Object> result = new HashMap<String, Object>();
        final Map<String, Object> result = new HashMap<>();
        result.put("title", DOC_SUPPORTED_LOCALES_TITLE.get());
        result.put("indexTerm", DOC_SUPPORTED_LOCALES_INDEXTERM.get());
        final Map<String, LocaleDoc> localesMap = getLanguagesToLocalesMap(currentLocale);
        final Set<String> sortedLanguages = localesMap.keySet();
        final List<Map<String, Object>> locales = new LinkedList<Map<String, Object>>();
        final List<Map<String, Object>> locales = new LinkedList<>();
        for (final String language : sortedLanguages) {
            final LocaleDoc locale = localesMap.get(language);
            final Map<String, Object> map = new HashMap<String, Object>();
            final Map<String, Object> map = new HashMap<>();
            map.put("language", locale.language);
            map.put("tag", DOC_LOCALE_TAG.get(locale.tag));
            map.put("oid", DOC_LOCALE_OID.get(locale.oid));
@@ -234,12 +234,12 @@
     * @return A map of information for documenting supported language subtypes.
     */
    private Map<String, Object> getSubTypesDocMap(final Locale currentLocale) {
        final Map<String, Object> result = new HashMap<String, Object>();
        final Map<String, Object> result = new HashMap<>();
        result.put("title", DOC_SUPPORTED_SUBTYPES_TITLE.get());
        result.put("indexTerm", DOC_SUPPORTED_SUBTYPES_INDEXTERM.get());
        final List<Map<String, Object>> locales = new LinkedList<Map<String, Object>>();
        final List<Map<String, Object>> locales = new LinkedList<>();
        for (final String tag : localeTagsToOids.keySet()) {
            final Map<String, Object> map = new HashMap<String, Object>();
            final Map<String, Object> map = new HashMap<>();
            int idx = tag.indexOf('-');
            if (idx == -1) {
                final Locale locale = getLocaleFromTag(tag);
opendj-sdk/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLAddOperation.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions Copyright 2012-2014 ForgeRock AS.
 *      Portions Copyright 2012-2015 ForgeRock AS.
 */
package org.opends.dsml.protocol;
@@ -91,12 +91,12 @@
    addResponse.setRequestID(addRequest.getRequestID());
    ByteString dnStr = ByteString.valueOf(addRequest.getDn());
    ArrayList<RawAttribute> attributes = new ArrayList<RawAttribute>();
    ArrayList<RawAttribute> attributes = new ArrayList<>();
    List<DsmlAttr> addList = addRequest.getAttr();
    for(DsmlAttr attr : addList)
    {
      ArrayList<ByteString> values = new ArrayList<ByteString>();
      ArrayList<ByteString> values = new ArrayList<>();
      List<Object> vals = attr.getValue();
      for(Object val : vals)
      {
opendj-sdk/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLModifyOperation.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions Copyright 2012-2014 ForgeRock AS.
 *      Portions Copyright 2012-2015 ForgeRock AS.
 */
package org.opends.dsml.protocol;
@@ -92,8 +92,7 @@
    LDAPResult modResponse = objFactory.createLDAPResult();
    modResponse.setRequestID(modifyRequest.getRequestID());
    ArrayList<RawModification> modifications =
         new ArrayList<RawModification> ();
    ArrayList<RawModification> modifications = new ArrayList<>();
    // Read the modification type from the DSML request.
    List<DsmlModification> mods = modifyRequest.getModification();
@@ -111,10 +110,9 @@
      // Read the attribute name and values.
      String attrType = attr.getName();
      ArrayList<ByteString> values = new ArrayList<ByteString> ();
      ArrayList<ByteString> values = new ArrayList<>();
      List<Object> vals = attr.getValue();
      for(Object val : vals)
      for (Object val : attr.getValue())
      {
        values.add(ByteStringUtility.convertValue(val));
      }
opendj-sdk/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLSearchOperation.java
@@ -98,7 +98,7 @@
      throws LDAPException, IOException
  {
    List<JAXBElement<?>> list = filterSet.getFilterGroup();
    ArrayList<RawFilter> filters = new ArrayList<RawFilter>(list.size());
    ArrayList<RawFilter> filters = new ArrayList<>(list.size());
    for (JAXBElement<?> filter : list)
    {
@@ -245,7 +245,7 @@
      throws LDAPException, IOException
  {
    List<JAXBElement<?>> list = filterSet.getFilterGroup();
    ArrayList<RawFilter> filters = new ArrayList<RawFilter>(list.size());
    ArrayList<RawFilter> filters = new ArrayList<>(list.size());
    for (JAXBElement<?> filter : list)
    {
@@ -291,8 +291,7 @@
        throws LDAPException, IOException
  {
    List<Object> anyo = sf.getAny();
    ArrayList<ByteString> subAnyElements = new ArrayList<ByteString>(anyo
        .size());
    ArrayList<ByteString> subAnyElements = new ArrayList<>(anyo.size());
    for (Object o : anyo)
    {
@@ -520,7 +519,7 @@
      scope = SearchScope.BASE_OBJECT;
    }
    LinkedHashSet<String> attributes = new LinkedHashSet<String>();
    LinkedHashSet<String> attributes = new LinkedHashSet<>();
    // Get the list of attributes.
    AttributeDescriptions attrDescriptions = searchRequest.getAttributes();
    if (attrDescriptions != null)
opendj-sdk/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/DSMLServlet.java
@@ -155,7 +155,7 @@
  private String trustStorePasswordValue;
  private Boolean trustAll;
  private Boolean useHTTPAuthzID;
  private HashSet<String> exopStrings = new HashSet<String>();
  private HashSet<String> exopStrings = new HashSet<>();
  /**
   * This method will be called by the Servlet Container when
@@ -251,10 +251,9 @@
      LDAPConnection connection, String authorizationID)
      throws LDAPConnectionException
  {
    LinkedHashSet<String>attributes = new LinkedHashSet<String>(1);
    LinkedHashSet<String>attributes = new LinkedHashSet<>(1);
    attributes.add(SchemaConstants.NO_ATTRIBUTES);
    ArrayList<org.opends.server.types.Control> controls =
        new ArrayList<org.opends.server.types.Control>(1);
    ArrayList<org.opends.server.types.Control> controls = new ArrayList<>(1);
    org.opends.server.types.Control proxyAuthzControl =
        new ProxiedAuthV2Control(true, ByteString.valueOf(authorizationID));
    controls.add(proxyAuthzControl);
@@ -726,8 +725,7 @@
                                            ObjectFactory objFactory,
                                            org.opends.server.types.Control proxyAuthzControl,
                                            DsmlMessage request) {
    ArrayList<org.opends.server.types.Control> controls =
        new ArrayList<org.opends.server.types.Control>(1);
    ArrayList<org.opends.server.types.Control> controls = new ArrayList<>(1);
    if (proxyAuthzControl != null)
    {
      controls.add(proxyAuthzControl);
opendj-sdk/opendj-server-legacy/src/dsml/org/opends/dsml/protocol/ResultCodeFactory.java
@@ -33,8 +33,7 @@
 */
public class ResultCodeFactory
{
  static HashMap<Integer,LDAPResultCode> codeToDescr =
    new HashMap<Integer,LDAPResultCode>();
  static HashMap<Integer,LDAPResultCode> codeToDescr = new HashMap<>();
  static
  {
    codeToDescr.put(0, LDAPResultCode.SUCCESS);
@@ -49,8 +48,7 @@
    codeToDescr.put(8, LDAPResultCode.STRONG_AUTH_REQUIRED);
    codeToDescr.put(10, LDAPResultCode.REFERRAL);
    codeToDescr.put(11, LDAPResultCode.ADMIN_LIMIT_EXCEEDED);
    codeToDescr.put(12,
      LDAPResultCode.UNAVAILABLE_CRITICAL_EXTENSION);
    codeToDescr.put(12, LDAPResultCode.UNAVAILABLE_CRITICAL_EXTENSION);
    codeToDescr.put(13, LDAPResultCode.CONFIDENTIALITY_REQUIRED);
    codeToDescr.put(14, LDAPResultCode.SASL_BIND_IN_PROGRESS);
    codeToDescr.put(16, LDAPResultCode.NO_SUCH_ATTRIBUTE);
opendj-sdk/opendj-server-legacy/src/main/java/org/forgerock/opendj/adapter/server3x/Converters.java
@@ -94,7 +94,7 @@
        if (sdkEntry != null) {
            org.opends.server.types.Entry entry =
                new org.opends.server.types.Entry(to(sdkEntry.getName()), null, null, null);
            List<ByteString> duplicateValues = new ArrayList<ByteString>();
            List<ByteString> duplicateValues = new ArrayList<>();
            for (org.opends.server.types.Attribute attribute : toAttributes(sdkEntry.getAllAttributes())) {
                entry.addAttribute(attribute, duplicateValues);
            }
@@ -118,7 +118,7 @@
                new org.opends.server.types.Entry(to(value.getName()), null, null, null);
            org.opends.server.types.SearchResultEntry searchResultEntry =
                new org.opends.server.types.SearchResultEntry(entry, to(value.getControls()));
            List<ByteString> duplicateValues = new ArrayList<ByteString>();
            List<ByteString> duplicateValues = new ArrayList<>();
            for (org.opends.server.types.Attribute attribute : toAttributes(value.getAllAttributes())) {
                searchResultEntry.addAttribute(attribute, duplicateValues);
            }
@@ -153,7 +153,7 @@
     */
    public static SortedSet<org.opends.server.types.DN> to(final SortedSet<DN> dnSet) {
        try {
            SortedSet<org.opends.server.types.DN> newSet = new TreeSet<org.opends.server.types.DN>();
            SortedSet<org.opends.server.types.DN> newSet = new TreeSet<>();
            for (DN dn : dnSet) {
                newSet.add(org.opends.server.types.DN.valueOf(dn.toString()));
            }
@@ -273,8 +273,7 @@
     */
    public static List<org.opends.server.types.Control> to(
            final List<org.forgerock.opendj.ldap.controls.Control> listOfControl) {
        List<org.opends.server.types.Control> toListOfControl =
                new ArrayList<org.opends.server.types.Control>(listOfControl.size());
        List<org.opends.server.types.Control> toListOfControl = new ArrayList<>(listOfControl.size());
        for (org.forgerock.opendj.ldap.controls.Control c : listOfControl) {
            toListOfControl.add(to(c));
        }
@@ -291,8 +290,7 @@
     */
    public static org.opends.server.types.RawAttribute to(
            final org.forgerock.opendj.ldap.Attribute attribute) {
        ArrayList<ByteString> listAttributeValues =
                new ArrayList<ByteString>(attribute.size());
        ArrayList<ByteString> listAttributeValues = new ArrayList<>(attribute.size());
        Collections.addAll(listAttributeValues, attribute.toArray());
        return new LDAPAttribute(attribute.getAttributeDescriptionAsString(), listAttributeValues);
    }
@@ -309,8 +307,7 @@
    public static List<org.opends.server.types.RawAttribute> to(
            final Iterable<org.forgerock.opendj.ldap.Attribute> listOfAttributes) {
        List<org.opends.server.types.RawAttribute> toListOfAttributes =
                new ArrayList<org.opends.server.types.RawAttribute>(
                        ((Collection<org.forgerock.opendj.ldap.Attribute>) listOfAttributes).size());
                new ArrayList<>(((Collection<?>) listOfAttributes).size());
        for (org.forgerock.opendj.ldap.Attribute a : listOfAttributes) {
            toListOfAttributes.add(to(a));
        }
@@ -344,7 +341,7 @@
    public static List<org.opends.server.types.RawModification> toRawModifications(
            final List<org.forgerock.opendj.ldap.Modification> listOfModifications) {
        List<org.opends.server.types.RawModification> toListOfModifications =
                new ArrayList<org.opends.server.types.RawModification>(listOfModifications.size());
                new ArrayList<>(listOfModifications.size());
        for (org.forgerock.opendj.ldap.Modification m : listOfModifications) {
            toListOfModifications.add(to(m));
        }
@@ -381,8 +378,7 @@
    public static List<org.opends.server.types.Attribute> toAttributes(
            final Iterable<org.forgerock.opendj.ldap.Attribute> listOfAttributes) {
        List<org.opends.server.types.Attribute> toListOfAttributes =
                new ArrayList<org.opends.server.types.Attribute>(
                        ((Collection<org.forgerock.opendj.ldap.Attribute>) listOfAttributes).size());
                new ArrayList<>(((Collection<?>) listOfAttributes).size());
        for (org.forgerock.opendj.ldap.Attribute a : listOfAttributes) {
            toListOfAttributes.add(toAttribute(a));
        }
@@ -415,9 +411,7 @@
     */
    public static List<org.opends.server.types.Modification> toModifications(
            final List<org.forgerock.opendj.ldap.Modification> listOfModifications) {
        List<org.opends.server.types.Modification> toListOfModifications =
                new ArrayList<org.opends.server.types.Modification>(
                        listOfModifications.size());
        List<org.opends.server.types.Modification> toListOfModifications = new ArrayList<>(listOfModifications.size());
        for (org.forgerock.opendj.ldap.Modification m : listOfModifications) {
            toListOfModifications.add(toModification(m));
        }
@@ -494,8 +488,7 @@
     */
    public static List<org.forgerock.opendj.ldap.controls.Control> from(
            final List<org.opends.server.types.Control> listOfControl) {
        List<org.forgerock.opendj.ldap.controls.Control> fromListofControl =
                new ArrayList<org.forgerock.opendj.ldap.controls.Control>(listOfControl.size());
        List<org.forgerock.opendj.ldap.controls.Control> fromListofControl = new ArrayList<>(listOfControl.size());
        for (org.opends.server.types.Control c : listOfControl) {
            fromListofControl.add(from(c));
        }
@@ -545,8 +538,7 @@
    public static List<org.forgerock.opendj.ldap.Attribute> from(
            final Iterable<org.opends.server.types.Attribute> listOfAttributes) {
        List<org.forgerock.opendj.ldap.Attribute> fromListofAttributes =
                new ArrayList<org.forgerock.opendj.ldap.Attribute>(
                        ((Collection<org.opends.server.types.Attribute>) listOfAttributes).size());
                new ArrayList<>(((Collection<?>) listOfAttributes).size());
        for (org.opends.server.types.Attribute a : listOfAttributes) {
            fromListofAttributes.add(from(a));
        }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/admin/ads/ReplicaDescriptor.java
@@ -40,7 +40,7 @@
  private SuffixDescriptor suffix;
  private int entries = -1;
  private ServerDescriptor server;
  private Set<String> replicationServers = new HashSet<String>();
  private Set<String> replicationServers = new HashSet<>();
  private int replicationId = -1;
  private int missingChanges = -1;
  private long ageOfOldestMissingChange = -1;
@@ -135,7 +135,7 @@
   */
  public Set<String> getReplicationServers()
  {
    return new HashSet<String>(replicationServers);
    return new HashSet<>(replicationServers);
  }
  /**
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/admin/ads/ServerDescriptor.java
@@ -60,12 +60,9 @@
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  private static final String TRUSTSTORE_DN = "cn=ads-truststore";
  private final Map<ADSContext.ServerProperty, Object> adsProperties =
    new HashMap<ADSContext.ServerProperty, Object>();
  private final Set<ReplicaDescriptor> replicas =
    new HashSet<ReplicaDescriptor>();
  private final Map<ServerProperty, Object> serverProperties =
    new HashMap<ServerProperty, Object>();
  private final Map<ADSContext.ServerProperty, Object> adsProperties = new HashMap<>();
  private final Set<ReplicaDescriptor> replicas = new HashSet<>();
  private final Map<ServerProperty, Object> serverProperties = new HashMap<>();
  private TopologyCacheException lastException;
  /**
@@ -133,7 +130,7 @@
   */
  public Set<ReplicaDescriptor> getReplicas()
  {
    return new HashSet<ReplicaDescriptor>(replicas);
    return new HashSet<>(replicas);
  }
  /**
@@ -410,11 +407,9 @@
   */
  public List<Integer> getEnabledAdministrationPorts()
  {
    List<Integer> ports = new ArrayList<Integer>(1);
    ArrayList<?> s = (ArrayList<?>)serverProperties.get(
        ServerProperty.ADMIN_ENABLED);
    ArrayList<?> p = (ArrayList<?>)serverProperties.get(
        ServerProperty.ADMIN_PORT);
    List<Integer> ports = new ArrayList<>(1);
    ArrayList<?> s = (ArrayList<?>)serverProperties.get(ServerProperty.ADMIN_ENABLED);
    ArrayList<?> p = (ArrayList<?>)serverProperties.get(ServerProperty.ADMIN_PORT);
    if (s != null)
    {
      for (int i=0; i<s.size(); i++)
@@ -478,8 +473,7 @@
    }
    else
    {
      ArrayList<ADSContext.ServerProperty> enabledAttrs =
        new ArrayList<ADSContext.ServerProperty>();
      ArrayList<ADSContext.ServerProperty> enabledAttrs = new ArrayList<>();
      if (securePreferred)
      {
@@ -777,11 +771,11 @@
    try
    {
      ArrayList<Integer> ldapPorts = new ArrayList<Integer>();
      ArrayList<Integer> ldapsPorts = new ArrayList<Integer>();
      ArrayList<Boolean> ldapEnabled = new ArrayList<Boolean>();
      ArrayList<Boolean> ldapsEnabled = new ArrayList<Boolean>();
      ArrayList<Boolean> startTLSEnabled = new ArrayList<Boolean>();
      ArrayList<Integer> ldapPorts = new ArrayList<>();
      ArrayList<Integer> ldapsPorts = new ArrayList<>();
      ArrayList<Boolean> ldapEnabled = new ArrayList<>();
      ArrayList<Boolean> ldapsEnabled = new ArrayList<>();
      ArrayList<Boolean> startTLSEnabled = new ArrayList<>();
      desc.serverProperties.put(ServerProperty.LDAP_PORT, ldapPorts);
      desc.serverProperties.put(ServerProperty.LDAPS_PORT, ldapsPorts);
@@ -852,8 +846,8 @@
      // Even if we have a single port, use an array to be consistent with
      // other protocols.
      ArrayList<Integer> adminPorts = new ArrayList<Integer>();
      ArrayList<Boolean> adminEnabled = new ArrayList<Boolean>();
      ArrayList<Integer> adminPorts = new ArrayList<>();
      ArrayList<Boolean> adminEnabled = new ArrayList<>();
      if (adminConnectorPort != null)
      {
        adminPorts.add(adminConnectorPort);
@@ -886,10 +880,10 @@
    NamingEnumeration<SearchResult> listeners =
      ctx.search(jndiName, filter, ctls);
    ArrayList<Integer> jmxPorts = new ArrayList<Integer>();
    ArrayList<Integer> jmxsPorts = new ArrayList<Integer>();
    ArrayList<Boolean> jmxEnabled = new ArrayList<Boolean>();
    ArrayList<Boolean> jmxsEnabled = new ArrayList<Boolean>();
    ArrayList<Integer> jmxPorts = new ArrayList<>();
    ArrayList<Integer> jmxsPorts = new ArrayList<>();
    ArrayList<Boolean> jmxEnabled = new ArrayList<>();
    ArrayList<Boolean> jmxsEnabled = new ArrayList<>();
    desc.serverProperties.put(ServerProperty.JMX_PORT, jmxPorts);
    desc.serverProperties.put(ServerProperty.JMXS_PORT, jmxsPorts);
@@ -968,7 +962,7 @@
          }
          else
          {
            entries = new HashSet<String>();
            entries = new HashSet<>();
          }
          Set<ReplicaDescriptor> replicas = desc.getReplicas();
@@ -994,7 +988,7 @@
              replica.setServer(desc);
              replica.setBackendName(id);
              replicas.add(replica);
              HashSet<ReplicaDescriptor> r = new HashSet<ReplicaDescriptor>();
              HashSet<ReplicaDescriptor> r = new HashSet<>();
              r.add(replica);
              suffix.setReplicas(r);
              replica.setSuffix(suffix);
@@ -1078,7 +1072,7 @@
    desc.serverProperties.put(ServerProperty.IS_REPLICATION_ENABLED,
        Boolean.valueOf(replicationEnabled));
    Set<String> allReplicationServers = new LinkedHashSet<String>();
    Set<String> allReplicationServers = new LinkedHashSet<>();
    if (cacheFilter.searchBaseDNInformation())
    {
@@ -1118,7 +1112,7 @@
                replica.setReplicationId(id);
                // Keep the values of the replication servers in lower case
                // to make use of Sets as String simpler.
                LinkedHashSet<String> repServers = new LinkedHashSet<String>();
                LinkedHashSet<String> repServers = new LinkedHashSet<>();
                for (String s: replicationServers)
                {
                  repServers.add(s.toLowerCase());
@@ -1177,7 +1171,7 @@
        Set<String> values = getValues(sr, "ds-cfg-replication-server");
        // Keep the values of the replication servers in lower case
        // to make use of Sets as String simpler.
        LinkedHashSet<String> repServers = new LinkedHashSet<String>();
        LinkedHashSet<String> repServers = new LinkedHashSet<>();
        for (String s: values)
        {
          repServers.add(s.toLowerCase());
@@ -1382,7 +1376,7 @@
      sc.setReturningAttributes(new String[] { SchemaConstants.NO_ATTRIBUTES });
      NamingEnumeration<SearchResult> ne = ctx.search(TRUSTSTORE_DN,
          "(objectclass=ds-cfg-instance-key)", sc);
      ArrayList<String> dnsToDelete = new ArrayList<String>();
      ArrayList<String> dnsToDelete = new ArrayList<>();
      try
      {
        while (ne.hasMore())
@@ -1418,7 +1412,7 @@
  private static Set<String> getBaseDNEntryCount(InitialLdapContext ctx,
      String backendID) throws NamingException
  {
    LinkedHashSet<String> v = new LinkedHashSet<String>();
    LinkedHashSet<String> v = new LinkedHashSet<>();
    SearchControls ctls = new SearchControls();
    ctls.setSearchScope(SearchControls.ONELEVEL_SCOPE);
    ctls.setReturningAttributes(
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/admin/ads/SuffixDescriptor.java
@@ -38,7 +38,7 @@
public class SuffixDescriptor
{
  private String suffixDN;
  private Set<ReplicaDescriptor> replicas = new HashSet<ReplicaDescriptor>();
  private Set<ReplicaDescriptor> replicas = new HashSet<>();
  /**
   * Returns the DN associated with this suffix descriptor.
@@ -65,7 +65,7 @@
   */
  public Set<ReplicaDescriptor> getReplicas()
  {
    return new HashSet<ReplicaDescriptor>(replicas);
    return new HashSet<>(replicas);
  }
  /**
@@ -86,7 +86,7 @@
   */
  public Set<String> getReplicationServers()
  {
    Set<String> replicationServers = new HashSet<String>();
    Set<String> replicationServers = new HashSet<>();
    for (ReplicaDescriptor replica : getReplicas())
    {
      replicationServers.addAll(replica.getReplicationServers());
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/admin/ads/TopologyCache.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2011-2014 ForgeRock AS
 *      Portions Copyright 2011-2015 ForgeRock AS
 */
package org.opends.admin.ads;
@@ -70,12 +70,9 @@
  private final int timeout;
  private final String bindDN;
  private final String bindPwd;
  private final Set<ServerDescriptor> servers =
      new HashSet<ServerDescriptor>();
  private final Set<SuffixDescriptor> suffixes =
      new HashSet<SuffixDescriptor>();
  private final Set<PreferredConnection> preferredConnections =
      new LinkedHashSet<PreferredConnection>();
  private final Set<ServerDescriptor> servers = new HashSet<>();
  private final Set<SuffixDescriptor> suffixes = new HashSet<>();
  private final Set<PreferredConnection> preferredConnections = new LinkedHashSet<>();
  private final TopologyCacheFilter filter = new TopologyCacheFilter();
  private static final int MULTITHREAD_TIMEOUT = 90 * 1000;
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
@@ -116,7 +113,7 @@
      Set<Map<ServerProperty, Object>> adsServers =
          adsContext.readServerRegistry();
      Set<ServerLoader> threadSet = new HashSet<ServerLoader>();
      Set<ServerLoader> threadSet = new HashSet<>();
      for (Map<ServerProperty, Object> serverProperties : adsServers)
      {
        ServerLoader t = getServerLoader(serverProperties);
@@ -128,8 +125,7 @@
       * Try to consolidate things (even if the data is not complete).
       */
      HashMap<LdapName, Set<SuffixDescriptor>> hmSuffixes =
          new HashMap<LdapName, Set<SuffixDescriptor>>();
      HashMap<LdapName, Set<SuffixDescriptor>> hmSuffixes = new HashMap<>();
      for (ServerLoader loader : threadSet)
      {
        ServerDescriptor descriptor = loader.getServerDescriptor();
@@ -165,7 +161,7 @@
          {
            if (sufs == null)
            {
              sufs = new HashSet<SuffixDescriptor>();
              sufs = new HashSet<>();
              hmSuffixes.put(dn, sufs);
            }
            sufs.add(replica.getSuffix());
@@ -228,7 +224,7 @@
        Set<ReplicaDescriptor> candidateReplicas = getCandidateReplicas(server);
        if (!candidateReplicas.isEmpty())
        {
          Set<ReplicaDescriptor> updatedReplicas = new HashSet<ReplicaDescriptor>();
          Set<ReplicaDescriptor> updatedReplicas = new HashSet<>();
          try
          {
            updateReplicas(server, candidateReplicas, updatedReplicas);
@@ -251,7 +247,7 @@
  private Set<ReplicaDescriptor> getReplicasToUpdate()
  {
    Set<ReplicaDescriptor> replicasToUpdate = new HashSet<ReplicaDescriptor>();
    Set<ReplicaDescriptor> replicasToUpdate = new HashSet<>();
    for (ServerDescriptor server : getServers())
    {
      for (ReplicaDescriptor replica : server.getReplicas())
@@ -267,7 +263,7 @@
  private Set<ReplicaDescriptor> getCandidateReplicas(ServerDescriptor server)
  {
    Set<ReplicaDescriptor> candidateReplicas = new HashSet<ReplicaDescriptor>();
    Set<ReplicaDescriptor> candidateReplicas = new HashSet<>();
    // It contains replication information: analyze it.
    String repServer = server.getReplicationServerHostPort();
    for (SuffixDescriptor suffix : getSuffixes())
@@ -315,7 +311,7 @@
   */
  public LinkedHashSet<PreferredConnection> getPreferredConnections()
  {
    return new LinkedHashSet<PreferredConnection>(preferredConnections);
    return new LinkedHashSet<>(preferredConnections);
  }
  /**
@@ -325,7 +321,7 @@
   */
  public Set<ServerDescriptor> getServers()
  {
    return new HashSet<ServerDescriptor>(servers);
    return new HashSet<>(servers);
  }
  /**
@@ -337,7 +333,7 @@
   */
  public Set<SuffixDescriptor> getSuffixes()
  {
    return new HashSet<SuffixDescriptor>(suffixes);
    return new HashSet<>(suffixes);
  }
  /**
@@ -418,10 +414,9 @@
   */
  public Set<LocalizableMessage> getErrorMessages()
  {
    Set<TopologyCacheException> exceptions =
        new HashSet<TopologyCacheException>();
    Set<TopologyCacheException> exceptions = new HashSet<>();
    Set<ServerDescriptor> theServers = getServers();
    Set<LocalizableMessage> exceptionMsgs = new LinkedHashSet<LocalizableMessage>();
    Set<LocalizableMessage> exceptionMsgs = new LinkedHashSet<>();
    for (ServerDescriptor server : theServers)
    {
      TopologyCacheException e = server.getLastException();
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/admin/ads/TopologyCacheFilter.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2015 ForgeRock AS.
 */
package org.opends.admin.ads;
@@ -36,7 +37,7 @@
 */
public class TopologyCacheFilter
{
  private Set<String> baseDNs = new HashSet<String>();
  private Set<String> baseDNs = new HashSet<>();
  private boolean searchMonitoringInformation = true;
  private boolean searchBaseDNInformation = true;
@@ -110,7 +111,7 @@
   */
  public Set<String> getBaseDNsToSearch()
  {
    return new HashSet<String>(baseDNs);
    return new HashSet<>(baseDNs);
  }
  /**
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/ApplicationTrustManager.java
@@ -89,10 +89,9 @@
   * The following ArrayList contain information about the certificates
   * explicitly accepted by the user.
   */
  private ArrayList<X509Certificate[]> acceptedChains =
    new ArrayList<X509Certificate[]>();
  private ArrayList<String> acceptedAuthTypes = new ArrayList<String>();
  private ArrayList<String> acceptedHosts = new ArrayList<String>();
  private ArrayList<X509Certificate[]> acceptedChains = new ArrayList<>();
  private ArrayList<String> acceptedAuthTypes = new ArrayList<>();
  private ArrayList<String> acceptedHosts = new ArrayList<>();
  private String host;
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/ConnectionUtils.java
@@ -103,13 +103,7 @@
      String pwd, int timeout, Hashtable<String, String> env)
      throws NamingException
  {
    if (env != null)
    { // We clone 'env' so that we can modify it freely
      env = new Hashtable<String, String>(env);
    } else
    {
      env = new Hashtable<String, String>();
    }
    env = copy(env);
    env.put(Context.INITIAL_CONTEXT_FACTORY,
        "com.sun.jndi.ldap.LdapCtxFactory");
    env.put("java.naming.ldap.attributes.binary",
@@ -183,13 +177,7 @@
  public static InitialLdapContext createLdapsContext(String ldapsURL,
      String dn, String pwd, int timeout, Hashtable<String, String> env,
      TrustManager trustManager, KeyManager keyManager) throws NamingException {
    if (env != null)
    { // We clone 'env' so that we can modify it freely
      env = new Hashtable<String, String>(env);
    } else
    {
      env = new Hashtable<String, String>();
    }
    env = copy(env);
    env.put(Context.INITIAL_CONTEXT_FACTORY,
        "com.sun.jndi.ldap.LdapCtxFactory");
    env.put("java.naming.ldap.attributes.binary",
@@ -331,14 +319,7 @@
      verifier = new BlindHostnameVerifier();
    }
    if (env != null)
    { // We clone 'env' to modify it freely
      env = new Hashtable<String, String>(env);
    }
    else
    {
      env = new Hashtable<String, String>();
    }
    env = copy(env);
    env.put(Context.INITIAL_CONTEXT_FACTORY,
        "com.sun.jndi.ldap.LdapCtxFactory");
    env.put("java.naming.ldap.attributes.binary",
@@ -401,6 +382,10 @@
    return getInitialLdapContext(t, pair, timeout);
  }
  private static Hashtable<String, String> copy(Hashtable<String, String> env) {
    return env != null ? new Hashtable<>(env) : new Hashtable<String, String>();
  }
  /**
   * Returns the LDAP URL used in the provided InitialLdapContext.
   * @param ctx the context to analyze.
@@ -791,7 +776,7 @@
  public static Set<String> getValues(SearchResult entry, String attrName)
  throws NamingException
  {
    Set<String> values = new HashSet<String>();
    Set<String> values = new HashSet<>();
    Attributes attrs = entry.getAttributes();
    if (attrs != null)
    {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/PreferredConnection.java
@@ -142,8 +142,7 @@
      InitialLdapContext ctx)
  {
    PreferredConnection cnx = PreferredConnection.getPreferredConnection(ctx);
    Set<PreferredConnection> returnValue =
      new LinkedHashSet<PreferredConnection>();
    Set<PreferredConnection> returnValue = new LinkedHashSet<>();
    returnValue.add(cnx);
    return returnValue;
  }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/ServerLoader.java
@@ -100,8 +100,7 @@
    this.pwd = pwd;
    this.trustManager = trustManager;
    this.timeout = timeout;
    this.preferredLDAPURLs =
      new LinkedHashSet<PreferredConnection>(preferredLDAPURLs);
    this.preferredLDAPURLs = new LinkedHashSet<>(preferredLDAPURLs);
    this.filter = filter;
  }
@@ -443,8 +442,7 @@
   */
  private LinkedHashSet<PreferredConnection> getLDAPURLsByPreference()
  {
    LinkedHashSet<PreferredConnection> ldapUrls =
      new LinkedHashSet<PreferredConnection>();
    LinkedHashSet<PreferredConnection> ldapUrls = new LinkedHashSet<>();
    String adminConnectorUrl = getAdminConnectorUrl(serverProperties);
    String ldapsUrl = getLdapsUrl(serverProperties);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/TrustedSocketFactory.java
@@ -47,15 +47,11 @@
 */
public class TrustedSocketFactory extends SSLSocketFactory
{
  private static Map<Thread, TrustManager> hmTrustManager =
    new HashMap<Thread, TrustManager>();
  private static Map<Thread, KeyManager> hmKeyManager =
    new HashMap<Thread, KeyManager>();
  private static Map<Thread, TrustManager> hmTrustManager = new HashMap<>();
  private static Map<Thread, KeyManager> hmKeyManager = new HashMap<>();
  private static Map<TrustManager, SocketFactory> hmDefaultFactoryTm =
    new HashMap<TrustManager, SocketFactory>();
  private static Map<KeyManager, SocketFactory> hmDefaultFactoryKm =
    new HashMap<KeyManager, SocketFactory>();
  private static Map<TrustManager, SocketFactory> hmDefaultFactoryTm = new HashMap<>();
  private static Map<KeyManager, SocketFactory> hmDefaultFactoryKm = new HashMap<>();
  private SSLSocketFactory innerFactory;
  private TrustManager trustManager;
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ControlPanelArgumentParser.java
@@ -145,7 +145,7 @@
  @Override
  public void parseArguments(String[] args) throws ArgumentException
  {
    LinkedHashSet<LocalizableMessage> errorMessages = new LinkedHashSet<LocalizableMessage>();
    LinkedHashSet<LocalizableMessage> errorMessages = new LinkedHashSet<>();
    try
    {
      super.parseArguments(args);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/browser/BrowserController.java
@@ -132,8 +132,7 @@
  private NumSubordinateHacker numSubordinateHacker;
  private int queueTotalSize;
  private int maxChildren;
  private final Collection<BrowserEventListener> listeners =
    new ArrayList<BrowserEventListener>();
  private final Collection<BrowserEventListener> listeners = new ArrayList<>();
  private final LDAPConnectionPool connectionPool;
  private final IconPool iconPool;
@@ -1127,7 +1126,7 @@
   * @return the list of attributes for the red search.
   */
  String[] getAttrsForRedSearch() {
    ArrayList<String> v = new ArrayList<String>();
    ArrayList<String> v = new ArrayList<>();
    v.add(OBJECTCLASS_ATTRIBUTE_TYPE_NAME);
    v.add(NUMSUBORDINATES_ATTR);
@@ -1438,8 +1437,8 @@
   */
  private void updateChildNodes(NodeRefresher task) throws NamingException {
    BasicNode parent = task.getNode();
    ArrayList<Integer> insertIndex = new ArrayList<Integer>();
    ArrayList<Integer> changedIndex = new ArrayList<Integer>();
    ArrayList<Integer> insertIndex = new ArrayList<>();
    ArrayList<Integer> changedIndex = new ArrayList<>();
    boolean differential = canDoDifferentialUpdate(task);
    // NUMSUBORDINATE HACK
@@ -1679,7 +1678,7 @@
      modifiers |= IconPool.MODIFIER_ERROR;
    }
    SortedSet<String> objectClasses = new TreeSet<String>();
    SortedSet<String> objectClasses = new TreeSet<>();
    if (entry != null) {
      Set<String> ocs = ConnectionUtils.getValues(entry, "objectClass");
      if (ocs != null)
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/browser/IconPool.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2013-2014 ForgeRock AS.
 *      Portions Copyright 2013-2015 ForgeRock AS.
 */
package org.opends.guitools.controlpanel.browser;
@@ -58,12 +58,9 @@
   */
  public static final int MODIFIER_ERROR    = 0x04;
  private final HashMap<String, ImageIcon> iconTable =
    new HashMap<String, ImageIcon>();
  private final HashMap<String, String> pathTable =
      new HashMap<String, String>();
  private final HashMap<String, String> descriptionTable =
    new HashMap<String, String>();
  private final HashMap<String, ImageIcon> iconTable = new HashMap<>();
  private final HashMap<String, String> pathTable = new HashMap<>();
  private final HashMap<String, String> descriptionTable = new HashMap<>();
  private ImageIcon defaultLeafIcon;
  private ImageIcon suffixIcon;
  private ImageIcon defaultContainerIcon;
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/browser/LDAPConnectionPool.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 *      Portions Copyright 2014-2015 ForgeRock AS
 */
package org.opends.guitools.controlpanel.browser;
@@ -74,10 +74,8 @@
 */
public class LDAPConnectionPool {
  private final HashMap<String, AuthRecord> authTable =
      new HashMap<String, AuthRecord>();
  private final HashMap<String, ConnectionRecord> connectionTable =
    new HashMap<String, ConnectionRecord>();
  private final HashMap<String, AuthRecord> authTable = new HashMap<>();
  private final HashMap<String, ConnectionRecord> connectionTable = new HashMap<>();
  private ArrayList<ReferralAuthenticationListener> listeners;
@@ -145,7 +143,7 @@
  public void addReferralAuthenticationListener(
      ReferralAuthenticationListener listener) {
    if (listeners == null) {
      listeners = new ArrayList<ReferralAuthenticationListener>();
      listeners = new ArrayList<>();
    }
    listeners.add(listener);
  }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/browser/NodeSearcherQueue.java
@@ -44,12 +44,9 @@
class NodeSearcherQueue implements Runnable {
  private String name;
  private ArrayList<AbstractNodeTask> waitingQueue =
    new ArrayList<AbstractNodeTask>();
  private HashMap<BasicNode, AbstractNodeTask> workingList =
    new HashMap<BasicNode, AbstractNodeTask>();
  private HashMap<BasicNode, BasicNode> cancelList =
    new HashMap<BasicNode, BasicNode>();
  private ArrayList<AbstractNodeTask> waitingQueue = new ArrayList<>();
  private HashMap<BasicNode, AbstractNodeTask> workingList = new HashMap<>();
  private HashMap<BasicNode, BasicNode> cancelList = new HashMap<>();
  private ThreadGroup threadGroup;
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/AbstractIndexTableModel.java
@@ -46,12 +46,9 @@
implements Comparator<AbstractIndexDescriptor>
{
  private static final long serialVersionUID = -5131878622200568636L;
  private Set<AbstractIndexDescriptor> data =
    new HashSet<AbstractIndexDescriptor>();
  private ArrayList<String[]> dataArray =
    new ArrayList<String[]>();
  private ArrayList<AbstractIndexDescriptor> indexArray =
      new ArrayList<AbstractIndexDescriptor>();
  private Set<AbstractIndexDescriptor> data = new HashSet<>();
  private ArrayList<String[]> dataArray = new ArrayList<>();
  private ArrayList<AbstractIndexDescriptor> indexArray = new ArrayList<>();
  private final String[] COLUMN_NAMES = getColumnNames();
  /**
   * The sort column of the table.
@@ -211,8 +208,7 @@
   */
  private void updateDataArray()
  {
    TreeSet<AbstractIndexDescriptor> sortedSet =
      new TreeSet<AbstractIndexDescriptor>(this);
    TreeSet<AbstractIndexDescriptor> sortedSet = new TreeSet<>(this);
    sortedSet.addAll(data);
    dataArray.clear();
    indexArray.clear();
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/BackendDescriptor.java
@@ -226,17 +226,17 @@
    {
      baseDN.setBackend(this);
    }
    this.baseDns = new TreeSet<BaseDNDescriptor>(baseDns);
    this.baseDns = new TreeSet<>(baseDns);
    for (IndexDescriptor index : indexes)
    {
      index.setBackend(this);
    }
    this.indexes = new TreeSet<IndexDescriptor>(indexes);
    this.indexes = new TreeSet<>(indexes);
    for (VLVIndexDescriptor index : vlvIndexes)
    {
      index.setBackend(this);
    }
    this.vlvIndexes = new TreeSet<VLVIndexDescriptor>(vlvIndexes);
    this.vlvIndexes = new TreeSet<>(vlvIndexes);
  }
  /**
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/BackupTableModel.java
@@ -38,13 +38,9 @@
public class BackupTableModel extends AbstractTableModel
{
  private static final long serialVersionUID = -3511425157550147124L;
  private ArrayList<BackupDescriptor> backups =
    new ArrayList<BackupDescriptor>();
  private ArrayList<BackupDescriptor> backups = new ArrayList<>();
  /**
   * Clears the contents ot the table model.
   *
   */
  /** Clears the contents of the table model. */
  public void clear()
  {
    backups.clear();
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/BaseDNTableModel.java
@@ -47,12 +47,11 @@
implements Comparator<BaseDNDescriptor>
{
  private static final long serialVersionUID = -5650762484071136983L;
  private HashSet<BaseDNDescriptor> data = new HashSet<BaseDNDescriptor>();
  private HashSet<BaseDNDescriptor> data = new HashSet<>();
  private ServerDescriptor.ServerStatus serverStatus;
  private boolean isAuthenticated;
  private ArrayList<String[]> dataArray =
    new ArrayList<String[]>();
  private ArrayList<String[]> dataArray = new ArrayList<>();
  private String[] COLUMN_NAMES;
  private int sortColumn;
  private boolean sortAscending = true;
@@ -369,7 +368,7 @@
  /** Updates the array data.  This includes resorting it. */
  private void updateDataArray()
  {
    TreeSet<BaseDNDescriptor> sortedSet = new TreeSet<BaseDNDescriptor>(this);
    TreeSet<BaseDNDescriptor> sortedSet = new TreeSet<>(this);
    sortedSet.addAll(data);
    dataArray.clear();
    for (BaseDNDescriptor desc : sortedSet)
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/Category.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 *      Portions Copyright 2014-2015 ForgeRock AS
 */
package org.opends.guitools.controlpanel.datamodel;
@@ -40,7 +40,7 @@
public class Category
{
  private LocalizableMessage name;
  private ArrayList<Action> actions = new ArrayList<Action>();
  private ArrayList<Action> actions = new ArrayList<>();
  /**
   * Returns the name of the category.
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/CheckEntrySyntaxException.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 *      Portions Copyright 2014-2015 ForgeRock AS
 */
package org.opends.guitools.controlpanel.datamodel;
@@ -71,7 +71,7 @@
   */
  private static LocalizableMessage getMessage(List<LocalizableMessage> errors)
  {
    ArrayList<String> s = new ArrayList<String>();
    ArrayList<String> s = new ArrayList<>();
    for (LocalizableMessage error : errors)
    {
      s.add(error.toString());
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ConnectionHandlerDescriptor.java
@@ -143,7 +143,7 @@
  }
  private State state;
  private SortedSet<InetAddress> addresses = new TreeSet<InetAddress>(
  private SortedSet<InetAddress> addresses = new TreeSet<>(
      AdministrationConnectorCfgDefn.getInstance().
      getListenAddressPropertyDefinition());
  private int port;
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ConnectionHandlerTableModel.java
@@ -44,10 +44,8 @@
implements Comparator<ConnectionHandlerDescriptor>
{
  private static final long serialVersionUID = -1121308303480078376L;
  private Set<ConnectionHandlerDescriptor> data =
    new HashSet<ConnectionHandlerDescriptor>();
  private ArrayList<String[]> dataArray =
    new ArrayList<String[]>();
  private Set<ConnectionHandlerDescriptor> data = new HashSet<>();
  private ArrayList<String[]> dataArray = new ArrayList<>();
  private String[] COLUMN_NAMES;
  private int sortColumn;
  private boolean sortAscending = true;
@@ -297,8 +295,7 @@
  private void updateDataArray()
  {
    TreeSet<ConnectionHandlerDescriptor> sortedSet =
      new TreeSet<ConnectionHandlerDescriptor>(this);
    TreeSet<ConnectionHandlerDescriptor> sortedSet = new TreeSet<>(this);
    sortedSet.addAll(data);
    dataArray.clear();
    for (ConnectionHandlerDescriptor desc : sortedSet)
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ConnectionHandlersMonitoringTableModel.java
@@ -52,8 +52,7 @@
  protected Set<AddressConnectionHandlerDescriptor> convertToInternalData(
      Set<ConnectionHandlerDescriptor> newData)
  {
    Set<AddressConnectionHandlerDescriptor> newAddresses =
      new HashSet<AddressConnectionHandlerDescriptor>();
    Set<AddressConnectionHandlerDescriptor> newAddresses = new HashSet<>();
    for (ConnectionHandlerDescriptor ch : newData)
    {
      if (ch.getAddresses().isEmpty())
@@ -78,7 +77,7 @@
  public int compare(AddressConnectionHandlerDescriptor desc1,
      AddressConnectionHandlerDescriptor desc2)
  {
    ArrayList<Integer> possibleResults = new ArrayList<Integer>();
    ArrayList<Integer> possibleResults = new ArrayList<>();
    possibleResults.add(compareNames(desc1, desc2));
    possibleResults.addAll(getMonitoringPossibleResults(
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ControlPanelInfo.java
@@ -83,7 +83,7 @@
  private long poolingPeriod = 20000;
  private ServerDescriptor serverDesc;
  private Set<Task> tasks = new HashSet<Task>();
  private Set<Task> tasks = new HashSet<>();
  private InitialLdapContext ctx;
  private InitialLdapContext userDataCtx;
  private final LDAPConnectionPool connectionPool = new LDAPConnectionPool();
@@ -110,29 +110,17 @@
  private boolean isLocal = true;
  private Set<AbstractIndexDescriptor> modifiedIndexes =
    new HashSet<AbstractIndexDescriptor>();
  private LinkedHashSet<ConfigChangeListener> configListeners =
    new LinkedHashSet<ConfigChangeListener>();
  private LinkedHashSet<BackupCreatedListener> backupListeners =
    new LinkedHashSet<BackupCreatedListener>();
  private LinkedHashSet<BackendPopulatedListener> backendPopulatedListeners =
    new LinkedHashSet<BackendPopulatedListener>();
  private LinkedHashSet<IndexModifiedListener> indexListeners =
    new LinkedHashSet<IndexModifiedListener>();
  private Set<AbstractIndexDescriptor> modifiedIndexes = new HashSet<>();
  private LinkedHashSet<ConfigChangeListener> configListeners = new LinkedHashSet<>();
  private LinkedHashSet<BackupCreatedListener> backupListeners = new LinkedHashSet<>();
  private LinkedHashSet<BackendPopulatedListener> backendPopulatedListeners = new LinkedHashSet<>();
  private LinkedHashSet<IndexModifiedListener> indexListeners = new LinkedHashSet<>();
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  private static ControlPanelInfo instance;
  /**
   * Default constructor.
   *
   */
  /** Default constructor. */
  protected ControlPanelInfo()
  {
  }
@@ -241,8 +229,7 @@
    // We might have stored indexes whose configuration has changed, just remove
    // them if they have the same name, are of the same type and are defined in
    // the same backend.
    Set<AbstractIndexDescriptor> toRemove =
      new HashSet<AbstractIndexDescriptor>();
    Set<AbstractIndexDescriptor> toRemove = new HashSet<>();
    for (AbstractIndexDescriptor i : modifiedIndexes)
    {
      if (i.getName().equalsIgnoreCase(index.getName()) &&
@@ -269,8 +256,7 @@
   */
  public void unregisterModifiedIndexesInBackend(String backendName)
  {
    HashSet<AbstractIndexDescriptor> toDelete =
      new HashSet<AbstractIndexDescriptor>();
    HashSet<AbstractIndexDescriptor> toDelete = new HashSet<>();
    for (AbstractIndexDescriptor index : modifiedIndexes)
    {
      // Compare only the Backend ID, since the backend object attached to
@@ -1213,7 +1199,7 @@
   */
  private void cleanupTasks()
  {
    Set<Task> toClean = new HashSet<Task>();
    Set<Task> toClean = new HashSet<>();
    for (Task task : tasks)
    {
      if (task.getState() == Task.State.FINISHED_SUCCESSFULLY ||
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/CustomSearchResult.java
@@ -78,8 +78,8 @@
  public CustomSearchResult(String dn)
  {
    this.dn = dn;
    attributes = new HashMap<String, List<Object>>();
    attrNames = new TreeSet<String>();
    attributes = new HashMap<>();
    attrNames = new TreeSet<>();
    toString = calculateToString();
    hashCode = calculateHashCode();
  }
@@ -126,8 +126,8 @@
    }
    dn = buf.toString();
    attributes = new HashMap<String, List<Object>>();
    attrNames = new TreeSet<String>();
    attributes = new HashMap<>();
    attrNames = new TreeSet<>();
    Attributes attrs = sr.getAttributes();
    if (attrs != null)
    {
@@ -138,7 +138,7 @@
          Attribute attr = (Attribute)en.next();
          String attrName = attr.getID();
          attrNames.add(attrName);
          List<Object> values = new ArrayList<Object>();
          List<Object> values = new ArrayList<>();
          for (int i=0; i<attr.size(); i++)
          {
            Object v = attr.get(i);
@@ -208,8 +208,8 @@
  public CustomSearchResult duplicate()
  {
    CustomSearchResult sr = new CustomSearchResult(dn);
    sr.attributes = new HashMap<String, List<Object>>(attributes);
    sr.attrNames = new TreeSet<String>(attrNames);
    sr.attributes = new HashMap<>(attributes);
    sr.attrNames = new TreeSet<>(attrNames);
    sr.toString = toString;
    sr.hashCode = hashCode;
    return sr;
@@ -288,12 +288,9 @@
  public Entry getEntry() throws OpenDsException
  {
    DN dn = DN.valueOf(getDN());
    Map<ObjectClass,String> objectClasses = new HashMap<ObjectClass,String>();
    Map<AttributeType,List<org.opends.server.types.Attribute>> userAttributes =
      new HashMap<AttributeType,List<org.opends.server.types.Attribute>>();
    Map<AttributeType,List<org.opends.server.types.Attribute>>
    operationalAttributes =
      new HashMap<AttributeType,List<org.opends.server.types.Attribute>>();
    Map<ObjectClass,String> objectClasses = new HashMap<>();
    Map<AttributeType,List<org.opends.server.types.Attribute>> userAttributes = new HashMap<>();
    Map<AttributeType,List<org.opends.server.types.Attribute>> operationalAttributes = new HashMap<>();
    for (String wholeName : getAttributeNames())
    {
@@ -343,8 +340,7 @@
          }
          builder.add(bs);
        }
        List<org.opends.server.types.Attribute> attrList =
          new ArrayList<org.opends.server.types.Attribute>(1);
        List<org.opends.server.types.Attribute> attrList = new ArrayList<>(1);
        attrList.add(builder.toAttribute());
        if (attrType.isOperational())
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/DBEnvironmentMonitoringTableModel.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 *      Portions Copyright 2014-2015 ForgeRock AS
 */
package org.opends.guitools.controlpanel.datamodel;
@@ -46,16 +46,16 @@
implements Comparator<BackendDescriptor>
{
  private static final long serialVersionUID = 548035716525600536L;
  private Set<BackendDescriptor> data = new HashSet<BackendDescriptor>();
  private ArrayList<String[]> dataArray = new ArrayList<String[]>();
  private ArrayList<BackendDescriptor> dataSourceArray = new ArrayList<BackendDescriptor>();
  private Set<BackendDescriptor> data = new HashSet<>();
  private ArrayList<String[]> dataArray = new ArrayList<>();
  private ArrayList<BackendDescriptor> dataSourceArray = new ArrayList<>();
  private String[] columnNames = {};
  private LocalizableMessage NO_VALUE_SET = INFO_CTRL_PANEL_NO_MONITORING_VALUE.get();
  private LocalizableMessage NOT_IMPLEMENTED = INFO_CTRL_PANEL_NOT_IMPLEMENTED.get();
  /** The operations to be displayed. */
  private LinkedHashSet<String> attributes = new LinkedHashSet<String>();
  private LinkedHashSet<String> attributes = new LinkedHashSet<>();
  /** The sort column of the table. */
  private int sortColumn;
  /** Whether the sorting is ascending or descending. */
@@ -132,7 +132,7 @@
    CustomSearchResult monitor1 = desc1.getMonitoringEntry();
    CustomSearchResult monitor2 = desc2.getMonitoringEntry();
    ArrayList<Integer> possibleResults = new ArrayList<Integer>();
    ArrayList<Integer> possibleResults = new ArrayList<>();
    possibleResults.add(getName(desc1).compareTo(getName(desc2)));
    computeMonitoringPossibleResults(monitor1, monitor2, possibleResults, attributes);
@@ -228,7 +228,7 @@
   */
  private void updateDataArray()
  {
    TreeSet<BackendDescriptor> sortedSet = new TreeSet<BackendDescriptor>(this);
    TreeSet<BackendDescriptor> sortedSet = new TreeSet<>(this);
    sortedSet.addAll(data);
    dataArray.clear();
    dataSourceArray.clear();
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/IndexDescriptor.java
@@ -45,7 +45,7 @@
  private static final String[] DATABASE_INDEXES = new String[] {
    DN2ID_INDEX_NAME, ID2CHILDREN_COUNT_NAME, ID2CHILDREN_INDEX_NAME, ID2SUBTREE_INDEX_NAME };
  private final SortedSet<IndexTypeDescriptor> types = new TreeSet<IndexTypeDescriptor>();
  private final SortedSet<IndexTypeDescriptor> types = new TreeSet<>();
  private final boolean isDatabaseIndex;
  private final int entryLimit;
  private final AttributeType attr;
@@ -116,7 +116,7 @@
   */
  public SortedSet<IndexTypeDescriptor> getTypes()
  {
    return new TreeSet<IndexTypeDescriptor>(types);
    return new TreeSet<>(types);
  }
  /**
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/MonitoringTableModel.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2009-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 *      Portions Copyright 2014-2015 ForgeRock AS
 */
package org.opends.guitools.controlpanel.datamodel;
@@ -49,9 +49,9 @@
abstract class MonitoringTableModel<T, P> extends SortableTableModel implements Comparator<P>
{
  private static final long serialVersionUID = -3974562860632179025L;
  private final Set<P> data = new HashSet<P>();
  private final ArrayList<String[]> dataArray = new ArrayList<String[]>();
  private final ArrayList<P> dataSourceArray = new ArrayList<P>();
  private final Set<P> data = new HashSet<>();
  private final ArrayList<String[]> dataArray = new ArrayList<>();
  private final ArrayList<P> dataSourceArray = new ArrayList<>();
  private boolean showAverages;
  private long runningTime;
@@ -60,7 +60,7 @@
  private final LocalizableMessage NOT_IMPLEMENTED = INFO_CTRL_PANEL_NOT_IMPLEMENTED.get();
  /** The attributes to be displayed. */
  private final LinkedHashSet<MonitoringAttributes> attributes = new LinkedHashSet<MonitoringAttributes>();
  private final LinkedHashSet<MonitoringAttributes> attributes = new LinkedHashSet<>();
  /** The sort column of the table. */
  private int sortColumn;
  /** Whether the sorting is ascending or descending. */
@@ -235,7 +235,7 @@
   */
  private void updateDataArray()
  {
    TreeSet<P> sortedSet = new TreeSet<P>(this);
    TreeSet<P> sortedSet = new TreeSet<>(this);
    sortedSet.addAll(data);
    dataArray.clear();
    dataSourceArray.clear();
@@ -374,12 +374,12 @@
  protected ArrayList<Integer> getMonitoringPossibleResults(
      CustomSearchResult monitor1, CustomSearchResult monitor2)
  {
    final List<String> attrs = new ArrayList<String>();
    final List<String> attrs = new ArrayList<>();
    for (MonitoringAttributes operation : getAttributes())
    {
      attrs.add(operation.getAttributeName());
    }
    final ArrayList<Integer> possibleResults = new ArrayList<Integer>();
    final ArrayList<Integer> possibleResults = new ArrayList<>();
    computeMonitoringPossibleResults(monitor1, monitor2, possibleResults, attrs);
    return possibleResults;
  }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ObjectClassValue.java
@@ -38,7 +38,7 @@
public class ObjectClassValue
{
  private String structural;
  private SortedSet<String> auxiliary = new TreeSet<String>();
  private SortedSet<String> auxiliary = new TreeSet<>();
  private int hashCode;
  /**
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ServerDescriptor.java
@@ -62,15 +62,15 @@
  private ServerStatus status;
  private int openConnections;
  private Set<BackendDescriptor> backends = new HashSet<BackendDescriptor>();
  private Set<ConnectionHandlerDescriptor> listeners = new HashSet<ConnectionHandlerDescriptor>();
  private Set<BackendDescriptor> backends = new HashSet<>();
  private Set<ConnectionHandlerDescriptor> listeners = new HashSet<>();
  private ConnectionHandlerDescriptor adminConnector;
  private Set<DN> administrativeUsers = new HashSet<DN>();
  private Set<DN> administrativeUsers = new HashSet<>();
  private String installPath;
  private String instancePath;
  private String openDSVersion;
  private String javaVersion;
  private ArrayList<OpenDsException> exceptions = new ArrayList<OpenDsException>();
  private ArrayList<OpenDsException> exceptions = new ArrayList<>();
  private boolean isWindowsServiceEnabled;
  private boolean isSchemaEnabled;
  private Schema schema;
@@ -81,7 +81,7 @@
  private CustomSearchResult entryCaches;
  private CustomSearchResult workQueue;
  private Set<TaskEntry> taskEntries = new HashSet<TaskEntry>();
  private Set<TaskEntry> taskEntries = new HashSet<>();
  private long runningTime = -1;
  private boolean isAuthenticated;
@@ -647,7 +647,7 @@
  private static Set<Object> toSet(Iterable<?> iterable)
  {
    Set<Object> s = new HashSet<Object>();
    Set<Object> s = new HashSet<>();
    for (Object o : iterable)
    {
      s.add(o);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/SortableListModel.java
@@ -46,7 +46,7 @@
public class SortableListModel<T> extends AbstractListModel
{
  private static final long serialVersionUID = 3241258779190228463L;
  private SortedSet<T> data = new TreeSet<T>();
  private SortedSet<T> data = new TreeSet<>();
  /**
   * Returns the size of the list model.
@@ -64,7 +64,7 @@
  public void setComparator(Comparator<T> comp)
  {
    SortedSet<T> copy = data;
    data = new TreeSet<T>(comp);
    data = new TreeSet<>(comp);
    data.addAll(copy);
  }
@@ -138,6 +138,6 @@
   */
  public SortedSet<T> getData()
  {
    return new TreeSet<T>(data);
    return new TreeSet<>(data);
  }
}
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/TaskTableModel.java
@@ -52,18 +52,18 @@
implements Comparator<TaskEntry>
{
  private static final long serialVersionUID = -351142550147124L;
  private Set<TaskEntry> data = new HashSet<TaskEntry>();
  private ArrayList<TaskEntry> dataSourceArray = new ArrayList<TaskEntry>();
  private Set<TaskEntry> data = new HashSet<>();
  private ArrayList<TaskEntry> dataSourceArray = new ArrayList<>();
  LinkedHashSet<LocalizableMessage> displayedAttributes = new LinkedHashSet<LocalizableMessage>();
  final LinkedHashSet<LocalizableMessage> defaultAttributes = new LinkedHashSet<LocalizableMessage>();
  LinkedHashSet<LocalizableMessage> displayedAttributes = new LinkedHashSet<>();
  final LinkedHashSet<LocalizableMessage> defaultAttributes = new LinkedHashSet<>();
  {
    defaultAttributes.add(INFO_TASKINFO_FIELD_ID.get());
    defaultAttributes.add(INFO_TASKINFO_FIELD_TYPE.get());
    defaultAttributes.add(INFO_TASKINFO_FIELD_STATUS.get());
    defaultAttributes.add(INFO_CTRL_PANEL_TASK_CANCELABLE.get());
  }
  LinkedHashSet<LocalizableMessage> allAttributes = new LinkedHashSet<LocalizableMessage>();
  LinkedHashSet<LocalizableMessage> allAttributes = new LinkedHashSet<>();
  {
    allAttributes.addAll(defaultAttributes);
    allAttributes.add(INFO_TASKINFO_FIELD_SCHEDULED_START.get());
@@ -136,7 +136,7 @@
   */
  private void updateDataArray()
  {
    TreeSet<TaskEntry> sortedSet = new TreeSet<TaskEntry>(this);
    TreeSet<TaskEntry> sortedSet = new TreeSet<>(this);
    sortedSet.addAll(data);
    dataSourceArray.clear();
    dataSourceArray.addAll(sortedSet);
@@ -281,7 +281,7 @@
  public int compare(TaskEntry desc1, TaskEntry desc2)
  {
    int result;
    ArrayList<Integer> possibleResults = new ArrayList<Integer>();
    ArrayList<Integer> possibleResults = new ArrayList<>();
    possibleResults.add(desc1.getId().compareTo(desc2.getId()));
    possibleResults.add(desc1.getType().compareTo(desc2.getType()));
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/event/IndexModifiedEvent.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2015 ForgeRock AS.
 */
package org.opends.guitools.controlpanel.event;
@@ -38,8 +39,7 @@
 */
public class IndexModifiedEvent
{
  private Set<AbstractIndexDescriptor> modifiedIndexes =
    new HashSet<AbstractIndexDescriptor>();
  private Set<AbstractIndexDescriptor> modifiedIndexes = new HashSet<>();
  /**
   * The constructor of the event.
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/event/SuperiorObjectClassesChangedEvent.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2010 Sun Microsystems, Inc.
 *      Portions Copyright 2015 ForgeRock AS.
 */
package org.opends.guitools.controlpanel.event;
@@ -44,7 +45,7 @@
public class SuperiorObjectClassesChangedEvent
{
  private Object source;
  private Set<ObjectClass> newObjectClasses = new HashSet<ObjectClass>();
  private Set<ObjectClass> newObjectClasses = new HashSet<>();
  /**
   * Constructor of the event.
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/AddToGroupTask.java
@@ -66,8 +66,8 @@
public class AddToGroupTask extends Task
{
  private Set<String> backendSet;
  private LinkedHashSet<DN> dns = new LinkedHashSet<DN>();
  private LinkedHashSet<DN> groupDns = new LinkedHashSet<DN>();
  private LinkedHashSet<DN> dns = new LinkedHashSet<>();
  private LinkedHashSet<DN> groupDns = new LinkedHashSet<>();
  /**
   * Constructor of the task.
@@ -80,7 +80,7 @@
      Set<DN> dns, Set<DN> groupDns)
  {
    super(info, dlg);
    backendSet = new HashSet<String>();
    backendSet = new HashSet<>();
    this.dns.addAll(dns);
    this.groupDns.addAll(groupDns);
    for (DN groupDn : groupDns)
@@ -126,7 +126,7 @@
  /** {@inheritDoc} */
  protected ArrayList<String> getCommandLineArguments()
  {
    return new ArrayList<String>();
    return new ArrayList<>();
  }
  /** {@inheritDoc} */
@@ -140,7 +140,7 @@
      // All the operations are incompatible if they apply to this
      // backend for safety.  This is a short operation so the limitation
      // has not a lot of impact.
      Set<String> backends = new TreeSet<String>(taskToBeLaunched.getBackends());
      Set<String> backends = new TreeSet<>(taskToBeLaunched.getBackends());
      backends.retainAll(getBackends());
      if (!backends.isEmpty())
      {
@@ -221,10 +221,9 @@
  private Collection<ModificationItem> getModifications(DN groupDn,
  Set<DN> dns) throws NamingException
  {
    ArrayList<ModificationItem> modifications =
      new ArrayList<ModificationItem>();
    // Search for the group entry
    ArrayList<ModificationItem> modifications = new ArrayList<>();
    // Search for the group entry
    SearchControls ctls = new SearchControls();
    ctls.setSearchScope(SearchControls.OBJECT_SCOPE);
    ctls.setReturningAttributes(
@@ -252,9 +251,8 @@
        {
          memberAttr = ServerConstants.ATTR_UNIQUE_MEMBER;
        }
        Set<String> values =
          ConnectionUtils.getValues(sr, memberAttr);
        Set<String> dnsToAdd = new LinkedHashSet<String>();
        Set<String> values = ConnectionUtils.getValues(sr, memberAttr);
        Set<String> dnsToAdd = new LinkedHashSet<>();
        if (values != null)
        {
          for (DN newDn : dns)
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/CancelTaskTask.java
@@ -64,12 +64,12 @@
      List<TaskEntry> tasks)
  {
    super(info, dlg);
    backendSet = new HashSet<String>();
    backendSet = new HashSet<>();
    for (BackendDescriptor backend : info.getServerDescriptor().getBackends())
    {
      backendSet.add(backend.getBackendID());
    }
    this.tasks = new ArrayList<TaskEntry>(tasks);
    this.tasks = new ArrayList<>(tasks);
  }
  /** {@inheritDoc} */
@@ -106,7 +106,7 @@
  /** {@inheritDoc} */
  protected ArrayList<String> getCommandLineArguments()
  {
    return new ArrayList<String>();
    return new ArrayList<>();
  }
  /**
@@ -116,7 +116,7 @@
   */
  private ArrayList<String> getCommandLineArguments(TaskEntry task)
  {
    ArrayList<String> args = new ArrayList<String>();
    ArrayList<String> args = new ArrayList<>();
    args.add("--cancel");
    args.add(task.getId());
    args.addAll(getConnectionCommandLineArguments());
@@ -133,7 +133,7 @@
      // All the operations are incompatible if they apply to this
      // backend for safety.  This is a short operation so the limitation
      // has not a lot of impact.
      Set<String> backends = new TreeSet<String>(taskToBeLaunched.getBackends());
      Set<String> backends = new TreeSet<>(taskToBeLaunched.getBackends());
      backends.retainAll(getBackends());
      if (!backends.isEmpty())
      {
@@ -174,7 +174,7 @@
            {
              getProgressDialog().appendProgressHtml("<br><br>");
            }
            ArrayList<String> args = new ArrayList<String>(getObfuscatedCommandLineArguments(arguments));
            ArrayList<String> args = new ArrayList<>(getObfuscatedCommandLineArguments(arguments));
            printEquivalentCommandLine(getCommandLinePath("manage-tasks"),
                    args, INFO_CTRL_PANEL_EQUIVALENT_CMD_TO_CANCEL_TASK.get(
                        task.getId()));
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/DeleteBaseDNAndBackendTask.java
@@ -75,10 +75,8 @@
public class DeleteBaseDNAndBackendTask extends Task
{
  private Set<String> backendSet;
  private Map<String, Set<BaseDNDescriptor>> baseDNsToDelete =
    new HashMap<String, Set<BaseDNDescriptor>>();
  private ArrayList<BackendDescriptor> backendsToDelete =
    new ArrayList<BackendDescriptor>();
  private Map<String, Set<BaseDNDescriptor>> baseDNsToDelete = new HashMap<>();
  private ArrayList<BackendDescriptor> backendsToDelete = new ArrayList<>();
  /**
   * Constructor of the task.
@@ -92,7 +90,7 @@
      Collection<BaseDNDescriptor> baseDNsToDelete)
  {
    super(info, dlg);
    backendSet = new HashSet<String>();
    backendSet = new HashSet<>();
    for (BackendDescriptor backend : backendsToDelete)
    {
      backendSet.add(backend.getBackendID());
@@ -107,12 +105,12 @@
      Set<BaseDNDescriptor> set = this.baseDNsToDelete.get(backendID);
      if (set == null)
      {
        set = new HashSet<BaseDNDescriptor>();
        set = new HashSet<>();
        this.baseDNsToDelete.put(backendID, set);
      }
      set.add(baseDN);
    }
    ArrayList<String> indirectBackendsToDelete = new ArrayList<String>();
    ArrayList<String> indirectBackendsToDelete = new ArrayList<>();
    for (Set<BaseDNDescriptor> set : this.baseDNsToDelete.values())
    {
      BackendDescriptor backend = set.iterator().next().getBackend();
@@ -156,7 +154,7 @@
    if (baseDNsToDelete.size() > 0)
    {
      ArrayList<String> dns = new ArrayList<String>();
      ArrayList<String> dns = new ArrayList<>();
      for (Set<BaseDNDescriptor> set : baseDNsToDelete.values())
      {
        for (BaseDNDescriptor baseDN : set)
@@ -171,7 +169,7 @@
      }
      else
      {
        ArrayList<String> quotedDns = new ArrayList<String>();
        ArrayList<String> quotedDns = new ArrayList<>();
        for (String dn : dns)
        {
          quotedDns.add("'"+dn+"'");
@@ -194,7 +192,7 @@
      }
      else
      {
        ArrayList<String> ids = new ArrayList<String>();
        ArrayList<String> ids = new ArrayList<>();
        for (BackendDescriptor backend : backendsToDelete)
        {
          ids.add(backend.getBackendID());
@@ -301,7 +299,7 @@
            }
            else
            {
              ArrayList<String> dns = new ArrayList<String>();
              ArrayList<String> dns = new ArrayList<>();
              for (BaseDNDescriptor baseDN : baseDNs)
              {
                dns.add("'" + baseDN.getDn() + "'");
@@ -435,13 +433,13 @@
  {
    BackendDescriptor backend = baseDNs.iterator().next().getBackend();
    SortedSet<DN> oldBaseDNs = new TreeSet<DN>();
    SortedSet<DN> oldBaseDNs = new TreeSet<>();
    for (BaseDNDescriptor baseDN : backend.getBaseDns())
    {
      oldBaseDNs.add(baseDN.getDn());
    }
    LinkedList<DN> newBaseDNs = new LinkedList<DN>(oldBaseDNs);
    ArrayList<DN> dnsToRemove = new ArrayList<DN>();
    LinkedList<DN> newBaseDNs = new LinkedList<>(oldBaseDNs);
    ArrayList<DN> dnsToRemove = new ArrayList<>();
    for (BaseDNDescriptor baseDN : baseDNs)
    {
      dnsToRemove.add(baseDN.getDn());
@@ -480,8 +478,8 @@
      (LocalDBBackendCfgClient)root.getBackend(
          baseDNs.iterator().next().getBackend().getBackendID());
    SortedSet<DN> oldBaseDNs = backend.getBaseDN();
    SortedSet<DN> newBaseDNs = new TreeSet<DN>(oldBaseDNs);
    ArrayList<DN> dnsToRemove = new ArrayList<DN>();
    SortedSet<DN> newBaseDNs = new TreeSet<>(oldBaseDNs);
    ArrayList<DN> dnsToRemove = new ArrayList<>();
    for (BaseDNDescriptor baseDN : baseDNs)
    {
      dnsToRemove.add(baseDN.getDn());
@@ -530,7 +528,7 @@
  /** {@inheritDoc} */
  protected ArrayList<String> getCommandLineArguments()
  {
    return new ArrayList<String>();
    return new ArrayList<>();
  }
  /**
@@ -597,7 +595,7 @@
  private ArrayList<String> getDSConfigCommandLineArguments(
      Set<BaseDNDescriptor> baseDNs)
  {
    ArrayList<String> args = new ArrayList<String>();
    ArrayList<String> args = new ArrayList<>();
    if (isServerRunning())
    {
      args.add("set-backend-prop");
@@ -622,7 +620,7 @@
  private ArrayList<String> getDSConfigCommandLineArguments(
      BackendDescriptor backend)
  {
    ArrayList<String> args = new ArrayList<String>();
    ArrayList<String> args = new ArrayList<>();
    args.add("delete-backend");
    args.add("--backend-name");
    args.add(backend.getBackendID());
@@ -773,7 +771,7 @@
  private ArrayList<String> getCommandLineArgumentsToDisableReplication(
      String domainName)
  {
    ArrayList<String> args = new ArrayList<String>();
    ArrayList<String> args = new ArrayList<>();
    args.add("delete-replication-domain");
    args.add("--provider-name");
    args.add("Multimaster Synchronization");
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/DeleteEntryTask.java
@@ -92,10 +92,10 @@
      TreePath[] paths, BrowserController controller)
  {
    super(info, dlg);
    backendSet = new HashSet<String>();
    backendSet = new HashSet<>();
    this.controller = controller;
    this.paths = paths;
    SortedSet<DN> entries = new TreeSet<DN>();
    SortedSet<DN> entries = new TreeSet<>();
    boolean canPrecalculateNumberOfEntries = true;
    nToDelete = paths.length;
    for (TreePath path : paths)
@@ -159,7 +159,7 @@
  /** {@inheritDoc} */
  protected ArrayList<String> getCommandLineArguments()
  {
    return new ArrayList<String>();
    return new ArrayList<>();
  }
  /** {@inheritDoc} */
@@ -172,8 +172,7 @@
    {
      // All the operations are incompatible if they apply to this
      // backend for safety.
      Set<String> backends =
        new TreeSet<String>(taskToBeLaunched.getBackends());
      Set<String> backends = new TreeSet<>(taskToBeLaunched.getBackends());
      backends.retainAll(getBackends());
      if (!backends.isEmpty())
      {
@@ -196,8 +195,8 @@
    state = State.RUNNING;
    lastException = null;
    ArrayList<DN> alreadyDeleted = new ArrayList<DN>();
    ArrayList<BrowserNodeInfo> toNotify = new ArrayList<BrowserNodeInfo>();
    ArrayList<DN> alreadyDeleted = new ArrayList<>();
    ArrayList<BrowserNodeInfo> toNotify = new ArrayList<>();
    try
    {
      for (TreePath path : paths)
@@ -497,7 +496,7 @@
   */
  private void printEquivalentCommandToDelete(DN dn, boolean usingControl)
  {
    ArrayList<String> args = new ArrayList<String>(getObfuscatedCommandLineArguments(
    ArrayList<String> args = new ArrayList<>(getObfuscatedCommandLineArguments(
        getConnectionCommandLineArguments(useAdminCtx, true)));
    args.add(getNoPropertiesFileArgument());
    if (usingControl)
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/DeleteIndexTask.java
@@ -65,8 +65,8 @@
public class DeleteIndexTask extends Task
{
  private final Set<String> backendSet;
  private final List<AbstractIndexDescriptor> indexesToDelete = new ArrayList<AbstractIndexDescriptor>();
  private final List<AbstractIndexDescriptor> deletedIndexes = new ArrayList<AbstractIndexDescriptor>();
  private final List<AbstractIndexDescriptor> indexesToDelete = new ArrayList<>();
  private final List<AbstractIndexDescriptor> deletedIndexes = new ArrayList<>();
  /**
   * Constructor of the task.
@@ -81,7 +81,7 @@
  public DeleteIndexTask(ControlPanelInfo info, ProgressDialog dlg, List<AbstractIndexDescriptor> indexesToDelete)
  {
    super(info, dlg);
    backendSet = new HashSet<String>();
    backendSet = new HashSet<>();
    for (final AbstractIndexDescriptor index : indexesToDelete)
    {
      backendSet.add(index.getBackend().getBackendID());
@@ -123,7 +123,7 @@
      // All the operations are incompatible if they apply to this
      // backend for safety.  This is a short operation so the limitation
      // has not a lot of impact.
      final Set<String> backends = new TreeSet<String>(taskToBeLaunched.getBackends());
      final Set<String> backends = new TreeSet<>(taskToBeLaunched.getBackends());
      backends.retainAll(getBackends());
      if (!backends.isEmpty())
      {
@@ -344,7 +344,7 @@
  @Override
  protected ArrayList<String> getCommandLineArguments()
  {
    return new ArrayList<String>();
    return new ArrayList<>();
  }
  /**
@@ -402,7 +402,7 @@
   */
  private List<String> getDSConfigCommandLineArguments(AbstractIndexDescriptor index)
  {
    final List<String> args = new ArrayList<String>();
    final List<String> args = new ArrayList<>();
    if (isVLVIndex(index))
    {
      args.add("delete-local-db-vlv-index");
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/DeleteSchemaElementsTask.java
@@ -76,17 +76,17 @@
public class DeleteSchemaElementsTask extends Task
{
  /** The list of object classes that the user asked to delete. */
  private LinkedHashSet<ObjectClass> providedOcsToDelete = new LinkedHashSet<ObjectClass>();
  private LinkedHashSet<ObjectClass> providedOcsToDelete = new LinkedHashSet<>();
  /** The list of attributes that the user asked to delete. */
  private LinkedHashSet<AttributeType> providedAttrsToDelete = new LinkedHashSet<AttributeType>();
  private LinkedHashSet<AttributeType> providedAttrsToDelete = new LinkedHashSet<>();
  /** The list of object classes that will be actually deleted (some might be recreated). */
  private LinkedHashSet<ObjectClass> ocsToDelete = new LinkedHashSet<ObjectClass>();
  private LinkedHashSet<ObjectClass> ocsToDelete = new LinkedHashSet<>();
  /** The list of attributes that will be actually deleted (some might be recreated). */
  private LinkedHashSet<AttributeType> attrsToDelete = new LinkedHashSet<AttributeType>();
  private LinkedHashSet<AttributeType> attrsToDelete = new LinkedHashSet<>();
  /** The list of object classes that will be recreated. */
  private LinkedHashSet<ObjectClass> ocsToAdd = new LinkedHashSet<ObjectClass>();
  private LinkedHashSet<ObjectClass> ocsToAdd = new LinkedHashSet<>();
  /** The list of attributes that will be recreated. */
  private LinkedHashSet<AttributeType> attrsToAdd = new LinkedHashSet<AttributeType>();
  private LinkedHashSet<AttributeType> attrsToAdd = new LinkedHashSet<>();
  /**
   * Constructor of the task.
@@ -130,8 +130,7 @@
                ocsToDelete, schema));
      }
    }
    ArrayList<AttributeType> lAttrsToDelete =
      new ArrayList<AttributeType>(allAttrsToDelete);
    ArrayList<AttributeType> lAttrsToDelete = new ArrayList<>(allAttrsToDelete);
    for (int i = lAttrsToDelete.size() - 1; i >= 0; i--)
    {
      AttributeType attrToDelete = lAttrsToDelete.get(i);
@@ -146,8 +145,7 @@
    }
    assert allOcsToDelete != null;
    ArrayList<ObjectClass> lOcsToDelete =
      new ArrayList<ObjectClass>(allOcsToDelete);
    ArrayList<ObjectClass> lOcsToDelete = new ArrayList<>(allOcsToDelete);
    for (int i = lOcsToDelete.size() - 1; i >= 0; i--)
    {
      ObjectClass ocToDelete = lOcsToDelete.get(i);
@@ -508,7 +506,7 @@
    }
    else
    {
      ArrayList<String> args = new ArrayList<String>();
      ArrayList<String> args = new ArrayList<>();
      args.add("-a");
      args.addAll(getObfuscatedCommandLineArguments(
          getConnectionCommandLineArguments(true, true)));
@@ -562,7 +560,7 @@
    }
    if (isSuperior)
    {
      ArrayList<String> allNames = new ArrayList<String>();
      ArrayList<String> allNames = new ArrayList<>();
      for (String str : attrToDelete.getNormalizedNames())
      {
        allNames.add(str);
@@ -610,7 +608,7 @@
      }
    }
    boolean hasSuperior = false;
    Set<ObjectClass> newSuperiors = new LinkedHashSet<ObjectClass>();
    Set<ObjectClass> newSuperiors = new LinkedHashSet<>();
    for (ObjectClass sup : ocToDelete.getSuperiorClasses())
    {
      boolean isFound = false;
@@ -633,7 +631,7 @@
    if (containsAttribute || hasSuperior)
    {
      ArrayList<String> allNames = new ArrayList<String>();
      ArrayList<String> allNames = new ArrayList<>();
      for (String str : ocToDelete.getNormalizedNames())
      {
        allNames.add(str);
@@ -644,10 +642,8 @@
      Set<AttributeType> optional;
      if (containsAttribute)
      {
        required = new HashSet<AttributeType>(
            ocToDelete.getRequiredAttributes());
        optional = new HashSet<AttributeType>(
            ocToDelete.getOptionalAttributes());
        required = new HashSet<>(ocToDelete.getRequiredAttributes());
        optional = new HashSet<>(ocToDelete.getOptionalAttributes());
        required.removeAll(providedAttrsToDelete);
        optional.removeAll(providedAttrsToDelete);
      }
@@ -679,7 +675,7 @@
  private Set<ObjectClass> getNewSuperiors(ObjectClass currentSup)
  {
    Set<ObjectClass> newSuperiors = new LinkedHashSet<ObjectClass>();
    Set<ObjectClass> newSuperiors = new LinkedHashSet<>();
    if (currentSup.getSuperiorClasses() != null &&
        !currentSup.getSuperiorClasses().isEmpty())
    {
@@ -708,8 +704,7 @@
  public static LinkedHashSet<AttributeType> getOrderedAttributesToDelete(
      Collection<AttributeType> attrsToDelete, Schema schema)
  {
    LinkedHashSet<AttributeType> orderedAttributes =
      new LinkedHashSet<AttributeType>();
    LinkedHashSet<AttributeType> orderedAttributes = new LinkedHashSet<>();
    for (AttributeType attribute : attrsToDelete)
    {
      orderedAttributes.addAll(getOrderedChildrenToDelete(attribute, schema));
@@ -727,7 +722,7 @@
  public static LinkedHashSet<ObjectClass> getOrderedObjectClassesToDelete(
      Collection<ObjectClass> ocsToDelete, Schema schema)
  {
    LinkedHashSet<ObjectClass> orderedOcs = new LinkedHashSet<ObjectClass>();
    LinkedHashSet<ObjectClass> orderedOcs = new LinkedHashSet<>();
    for (ObjectClass oc : ocsToDelete)
    {
      orderedOcs.addAll(getOrderedChildrenToDelete(oc, schema));
@@ -748,8 +743,8 @@
  getOrderedObjectClassesToDeleteFromAttrs(
      Collection<AttributeType> attrsToDelete, Schema schema)
  {
    LinkedHashSet<ObjectClass> orderedOcs = new LinkedHashSet<ObjectClass>();
    ArrayList<ObjectClass> dependentClasses = new ArrayList<ObjectClass>();
    LinkedHashSet<ObjectClass> orderedOcs = new LinkedHashSet<>();
    ArrayList<ObjectClass> dependentClasses = new ArrayList<>();
    for (AttributeType attr : attrsToDelete)
    {
      for (ObjectClass oc : schema.getObjectClasses().values())
@@ -781,12 +776,11 @@
  public static Map<String, List<String>> cloneExtraProperties(
      CommonSchemaElements element)
  {
    Map<String, List<String>> extraProperties =
      new HashMap<String, List<String>>();
    Map<String, List<String>> extraProperties = new HashMap<>();
    Map<String, List<String>> props = element.getExtraProperties();
    for (String name : props.keySet())
    {
      List<String> values = new ArrayList<String>(props.get(name));
      List<String> values = new ArrayList<>(props.get(name));
      extraProperties.put(name, values);
    }
    return extraProperties;
@@ -796,7 +790,7 @@
  private static LinkedHashSet<AttributeType> getOrderedChildrenToDelete(
      AttributeType attribute, Schema schema)
  {
    LinkedHashSet<AttributeType> children = new LinkedHashSet<AttributeType>();
    LinkedHashSet<AttributeType> children = new LinkedHashSet<>();
    for (AttributeType attr : schema.getAttributeTypes().values())
    {
      if (attribute.equals(attr.getSuperiorType()))
@@ -811,7 +805,7 @@
  private static LinkedHashSet<ObjectClass> getOrderedChildrenToDelete(
      ObjectClass objectClass, Schema schema)
  {
    LinkedHashSet<ObjectClass> children = new LinkedHashSet<ObjectClass>();
    LinkedHashSet<ObjectClass> children = new LinkedHashSet<>();
    for (ObjectClass oc : schema.getObjectClasses().values())
    {
      if (oc.getSuperiorClasses().contains(objectClass))
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/IndexTask.java
@@ -64,7 +64,7 @@
      String baseDN)
  {
    super(info, dlg);
    baseDNs = new HashSet<String>();
    baseDNs = new HashSet<>();
    baseDNs.add(baseDN);
    initializeBackendSet();
  }
@@ -79,8 +79,8 @@
      Collection<String> baseDNs)
  {
    super(info, dlg);
    backendSet = new HashSet<String>();
    this.baseDNs = new TreeSet<String>();
    backendSet = new HashSet<>();
    this.baseDNs = new TreeSet<>();
    this.baseDNs.addAll(baseDNs);
    initializeBackendSet();
  }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ModifyAttributeTask.java
@@ -158,7 +158,7 @@
    {
      if (oldAttribute.equals(attrToDelete.getSuperiorType()))
      {
        ArrayList<String> allNames = new ArrayList<String>();
        ArrayList<String> allNames = new ArrayList<>();
        for (String str : attrToDelete.getNormalizedNames())
        {
          allNames.add(str);
@@ -202,17 +202,15 @@
      ocToDelete.getOptionalAttributeChain().contains(oldAttribute);
    if (containsAttribute)
    {
      ArrayList<String> allNames = new ArrayList<String>();
      ArrayList<String> allNames = new ArrayList<>();
      for (String str : ocToDelete.getNormalizedNames())
      {
        allNames.add(str);
      }
      Map<String, List<String>> extraProperties =
        DeleteSchemaElementsTask.cloneExtraProperties(ocToDelete);
      Set<AttributeType> required = new HashSet<AttributeType>(
          ocToDelete.getRequiredAttributes());
      Set<AttributeType> optional = new HashSet<AttributeType>(
          ocToDelete.getOptionalAttributes());
      Set<AttributeType> required = new HashSet<>(ocToDelete.getRequiredAttributes());
      Set<AttributeType> optional = new HashSet<>(ocToDelete.getOptionalAttributes());
      if (required.contains(oldAttribute))
      {
        required.remove(oldAttribute);
@@ -250,7 +248,7 @@
  private void updateSchema() throws OpenDsException
  {
    Schema schema = getInfo().getServerDescriptor().getSchema();
    ArrayList<AttributeType> attrs = new ArrayList<AttributeType>();
    ArrayList<AttributeType> attrs = new ArrayList<>();
    attrs.add(oldAttribute);
    LinkedHashSet<AttributeType> attrsToDelete =
      DeleteSchemaElementsTask.getOrderedAttributesToDelete(attrs, schema);
@@ -258,10 +256,8 @@
      DeleteSchemaElementsTask.getOrderedObjectClassesToDeleteFromAttrs(
          attrsToDelete, schema);
    LinkedHashSet<AttributeType> attrsToAdd =
      new LinkedHashSet<AttributeType>();
    ArrayList<AttributeType> lAttrsToDelete =
      new ArrayList<AttributeType>(attrsToDelete);
    LinkedHashSet<AttributeType> attrsToAdd = new LinkedHashSet<>();
    ArrayList<AttributeType> lAttrsToDelete = new ArrayList<>(attrsToDelete);
    for (int i = lAttrsToDelete.size() - 1; i >= 0; i--)
    {
      AttributeType attrToAdd = getAttributeToAdd(lAttrsToDelete.get(i));
@@ -271,9 +267,8 @@
      }
    }
    ArrayList<ObjectClass> lOcsToDelete =
      new ArrayList<ObjectClass>(ocsToDelete);
    LinkedHashSet<ObjectClass> ocsToAdd = new LinkedHashSet<ObjectClass>();
    ArrayList<ObjectClass> lOcsToDelete = new ArrayList<>(ocsToDelete);
    LinkedHashSet<ObjectClass> ocsToAdd = new LinkedHashSet<>();
    for (int i = lOcsToDelete.size() - 1; i >= 0; i--)
    {
      ocsToAdd.add(getObjectClassToAdd(lOcsToDelete.get(i)));
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ModifyEntryTask.java
@@ -97,7 +97,7 @@
      BrowserController controller, TreePath path)
  {
    super(info, dlg);
    backendSet = new HashSet<String>();
    backendSet = new HashSet<>();
    this.oldEntry = oldEntry;
    this.newEntry = newEntry;
    this.controller = controller;
@@ -181,7 +181,7 @@
  /** {@inheritDoc} */
  protected ArrayList<String> getCommandLineArguments()
  {
    return new ArrayList<String>();
    return new ArrayList<>();
  }
  /** {@inheritDoc} */
@@ -469,8 +469,7 @@
   */
  public static ArrayList<ModificationItem> getModifications(Entry newEntry,
      CustomSearchResult oldEntry, ControlPanelInfo info) {
    ArrayList<ModificationItem> modifications =
      new ArrayList<ModificationItem>();
    ArrayList<ModificationItem> modifications = new ArrayList<>();
    Schema schema = info.getServerDescriptor().getSchema();
    List<org.opends.server.types.Attribute> newAttrs = newEntry.getAttributes();
@@ -489,7 +488,7 @@
        attrType = DirectoryServer.getDefaultAttributeType(
            attr.getName().toLowerCase());
      }
      List<ByteString> newValues = new ArrayList<ByteString>();
      List<ByteString> newValues = new ArrayList<>();
      Iterator<ByteString> it = attr.iterator();
      while (it.hasNext())
      {
@@ -562,7 +561,7 @@
      }
      if (oldValues == null)
      {
        Set<ByteString> vs = new HashSet<ByteString>(newValues);
        Set<ByteString> vs = new HashSet<>(newValues);
        if (rdnValue != null)
        {
          vs.remove(rdnValue);
@@ -601,7 +600,7 @@
          }
          if (!toAdd.isEmpty())
          {
            List<ByteString> vs = new ArrayList<ByteString>(toAdd);
            List<ByteString> vs = new ArrayList<>(toAdd);
            if (rdnValue != null)
            {
              vs.remove(rdnValue);
@@ -694,7 +693,7 @@
  private static List<ByteString> getValuesToDelete(List<Object> oldValues,
      List<ByteString> newValues)
  {
    List<ByteString> valuesToDelete = new ArrayList<ByteString>();
    List<ByteString> valuesToDelete = new ArrayList<>();
    for (Object o : oldValues)
    {
      ByteString oldValue = createAttributeValue(o);
@@ -715,7 +714,7 @@
  private static List<ByteString> getValuesToAdd(List<Object> oldValues,
    List<ByteString> newValues)
  {
    List<ByteString> valuesToAdd = new ArrayList<ByteString>();
    List<ByteString> valuesToAdd = new ArrayList<>();
    for (ByteString newValue : newValues)
    {
      if (!contains(oldValues, newValue))
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ModifyObjectClassTask.java
@@ -157,14 +157,14 @@
    }
    else if (currentSups.contains(oldObjectClass))
    {
      ArrayList<String> allNames = new ArrayList<String>();
      ArrayList<String> allNames = new ArrayList<>();
      for (String str : ocToDelete.getNormalizedNames())
      {
        allNames.add(str);
      }
      Map<String, List<String>> extraProperties =
        DeleteSchemaElementsTask.cloneExtraProperties(ocToDelete);
      Set<ObjectClass> newSups = new LinkedHashSet<ObjectClass>();
      Set<ObjectClass> newSups = new LinkedHashSet<>();
      for(ObjectClass oc: currentSups)
      {
        if(oc.equals(oldObjectClass))
@@ -203,14 +203,13 @@
  private void updateSchema() throws OpenDsException
  {
    Schema schema = getInfo().getServerDescriptor().getSchema();
    ArrayList<ObjectClass> ocs = new ArrayList<ObjectClass>();
    ArrayList<ObjectClass> ocs = new ArrayList<>();
    ocs.add(oldObjectClass);
    LinkedHashSet<ObjectClass> ocsToDelete =
      DeleteSchemaElementsTask.getOrderedObjectClassesToDelete(ocs, schema);
    ArrayList<ObjectClass> lOcsToDelete =
      new ArrayList<ObjectClass>(ocsToDelete);
    LinkedHashSet<ObjectClass> ocsToAdd = new LinkedHashSet<ObjectClass>();
    ArrayList<ObjectClass> lOcsToDelete = new ArrayList<>(ocsToDelete);
    LinkedHashSet<ObjectClass> ocsToAdd = new LinkedHashSet<>();
    for (int i = lOcsToDelete.size() - 1; i >= 0; i--)
    {
      ocsToAdd.add(getObjectClassToAdd(lOcsToDelete.get(i)));
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/NewEntryTask.java
@@ -87,7 +87,7 @@
      BasicNode parentNode, BrowserController controller)
  {
    super(info, dlg);
    backendSet = new HashSet<String>();
    backendSet = new HashSet<>();
    this.newEntry = newEntry;
    this.ldif = ldif;
    this.parentNode = parentNode;
@@ -132,7 +132,7 @@
  /** {@inheritDoc} */
  protected ArrayList<String> getCommandLineArguments()
  {
    return new ArrayList<String>();
    return new ArrayList<>();
  }
  /** {@inheritDoc} */
@@ -194,7 +194,7 @@
      for (org.opends.server.types.Attribute attr : newEntry.getAttributes())
      {
        String attrName = attr.getNameWithOptions();
        Set<ByteString> values = new LinkedHashSet<ByteString>();
        Set<ByteString> values = new LinkedHashSet<>();
        Iterator<ByteString> it = attr.iterator();
        while (it.hasNext())
        {
@@ -291,7 +291,7 @@
   */
  private void printEquivalentCommand()
  {
    ArrayList<String> args = new ArrayList<String>(getObfuscatedCommandLineArguments(
    ArrayList<String> args = new ArrayList<>(getObfuscatedCommandLineArguments(
        getConnectionCommandLineArguments(useAdminCtx, true)));
    args.add(getNoPropertiesFileArgument());
    args.add("--defaultAdd");
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/NewSchemaElementsTask.java
@@ -78,8 +78,8 @@
 */
public class NewSchemaElementsTask extends Task
{
  LinkedHashSet<ObjectClass> ocsToAdd = new LinkedHashSet<ObjectClass>();
  LinkedHashSet<AttributeType> attrsToAdd = new LinkedHashSet<AttributeType>();
  LinkedHashSet<ObjectClass> ocsToAdd = new LinkedHashSet<>();
  LinkedHashSet<AttributeType> attrsToAdd = new LinkedHashSet<>();
  /**
   * Constructor of the task.
@@ -164,12 +164,12 @@
    }
    else
    {
      ArrayList<String> attrNames = new ArrayList<String>();
      ArrayList<String> attrNames = new ArrayList<>();
      for (AttributeType attribute : attrsToAdd)
      {
        attrNames.add(attribute.getNameOrOID());
      }
      ArrayList<String> ocNames = new ArrayList<String>();
      ArrayList<String> ocNames = new ArrayList<>();
      for (ObjectClass oc : ocsToAdd)
      {
        ocNames.add(oc.getNameOrOID());
@@ -259,7 +259,7 @@
    LinkedHashMap<String, List<AttributeType>> hmAttrs = copy(attrsToAdd);
    LinkedHashMap<String, List<ObjectClass>> hmOcs = copy(ocsToAdd);
    LinkedHashSet<String> allFileNames = new LinkedHashSet<String>();
    LinkedHashSet<String> allFileNames = new LinkedHashSet<>();
    allFileNames.addAll(hmAttrs.keySet());
    allFileNames.addAll(hmOcs.keySet());
    for (String fileName : allFileNames)
@@ -298,8 +298,7 @@
  private <T extends SchemaFileElement> LinkedHashMap<String, List<T>> copy(
      LinkedHashSet<T> elemsToAdd)
  {
    LinkedHashMap<String, List<T>> hmElems =
        new LinkedHashMap<String, List<T>>();
    LinkedHashMap<String, List<T>> hmElems = new LinkedHashMap<>();
    for (T elem : elemsToAdd)
    {
      String fileName = CommonSchemaElements.getSchemaFile(elem);
@@ -310,7 +309,7 @@
      List<T> elems = hmElems.get(fileName);
      if (elems == null)
      {
        elems = new ArrayList<T>();
        elems = new ArrayList<>();
        hmElems.put(fileName, elems);
      }
      elems.add(elem);
@@ -421,7 +420,7 @@
    if (previousValues != null && !previousValues.isEmpty())
    {
      ArrayList<String> vs = new ArrayList<String>(previousValues);
      ArrayList<String> vs = new ArrayList<>(previousValues);
      element.setExtraProperty(ServerConstants.SCHEMA_PROPERTY_FILENAME, vs);
    }
    return attributeWithoutFileDefinition;
@@ -430,7 +429,7 @@
  private void printEquivalentCommandLineToAddOnline(
      CommonSchemaElements element)
  {
    ArrayList<String> args = new ArrayList<String>();
    ArrayList<String> args = new ArrayList<>();
    args.add("-a");
    args.addAll(getObfuscatedCommandLineArguments(
        getConnectionCommandLineArguments(true, true)));
@@ -558,7 +557,7 @@
      List<AttributeType> attributes,
      List<ObjectClass> objectClasses)
  {
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<String> names = new ArrayList<>();
    for (AttributeType attr : attributes)
    {
      names.add(attr.getNameOrOID());
@@ -638,7 +637,7 @@
   */
  private ArrayList<String> getSchemaEntryLines()
  {
    ArrayList<String> lines = new ArrayList<String>();
    ArrayList<String> lines = new ArrayList<>();
    lines.add("dn: cn=schema");
    lines.add("objectClass: top");
    lines.add("objectClass: ldapSubentry");
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ResetUserPasswordTask.java
@@ -81,7 +81,7 @@
      BasicNode node, BrowserController controller, char[] pwd)
  {
    super(info, dlg);
    backendSet = new HashSet<String>();
    backendSet = new HashSet<>();
    this.node = node;
    this.newPassword = pwd;
    try
@@ -151,7 +151,7 @@
  /** {@inheritDoc} */
  protected ArrayList<String> getCommandLineArguments()
  {
    ArrayList<String> args = new ArrayList<String>();
    ArrayList<String> args = new ArrayList<>();
    if (currentPassword == null)
    {
      args.add("--authzID");
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/StartServerTask.java
@@ -73,7 +73,7 @@
  /** {@inheritDoc} */
  protected ArrayList<String> getCommandLineArguments()
  {
    ArrayList<String> args = new ArrayList<String>();
    ArrayList<String> args = new ArrayList<>();
    args.add("--timeout");
    args.add("0");
    return args;
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/StartStopTask.java
@@ -53,7 +53,7 @@
  protected StartStopTask(ControlPanelInfo info, ProgressDialog progressDialog)
  {
    super(info, progressDialog);
    backendSet = new HashSet<String>();
    backendSet = new HashSet<>();
    for (BackendDescriptor backend :
      info.getServerDescriptor().getBackends())
    {
@@ -113,7 +113,7 @@
  /** {@inheritDoc} */
  protected ArrayList<String> getCommandLineArguments()
  {
    return new ArrayList<String>();
    return new ArrayList<>();
  }
  /**
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/Task.java
@@ -268,8 +268,7 @@
  private ProgressDialog progressDialog;
  private ArrayList<ConfigurationElementCreatedListener> confListeners =
    new ArrayList<ConfigurationElementCreatedListener>();
  private ArrayList<ConfigurationElementCreatedListener> confListeners = new ArrayList<>();
  private static int MAX_BINARY_LENGTH_TO_DISPLAY = 1024;
@@ -750,7 +749,7 @@
  {
    String[] toObfuscate = {"--bindPassword", "--currentPassword",
        "--newPassword"};
    ArrayList<String> args = new ArrayList<String>(clearArgs);
    ArrayList<String> args = new ArrayList<>(clearArgs);
    for (int i=1; i<args.size(); i++)
    {
      for (String argName : toObfuscate)
@@ -777,7 +776,7 @@
   */
  protected List<String> getConfigCommandLineArguments()
  {
    List<String> args = new ArrayList<String>();
    List<String> args = new ArrayList<>();
    args.add("--configClass");
    args.add(org.opends.server.extensions.ConfigFileHandler.class.getName());
    args.add("--configFile");
@@ -807,7 +806,7 @@
  protected List<String> getConnectionCommandLineArguments(
      boolean useAdminConnector, boolean addConnectionTypeParameters)
  {
    ArrayList<String> args = new ArrayList<String>();
    ArrayList<String> args = new ArrayList<>();
    InitialLdapContext ctx;
    if (useAdminConnector)
@@ -936,7 +935,7 @@
  protected void printEquivalentCommandToModify(String dn,
      Collection<ModificationItem> mods, boolean useAdminCtx)
  {
    ArrayList<String> args = new ArrayList<String>(getObfuscatedCommandLineArguments(
    ArrayList<String> args = new ArrayList<>(getObfuscatedCommandLineArguments(
        getConnectionCommandLineArguments(useAdminCtx, true)));
    args.add(getNoPropertiesFileArgument());
    String equiv = getEquivalentCommandLine(getCommandLinePath("ldapmodify"),
@@ -1075,7 +1074,7 @@
  protected void printEquivalentRenameCommand(DN oldDN, DN newDN,
      boolean useAdminCtx)
  {
    ArrayList<String> args = new ArrayList<String>(getObfuscatedCommandLineArguments(
    ArrayList<String> args = new ArrayList<>(getObfuscatedCommandLineArguments(
        getConnectionCommandLineArguments(useAdminCtx, true)));
    args.add(getNoPropertiesFileArgument());
    String equiv = getEquivalentCommandLine(getCommandLinePath("ldapmodify"),
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractBackendIndexesPanel.java
@@ -74,17 +74,12 @@
   * The scroll pane that contains the table.
   */
  protected JScrollPane tableScroll;
  private Set<IndexSelectionListener> indexListeners =
    new HashSet<IndexSelectionListener>();
  private Set<IndexSelectionListener> indexListeners = new HashSet<>();
  private int lastRowMouseOver = -1;
  /**
   * Default constructor.
   *
   */
  /** Default constructor. */
  protected AbstractBackendIndexesPanel()
  {
    super();
    createLayout();
  }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractNewEntryPanel.java
@@ -111,7 +111,7 @@
  /** {@inheritDoc} */
  public void okClicked()
  {
    final ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    final ArrayList<LocalizableMessage> errors = new ArrayList<>();
    if (checkSyntaxBackground())
    {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractVLVIndexPanel.java
@@ -193,11 +193,11 @@
  private final LocalizableMessage STANDARD_ATTRIBUTES = INFO_CTRL_PANEL_STANDARD_ATTRIBUTES_LABEL.get();
  /** The list of standard attribute names. */
  private final TreeSet<String> standardAttrNames = new TreeSet<String>(new LowerCaseComparator());
  private final TreeSet<String> standardAttrNames = new TreeSet<>(new LowerCaseComparator());
  /** The list of configuration attribute names. */
  private final TreeSet<String> configurationAttrNames = new TreeSet<String>(new LowerCaseComparator());
  private final TreeSet<String> configurationAttrNames = new TreeSet<>(new LowerCaseComparator());
  /** The list of custom attribute names. */
  private final TreeSet<String> customAttrNames = new TreeSet<String>(new LowerCaseComparator());
  private final TreeSet<String> customAttrNames = new TreeSet<>(new LowerCaseComparator());
  /**
   * Constructor.
@@ -264,12 +264,11 @@
   */
  protected List<VLVSortOrder> getSortOrder()
  {
    List<VLVSortOrder> sortOrder = new ArrayList<VLVSortOrder>();
    List<VLVSortOrder> sortOrder = new ArrayList<>();
    for (int i = 0; i < sortOrderModel.getSize(); i++)
    {
      sortOrder.add((VLVSortOrder) sortOrderModel.get(i));
    }
    return sortOrder;
  }
@@ -325,7 +324,7 @@
    if (schema != null)
    {
      repack[0] = attributes.getItemCount() == 0;
      LinkedHashSet<CategorizedComboBoxElement> newElements = new LinkedHashSet<CategorizedComboBoxElement>();
      LinkedHashSet<CategorizedComboBoxElement> newElements = new LinkedHashSet<>();
      synchronized (standardAttrNames)
      {
@@ -439,7 +438,7 @@
    try
    {
      LDAPFilter ldapFilter = LDAPFilter.decode(f);
      ArrayList<LocalizableMessage> msgs = new ArrayList<LocalizableMessage>();
      ArrayList<LocalizableMessage> msgs = new ArrayList<>();
      updateIndexRequiredMessages(ldapFilter, msgs);
      if (!msgs.isEmpty())
      {
@@ -564,7 +563,7 @@
   */
  protected void updateBaseDNCombo(BackendDescriptor backend)
  {
    List<Object> newElements = new ArrayList<Object>();
    List<Object> newElements = new ArrayList<>();
    for (BaseDNDescriptor baseDN : backend.getBaseDns())
    {
      String dn = null;
@@ -599,7 +598,7 @@
    BackendDescriptor backend = getBackend();
    List<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    List<LocalizableMessage> errors = new ArrayList<>();
    if (checkName)
    {
      String n = name.getText();
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AddToGroupPanel.java
@@ -78,7 +78,7 @@
  private JScrollPane scrollEntries;
  private JLabel lEntries = Utilities.createDefaultLabel();
  private JLabel lGroups = Utilities.createDefaultLabel();
  private LinkedHashSet<DN> dns = new LinkedHashSet<DN>();
  private LinkedHashSet<DN> dns = new LinkedHashSet<>();
  private GenericDialog browseGroupDlg;
  private LDAPEntrySelectionPanel browseGroupPanel;
@@ -99,7 +99,7 @@
   */
  public void setEntriesToAdd(Set<DN> dns)
  {
    ArrayList<String> sDns = new ArrayList<String>();
    ArrayList<String> sDns = new ArrayList<>();
    for (DN dn : dns)
    {
      sDns.add(dn.toString());
@@ -132,7 +132,7 @@
  /** {@inheritDoc} */
  public void okClicked()
  {
    final ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    final ArrayList<LocalizableMessage> errors = new ArrayList<>();
    BackgroundTask<Void> worker = new BackgroundTask<Void>()
    {
      /** {@inheritDoc} */
@@ -403,7 +403,7 @@
          Utilities.createFrame(),
          Utilities.getParentDialog(this),
          INFO_CTRL_PANEL_ADD_TO_GROUP_TITLE.get(), getInfo());
      LinkedHashSet<DN> groupDns = new LinkedHashSet<DN>();
      LinkedHashSet<DN> groupDns = new LinkedHashSet<>();
      String[] grs = groups.getText().split("\n");
      try
      {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AttributeSyntaxPanel.java
@@ -204,7 +204,7 @@
    description.setText(n);
    Comparator<String> lowerCaseComparator = new LowerCaseComparator();
    TreeSet<String> attributes = new TreeSet<String>(lowerCaseComparator);
    TreeSet<String> attributes = new TreeSet<>(lowerCaseComparator);
    for (AttributeType attr : schema.getAttributeTypes().values())
    {
      if (syntax == attr.getSyntax())
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/BackupPanel.java
@@ -350,7 +350,7 @@
    setPrimaryValid(lBackupOptions);
    backupIDInitialized = false;
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>();
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<>();
    if (!allBackends.isSelected())
    {
@@ -454,7 +454,7 @@
      public Void processBackgroundTask() throws Throwable
      {
        // Open the backup directory and make sure it is valid.
        LinkedHashSet<BackupInfo> backups = new LinkedHashSet<BackupInfo>();
        LinkedHashSet<BackupInfo> backups = new LinkedHashSet<>();
        try
        {
          BackupDirectory backupDir =
@@ -630,7 +630,7 @@
    public BackupTask(ControlPanelInfo info, ProgressDialog dlg)
    {
      super(info, dlg);
      backendSet = new HashSet<String>();
      backendSet = new HashSet<>();
      if (!allBackends.isSelected())
      {
        backendSet.add((String)backends.getSelectedItem());
@@ -749,7 +749,7 @@
    /** {@inheritDoc} */
    protected ArrayList<String> getCommandLineArguments()
    {
      ArrayList<String> args = new ArrayList<String>();
      ArrayList<String> args = new ArrayList<>();
      args.add("--backupDirectory");
      args.add(dir);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/BinaryAttributeEditorPanel.java
@@ -255,7 +255,7 @@
  private void refresh(final boolean closeAndUpdateValue,
      final boolean updateImage)
  {
    final ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    final ArrayList<LocalizableMessage> errors = new ArrayList<>();
    setPrimaryValid(useFile);
    setPrimaryValid(useBase64);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/BrowseEntriesPanel.java
@@ -1010,7 +1010,7 @@
  private void deleteClicked()
  {
    ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    ArrayList<LocalizableMessage> errors = new ArrayList<>();
    TreePath[] paths = treePane.getTree().getSelectionPaths();
    if ((paths != null) && (paths.length > 0))
@@ -1079,7 +1079,7 @@
    TreePath[] paths = treePane.getTree().getSelectionPaths();
    if (paths != null)
    {
      LinkedHashSet<DN> dns = new LinkedHashSet<DN>();
      LinkedHashSet<DN> dns = new LinkedHashSet<>();
      for (TreePath path : paths)
      {
        BasicNode node = (BasicNode)path.getLastPathComponent();
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/BrowseGeneralMonitoringPanel.java
@@ -579,8 +579,7 @@
    return changed;
  }
  private HashMap<Object, ImageIcon> hmImages =
    new HashMap<Object, ImageIcon>();
  private HashMap<Object, ImageIcon> hmImages = new HashMap<>();
  {
    NodeType[] identifiers = {
        NodeType.ROOT,
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/BrowseIndexPanel.java
@@ -573,12 +573,9 @@
      }
    }
    ArrayList<ArrayList<? extends AbstractIndexTreeNode>> nodes =
      new ArrayList<ArrayList<? extends AbstractIndexTreeNode>>();
    ArrayList<IndexTreeNode> standardIndexNodes =
      new ArrayList<IndexTreeNode>();
    ArrayList<VLVIndexTreeNode> vlvIndexNodes =
      new ArrayList<VLVIndexTreeNode>();
    ArrayList<ArrayList<? extends AbstractIndexTreeNode>> nodes = new ArrayList<>();
    ArrayList<IndexTreeNode> standardIndexNodes = new ArrayList<>();
    ArrayList<VLVIndexTreeNode> vlvIndexNodes = new ArrayList<>();
    nodes.add(standardIndexNodes);
    nodes.add(vlvIndexNodes);
@@ -835,11 +832,10 @@
  private void deleteClicked()
  {
    ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    ArrayList<LocalizableMessage> errors = new ArrayList<>();
    TreePath[] paths = treePane.getTree().getSelectionPaths();
    ArrayList<AbstractIndexDescriptor> indexesToDelete =
      new ArrayList<AbstractIndexDescriptor>();
    ArrayList<String> indexesNames = new ArrayList<String>();
    ArrayList<AbstractIndexDescriptor> indexesToDelete = new ArrayList<>();
    ArrayList<String> indexesNames = new ArrayList<>();
    if (paths != null)
    {
      for (TreePath path : paths)
@@ -902,10 +898,8 @@
    }
  }
  private HashMap<Object, ImageIcon> hmCategoryImages =
    new HashMap<Object, ImageIcon>();
  private HashMap<Class<?>, ImageIcon> hmImages =
    new HashMap<Class<?>, ImageIcon>();
  private HashMap<Object, ImageIcon> hmCategoryImages = new HashMap<>();
  private HashMap<Class<?>, ImageIcon> hmImages = new HashMap<>();
  {
    Object[] nodes = {standardIndexes, vlvIndexes};
    String[] paths = {"ds-idx-folder.png", "ds-vlv-idx-folder.png"};
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/BrowseSchemaPanel.java
@@ -717,16 +717,12 @@
    Comparator<String> lowerCaseComparator = new LowerCaseComparator();
    TreeSet<String> standardOcNames = new TreeSet<String>(lowerCaseComparator);
    HashMap<String, StandardObjectClassTreeNode> hmStandardOcs =
      new HashMap<String, StandardObjectClassTreeNode>();
    TreeSet<String> configurationOcNames =
      new TreeSet<String>(lowerCaseComparator);
    HashMap<String, ConfigurationObjectClassTreeNode> hmConfigurationOcs =
      new HashMap<String, ConfigurationObjectClassTreeNode>();
    TreeSet<String> customOcNames = new TreeSet<String>(lowerCaseComparator);
    HashMap<String, CustomObjectClassTreeNode> hmCustomOcs =
      new HashMap<String, CustomObjectClassTreeNode>();
    TreeSet<String> standardOcNames = new TreeSet<>(lowerCaseComparator);
    HashMap<String, StandardObjectClassTreeNode> hmStandardOcs = new HashMap<>();
    TreeSet<String> configurationOcNames = new TreeSet<>(lowerCaseComparator);
    HashMap<String, ConfigurationObjectClassTreeNode> hmConfigurationOcs = new HashMap<>();
    TreeSet<String> customOcNames = new TreeSet<>(lowerCaseComparator);
    HashMap<String, CustomObjectClassTreeNode> hmCustomOcs = new HashMap<>();
    for (ObjectClass oc : lastSchema.getObjectClasses().values())
    {
      if (mustAdd(oc))
@@ -752,17 +748,12 @@
    }
    TreeSet<String> standardAttrNames =
      new TreeSet<String>(lowerCaseComparator);
    HashMap<String, StandardAttributeTreeNode> hmStandardAttrs =
      new HashMap<String, StandardAttributeTreeNode>();
    TreeSet<String> configurationAttrNames =
      new TreeSet<String>(lowerCaseComparator);
    HashMap<String, ConfigurationAttributeTreeNode> hmConfigurationAttrs =
      new HashMap<String, ConfigurationAttributeTreeNode>();
    TreeSet<String> customAttrNames = new TreeSet<String>(lowerCaseComparator);
    HashMap<String, CustomAttributeTreeNode> hmCustomAttrs =
      new HashMap<String, CustomAttributeTreeNode>();
    TreeSet<String> standardAttrNames = new TreeSet<>(lowerCaseComparator);
    HashMap<String, StandardAttributeTreeNode> hmStandardAttrs = new HashMap<>();
    TreeSet<String> configurationAttrNames = new TreeSet<>(lowerCaseComparator);
    HashMap<String, ConfigurationAttributeTreeNode> hmConfigurationAttrs = new HashMap<>();
    TreeSet<String> customAttrNames = new TreeSet<>(lowerCaseComparator);
    HashMap<String, CustomAttributeTreeNode> hmCustomAttrs = new HashMap<>();
    for (AttributeType attr : lastSchema.getAttributeTypes().values())
    {
      if (mustAdd(attr))
@@ -787,10 +778,8 @@
      }
    }
    TreeSet<String> matchingRuleNames =
      new TreeSet<String>(lowerCaseComparator);
    HashMap<String, MatchingRuleTreeNode> hmMatchingRules =
      new HashMap<String, MatchingRuleTreeNode>();
    TreeSet<String> matchingRuleNames = new TreeSet<>(lowerCaseComparator);
    HashMap<String, MatchingRuleTreeNode> hmMatchingRules = new HashMap<>();
    for (MatchingRule matchingRule : lastSchema.getMatchingRules().values())
    {
      if (mustAdd(matchingRule))
@@ -801,9 +790,8 @@
      }
    }
    TreeSet<String> syntaxNames = new TreeSet<String>(lowerCaseComparator);
    HashMap<String, AttributeSyntaxTreeNode> hmSyntaxes =
      new HashMap<String, AttributeSyntaxTreeNode>();
    TreeSet<String> syntaxNames = new TreeSet<>(lowerCaseComparator);
    HashMap<String, AttributeSyntaxTreeNode> hmSyntaxes = new HashMap<>();
    for (AttributeSyntax<?> syntax : lastSchema.getSyntaxes().values())
    {
      if (mustAdd(syntax))
@@ -819,7 +807,7 @@
    }
    ArrayList<TreeSet<String>> names = new ArrayList<TreeSet<String>>();
    ArrayList<TreeSet<String>> names = new ArrayList<>();
    names.add(standardOcNames);
    names.add(standardAttrNames);
    names.add(customOcNames);
@@ -829,8 +817,7 @@
    names.add(matchingRuleNames);
    names.add(syntaxNames);
    ArrayList<HashMap<String, ? extends DefaultMutableTreeNode>> nodes =
      new ArrayList<HashMap<String, ? extends DefaultMutableTreeNode>>();
    ArrayList<HashMap<String, ? extends DefaultMutableTreeNode>> nodes = new ArrayList<>();
    nodes.add(hmStandardOcs);
    nodes.add(hmStandardAttrs);
    nodes.add(hmCustomOcs);
@@ -845,7 +832,7 @@
    String f = filter.getText().trim();
    boolean filterProvided = f.length() > 0;
    ArrayList<TreePath> toExpand = new ArrayList<TreePath>();
    ArrayList<TreePath> toExpand = new ArrayList<>();
    int i = 0;
    int positionUnderRoot = 0;
@@ -1206,10 +1193,10 @@
  private void deleteClicked()
  {
    ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    ArrayList<LocalizableMessage> errors = new ArrayList<>();
    TreePath[] paths = treePane.getTree().getSelectionPaths();
    ArrayList<ObjectClass> ocsToDelete = new ArrayList<ObjectClass>();
    ArrayList<AttributeType> attrsToDelete = new ArrayList<AttributeType>();
    ArrayList<ObjectClass> ocsToDelete = new ArrayList<>();
    ArrayList<AttributeType> attrsToDelete = new ArrayList<>();
    if (paths != null)
    {
      for (TreePath path : paths)
@@ -1266,7 +1253,7 @@
      }
      if (errors.isEmpty())
      {
        ArrayList<String> allNames = new ArrayList<String>();
        ArrayList<String> allNames = new ArrayList<>();
        if (displayConfirmationDialog(
            INFO_CTRL_PANEL_CONFIRMATION_REQUIRED_SUMMARY.get(),
            confirmationMessage))
@@ -1302,7 +1289,7 @@
  private boolean mustAdd(String name, String oid, String primaryName, Iterable<String> names)
  {
    ArrayList<String> values = new ArrayList<String>();
    ArrayList<String> values = new ArrayList<>();
    values.add(oid);
    if (primaryName != null)
    {
@@ -1551,7 +1538,7 @@
  private boolean mustAdd(String f, String oid, String name)
  {
    ArrayList<String> values = new ArrayList<String>(2);
    ArrayList<String> values = new ArrayList<>(2);
    values.add(oid);
    if (name != null)
    {
@@ -1637,10 +1624,8 @@
    }
  }
  private HashMap<Object, ImageIcon> hmCategoryImages =
    new HashMap<Object, ImageIcon>();
  private HashMap<Class<?>, ImageIcon> hmImages =
    new HashMap<Class<?>, ImageIcon>();
  private HashMap<Object, ImageIcon> hmCategoryImages = new HashMap<>();
  private HashMap<Class<?>, ImageIcon> hmImages = new HashMap<>();
  {
    Object[] nodes = {attributes, objectClasses, standardObjectClasses,
        standardAttributes, configurationObjectClasses, configurationAttributes,
@@ -1703,9 +1688,8 @@
  private LinkedHashSet<ObjectClass> getOrderedObjectClassesToDelete(
      Collection<ObjectClass> ocsToDelete)
  {
    ArrayList<ObjectClass> lOrderedOcs = new ArrayList<ObjectClass>();
    // Reorder objectClasses and attributes to delete them in the proper
    // order.
    ArrayList<ObjectClass> lOrderedOcs = new ArrayList<>();
    // Reorder objectClasses and attributes to delete them in the proper order.
    for (ObjectClass oc : ocsToDelete)
    {
      int index = -1;
@@ -1725,14 +1709,13 @@
        lOrderedOcs.add(index, oc);
      }
    }
    return new LinkedHashSet<ObjectClass>(lOrderedOcs);
    return new LinkedHashSet<>(lOrderedOcs);
  }
  private LinkedHashSet<AttributeType> getOrderedAttributesToDelete(
      Collection<AttributeType> attrsToDelete)
  {
    ArrayList<AttributeType> lOrderedAttributes =
      new ArrayList<AttributeType>();
    ArrayList<AttributeType> lOrderedAttributes = new ArrayList<>();
    for (AttributeType attr : attrsToDelete)
    {
      int index = -1;
@@ -1760,7 +1743,7 @@
        lOrderedAttributes.add(index, attr);
      }
    }
    return new LinkedHashSet<AttributeType>(lOrderedAttributes);
    return new LinkedHashSet<>(lOrderedAttributes);
  }
  private LocalizableMessage getConfirmationMessage(
@@ -1768,7 +1751,7 @@
      Collection<AttributeType> attrsToDelete,
      Schema schema)
  {
    ArrayList<ObjectClass> childClasses = new ArrayList<ObjectClass>();
    ArrayList<ObjectClass> childClasses = new ArrayList<>();
    // Analyze objectClasses
    for (ObjectClass objectClass : ocsToDelete)
    {
@@ -1782,8 +1765,8 @@
      childClasses.removeAll(ocsToDelete);
    }
    ArrayList<AttributeType> childAttributes = new ArrayList<AttributeType>();
    TreeSet<String> dependentClasses = new TreeSet<String>();
    ArrayList<AttributeType> childAttributes = new ArrayList<>();
    TreeSet<String> dependentClasses = new TreeSet<>();
    // Analyze attributes
    for (AttributeType attribute : attrsToDelete)
    {
@@ -1816,7 +1799,7 @@
    LocalizableMessageBuilder mb = new LocalizableMessageBuilder();
    if (!childClasses.isEmpty())
    {
      TreeSet<String> childNames = new TreeSet<String>();
      TreeSet<String> childNames = new TreeSet<>();
      for (ObjectClass oc : childClasses)
      {
        childNames.add(oc.getNameOrOID());
@@ -1836,7 +1819,7 @@
    }
    if (!childAttributes.isEmpty())
    {
      TreeSet<String> childNames = new TreeSet<String>();
      TreeSet<String> childNames = new TreeSet<>();
      for (AttributeType attr : childAttributes)
      {
        childNames.add(attr.getNameOrOID());
@@ -1870,7 +1853,7 @@
      mb.append("<br>");
    }
    ArrayList<String> allNames = new ArrayList<String>();
    ArrayList<String> allNames = new ArrayList<>();
    for (ObjectClass ocToDelete : ocsToDelete)
    {
      allNames.add(ocToDelete.getNameOrOID());
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ConnectionHandlerMonitoringPanel.java
@@ -109,8 +109,7 @@
  private ConnectionHandlerMonitoringMenuBar menuBar;
  private LinkedHashSet<MonitoringAttributes> chOperations =
    new LinkedHashSet<MonitoringAttributes>();
  private LinkedHashSet<MonitoringAttributes> chOperations = new LinkedHashSet<>();
  {
    chOperations.add(BasicMonitoringAttributes.ADD_REQUESTS);
    chOperations.add(BasicMonitoringAttributes.BIND_REQUESTS);
@@ -119,8 +118,7 @@
    chOperations.add(BasicMonitoringAttributes.MOD_DN_REQUESTS);
    chOperations.add(BasicMonitoringAttributes.SEARCH_REQUESTS);
  }
  private LinkedHashSet<MonitoringAttributes> allowedChOperations =
    new LinkedHashSet<MonitoringAttributes>();
  private LinkedHashSet<MonitoringAttributes> allowedChOperations = new LinkedHashSet<>();
  {
    allowedChOperations.addAll(chOperations);
    allowedChOperations.add(BasicMonitoringAttributes.ADD_RESPONSES);
@@ -217,12 +215,11 @@
        "Third Connection Handler", "Fourth Connection Handler",
        "Fifth Connection Handler", "Connection Handler with a long name"};
    Set<ConnectionHandlerDescriptor> fakeData =
      new HashSet<ConnectionHandlerDescriptor>();
    Set<ConnectionHandlerDescriptor> fakeData = new HashSet<>();
    connectionHandlersTableModel.setAttributes(chOperations, false);
    try
    {
      Set<InetAddress> addresses = new HashSet<InetAddress>();
      Set<InetAddress> addresses = new HashSet<>();
      addresses.add(InetAddress.getLocalHost());
      Set<CustomSearchResult> emptySet = Collections.emptySet();
      for (String name : names)
@@ -277,14 +274,14 @@
  public void configurationChanged(ConfigurationChangeEvent ev)
  {
    final ServerDescriptor server = ev.getNewDescriptor();
    LinkedHashSet<Object> newElements = new LinkedHashSet<Object>();
    LinkedHashSet<Object> newElements = new LinkedHashSet<>();
    newElements.add(new CategorizedComboBoxElement(ALL_CONNECTION_HANDLERS,
        CategorizedComboBoxElement.Type.REGULAR));
    Set<ConnectionHandlerDescriptor> chs = server.getConnectionHandlers();
    SortedSet<ConnectionHandlerDescriptor> sortedChs =
      new TreeSet<ConnectionHandlerDescriptor>(
      new TreeSet<>(
          new Comparator<ConnectionHandlerDescriptor>()
          {
            public int compare(ConnectionHandlerDescriptor desc1,
@@ -525,8 +522,7 @@
  private Set<ConnectionHandlerDescriptor> getFilteredConnectionHandlers(
      ServerDescriptor server)
  {
    Set<ConnectionHandlerDescriptor> cchs =
      new HashSet<ConnectionHandlerDescriptor>();
    Set<ConnectionHandlerDescriptor> cchs = new HashSet<>();
    if (server != null)
    {
      Object o = connectionHandlers.getSelectedItem();
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java
@@ -167,7 +167,7 @@
  private JList requiredBy = new JList(new DefaultListModel());
  private JList optionalBy = new JList(new DefaultListModel());
  private Set<String> lastAliases = new LinkedHashSet<String>();
  private Set<String> lastAliases = new LinkedHashSet<>();
  private LocalizableMessage NO_PARENT = INFO_CTRL_PANEL_NO_PARENT_FOR_ATTRIBUTE.get();
  private LocalizableMessage NO_MATCHING_RULE =
@@ -248,7 +248,7 @@
      @Override
      public void actionPerformed(ActionEvent ev)
      {
        ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
        ArrayList<LocalizableMessage> errors = new ArrayList<>();
        saveChanges(false, errors);
      }
    });
@@ -536,7 +536,7 @@
    result = unsavedChangesDlg.getResult();
    if (result == UnsavedChangesDialog.Result.SAVE)
    {
      ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
      ArrayList<LocalizableMessage> errors = new ArrayList<>();
      saveChanges(true, errors);
      if (!errors.isEmpty())
      {
@@ -628,7 +628,7 @@
    }
    Comparator<String> lowerCaseComparator = new LowerCaseComparator();
    SortedSet<String> requiredByOcs = new TreeSet<String>(lowerCaseComparator);
    SortedSet<String> requiredByOcs = new TreeSet<>(lowerCaseComparator);
    for (ObjectClass oc : schema.getObjectClasses().values())
    {
      if (oc.getRequiredAttributeChain().contains(attr))
@@ -644,7 +644,7 @@
      model.addElement(oc);
    }
    SortedSet<String> optionalByOcs = new TreeSet<String>(lowerCaseComparator);
    SortedSet<String> optionalByOcs = new TreeSet<>(lowerCaseComparator);
    for (ObjectClass oc : schema.getObjectClasses().values())
    {
      if (oc.getOptionalAttributeChain().contains(attr))
@@ -676,8 +676,7 @@
  @Override
  public void configurationChanged(ConfigurationChangeEvent ev)
  {
    ArrayList<AttributeSyntax<?>> newSyntaxes =
      new ArrayList<AttributeSyntax<?>>();
    ArrayList<AttributeSyntax<?>> newSyntaxes = new ArrayList<>();
    final ServerDescriptor desc = ev.getNewDescriptor();
    Schema s = desc.getSchema();
@@ -702,8 +701,7 @@
    if (schemaChanged)
    {
      schema = s;
      HashMap<String, AttributeSyntax<?>> syntaxNameMap = new HashMap<String,
      AttributeSyntax<?>>();
      HashMap<String, AttributeSyntax<?>> syntaxNameMap = new HashMap<>();
      for (String key : schema.getSyntaxes().keySet())
      {
        AttributeSyntax<?> syntax = schema.getSyntax(key);
@@ -715,8 +713,7 @@
        syntaxNameMap.put(name, syntax);
      }
      SortedSet<String> orderedKeys =
        new TreeSet<String>(new LowerCaseComparator());
      SortedSet<String> orderedKeys = new TreeSet<>(new LowerCaseComparator());
      orderedKeys.addAll(syntaxNameMap.keySet());
      for (String key : orderedKeys)
      {
@@ -725,8 +722,7 @@
      updateComboBoxModel(newSyntaxes,
          ((DefaultComboBoxModel)syntax.getModel()));
      HashMap<String, AttributeType> attributeNameMap = new HashMap<String,
      AttributeType>();
      HashMap<String, AttributeType> attributeNameMap = new HashMap<>();
      for (String key : schema.getAttributeTypes().keySet())
      {
        AttributeType attr = schema.getAttributeType(key);
@@ -734,7 +730,7 @@
      }
      orderedKeys.clear();
      orderedKeys.addAll(attributeNameMap.keySet());
      ArrayList<Object> newParents = new ArrayList<Object>();
      ArrayList<Object> newParents = new ArrayList<>();
      for (String key : orderedKeys)
      {
        newParents.add(attributeNameMap.get(key));
@@ -743,14 +739,12 @@
      updateComboBoxModel(newParents,
          ((DefaultComboBoxModel)parent.getModel()));
      ArrayList<MatchingRule> approximateElements =
        new ArrayList<MatchingRule>();
      ArrayList<MatchingRule> equalityElements = new ArrayList<MatchingRule>();
      ArrayList<MatchingRule> orderingElements = new ArrayList<MatchingRule>();
      ArrayList<MatchingRule> substringElements = new ArrayList<MatchingRule>();
      ArrayList<MatchingRule> approximateElements = new ArrayList<>();
      ArrayList<MatchingRule> equalityElements = new ArrayList<>();
      ArrayList<MatchingRule> orderingElements = new ArrayList<>();
      ArrayList<MatchingRule> substringElements = new ArrayList<>();
      HashMap<String, MatchingRule> matchingRuleNameMap = new HashMap<String,
      MatchingRule>();
      HashMap<String, MatchingRule> matchingRuleNameMap = new HashMap<>();
      for (String key : schema.getMatchingRules().keySet())
      {
        MatchingRule rule = schema.getMatchingRule(key);
@@ -780,8 +774,7 @@
        }
      }
      JComboBox[] combos = {approximate, equality, ordering, substring};
      ArrayList<ArrayList<MatchingRule>> ruleNames =
        new ArrayList<ArrayList<MatchingRule>>();
      ArrayList<ArrayList<MatchingRule>> ruleNames = new ArrayList<>();
      ruleNames.add(approximateElements);
      ruleNames.add(equalityElements);
      ruleNames.add(orderingElements);
@@ -848,15 +841,14 @@
  private void deleteAttribute()
  {
    ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    ArrayList<LocalizableMessage> errors = new ArrayList<>();
    Schema schema = getInfo().getServerDescriptor().getSchema();
    ProgressDialog dlg = new ProgressDialog(
        Utilities.createFrame(),
        Utilities.getParentDialog(this),
        INFO_CTRL_PANEL_DELETE_ATTRIBUTE_TITLE.get(), getInfo());
    LinkedHashSet<AttributeType> attrsToDelete =
      new LinkedHashSet<AttributeType>(1);
    LinkedHashSet<AttributeType> attrsToDelete = new LinkedHashSet<>(1);
    attrsToDelete.add(attribute);
    Task newTask = new DeleteSchemaElementsTask(getInfo(), dlg,
@@ -865,8 +857,8 @@
    {
      task.canLaunch(newTask, errors);
    }
    TreeSet<String> childAttributes = new TreeSet<String>();
    TreeSet<String> dependentClasses = new TreeSet<String>();
    TreeSet<String> childAttributes = new TreeSet<>();
    TreeSet<String> dependentClasses = new TreeSet<>();
    if (schema != null)
    {
      for (AttributeType attr : schema.getAttributeTypes().values())
@@ -1140,7 +1132,7 @@
  private ArrayList<String> getAliases()
  {
    ArrayList<String> al = new ArrayList<String>();
    ArrayList<String> al = new ArrayList<>();
    String s = aliases.getText().trim();
    if (s.length() > 0)
    {
@@ -1155,7 +1147,7 @@
  private ArrayList<String> getAllNames()
  {
    ArrayList<String> al = new ArrayList<String>();
    ArrayList<String> al = new ArrayList<>();
    al.add(getAttributeName());
    al.addAll(getAliases());
    return al;
@@ -1224,18 +1216,18 @@
  private Map<String, List<String>> getExtraProperties()
  {
    Map<String, List<String>> map = new HashMap<String, List<String>>();
    Map<String, List<String>> map = new HashMap<>();
    String f = file.getText().trim();
    if (f.length() > 0)
    {
      ArrayList<String> list = new ArrayList<String>();
      ArrayList<String> list = new ArrayList<>();
      list.add(f);
      map.put(ServerConstants.SCHEMA_PROPERTY_FILENAME, list);
    }
    String or = origin.getText().trim();
    if (or.length() > 0)
    {
      ArrayList<String> list = new ArrayList<String>();
      ArrayList<String> list = new ArrayList<>();
      list.add(or);
      map.put(ServerConstants.SCHEMA_PROPERTY_ORIGIN, list);
    }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/CustomObjectClassPanel.java
@@ -130,10 +130,8 @@
  private JLabel lAttributes = Utilities.createPrimaryLabel(
      INFO_CTRL_PANEL_OBJECTCLASS_ATTRIBUTES_LABEL.get());
  private Set<AttributeType> inheritedOptionalAttributes =
    new HashSet<AttributeType>();
  private Set<AttributeType> inheritedRequiredAttributes =
    new HashSet<AttributeType>();
  private Set<AttributeType> inheritedOptionalAttributes = new HashSet<>();
  private Set<AttributeType> inheritedRequiredAttributes = new HashSet<>();
  private JLabel[] labels = {lName, lSuperior, lOID, lAliases, lOrigin, lFile,
      lDescription, lType, lAttributes
@@ -152,7 +150,7 @@
  private DoubleAddRemovePanel<AttributeType> attributes;
  private Schema schema;
  private Set<String> lastAliases = new LinkedHashSet<String>();
  private Set<String> lastAliases = new LinkedHashSet<>();
  private boolean ignoreChangeEvents;
@@ -228,7 +226,7 @@
      @Override
      public void actionPerformed(ActionEvent ev)
      {
        ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
        ArrayList<LocalizableMessage> errors = new ArrayList<>();
        saveChanges(false, errors);
      }
    });
@@ -277,8 +275,7 @@
    SchemaElementComboBoxCellRenderer(type);
    type.setRenderer(renderer);
    attributes =
      new DoubleAddRemovePanel<AttributeType>(0, AttributeType.class);
    attributes = new DoubleAddRemovePanel<>(0, AttributeType.class);
    Comparator<AttributeType> comparator = new Comparator<AttributeType>()
    {
      /** {@inheritDoc} */
@@ -649,7 +646,7 @@
    result = unsavedChangesDlg.getResult();
    if (result == UnsavedChangesDialog.Result.SAVE)
    {
      ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
      ArrayList<LocalizableMessage> errors = new ArrayList<>();
      saveChanges(true, errors);
      if (!errors.isEmpty())
      {
@@ -675,15 +672,14 @@
  private void deleteObjectclass()
  {
    ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    ArrayList<LocalizableMessage> errors = new ArrayList<>();
    ProgressDialog dlg = new ProgressDialog(
        Utilities.createFrame(),
        Utilities.getParentDialog(this),
        INFO_CTRL_PANEL_DELETE_OBJECTCLASS_TITLE.get(), getInfo());
    LinkedHashSet<ObjectClass> ocsToDelete = new LinkedHashSet<ObjectClass>();
    LinkedHashSet<ObjectClass> ocsToDelete = new LinkedHashSet<>();
    ocsToDelete.add(objectClass);
    LinkedHashSet<AttributeType> attrsToDelete =
      new LinkedHashSet<AttributeType>(0);
    LinkedHashSet<AttributeType> attrsToDelete = new LinkedHashSet<>(0);
    DeleteSchemaElementsTask newTask = new DeleteSchemaElementsTask(getInfo(),
        dlg, ocsToDelete, attrsToDelete);
@@ -692,7 +688,7 @@
      task.canLaunch(newTask, errors);
    }
    Schema schema = getInfo().getServerDescriptor().getSchema();
    ArrayList<String> childClasses = new ArrayList<String>();
    ArrayList<String> childClasses = new ArrayList<>();
    if (schema != null)
    {
      for (ObjectClass o : schema.getObjectClasses().values())
@@ -931,7 +927,7 @@
  private Set<String> getAliases()
  {
    Set<String> al = new LinkedHashSet<String>();
    Set<String> al = new LinkedHashSet<>();
    String s = aliases.getText().trim();
    if (s.length() > 0)
    {
@@ -961,18 +957,18 @@
  private Map<String, List<String>> getExtraProperties()
  {
    Map<String, List<String>> map = new HashMap<String, List<String>>();
    Map<String, List<String>> map = new HashMap<>();
    String f = file.getText().trim();
    if (f.length() > 0)
    {
      ArrayList<String> list = new ArrayList<String>();
      ArrayList<String> list = new ArrayList<>();
      list.add(f);
      map.put(ServerConstants.SCHEMA_PROPERTY_FILENAME, list);
    }
    String or = origin.getText().trim();
    if (or.length() > 0)
    {
      ArrayList<String> list = new ArrayList<String>();
      ArrayList<String> list = new ArrayList<>();
      list.add(or);
      map.put(ServerConstants.SCHEMA_PROPERTY_ORIGIN, list);
    }
@@ -981,7 +977,7 @@
  private ArrayList<String> getAllNames()
  {
    ArrayList<String> al = new ArrayList<String>();
    ArrayList<String> al = new ArrayList<>();
    al.add(getObjectClassName());
    al.addAll(getAliases());
    return al;
@@ -1014,7 +1010,7 @@
  private Set<AttributeType> intersect(Set<AttributeType> set1, Set<AttributeType> set2)
  {
    HashSet<AttributeType> attrs = new HashSet<AttributeType>(set1);
    HashSet<AttributeType> attrs = new HashSet<>(set1);
    attrs.removeAll(set2);
    return attrs;
  }
@@ -1054,7 +1050,7 @@
    attributes.getAvailableListModel().addAll(allAttrs);
    HashSet<AttributeType> toDelete = new HashSet<AttributeType>();
    HashSet<AttributeType> toDelete = new HashSet<>();
    for (AttributeType attr : attributes.getSelectedListModel1().getData())
    {
      if (!allAttrs.contains(attr))
@@ -1071,7 +1067,7 @@
      attributes.getSelectedListModel1().remove(attr);
    }
    toDelete = new HashSet<AttributeType>();
    toDelete = new HashSet<>();
    for (AttributeType attr : attributes.getSelectedListModel2().getData())
    {
      if (!allAttrs.contains(attr))
@@ -1093,7 +1089,7 @@
    {
      if (sel != null)
      {
        ArrayList<Integer> indexes = new ArrayList<Integer>();
        ArrayList<Integer> indexes = new ArrayList<>();
        for (int element : sel)
        {
          if (element < lists[i].getModel().getSize())
@@ -1144,8 +1140,7 @@
      attributes.getSelectedListModel2().add(attr);
    }
    Collection<AttributeType> unmovableItems =
      new ArrayList<AttributeType>(inheritedRequiredAttributes);
    Collection<AttributeType> unmovableItems = new ArrayList<>(inheritedRequiredAttributes);
    unmovableItems.addAll(inheritedOptionalAttributes);
    attributes.setUnmovableItems(unmovableItems);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/DBEnvironmentMonitoringPanel.java
@@ -67,8 +67,8 @@
  private JLabel noMonitoringFound;
  private JButton showOperations;
  private LinkedHashSet<String> attributes = new LinkedHashSet<String>();
  private LinkedHashSet<String> allAttributes = new LinkedHashSet<String>();
  private LinkedHashSet<String> attributes = new LinkedHashSet<>();
  private LinkedHashSet<String> allAttributes = new LinkedHashSet<>();
  private MonitoringAttributesViewPanel<String> operationViewPanel;
  private GenericDialog operationViewDlg;
@@ -166,9 +166,9 @@
    {
      server = getInfo().getServerDescriptor();
    }
    Set<BackendDescriptor> dbBackends = new HashSet<BackendDescriptor>();
    Set<BackendDescriptor> dbBackends = new HashSet<>();
    boolean updateAttributes = allAttributes.isEmpty();
    SortedSet<String> sortedAttrNames = new TreeSet<String>();
    SortedSet<String> sortedAttrNames = new TreeSet<>();
    if (server != null)
    {
      for (BackendDescriptor backend : server.getBackends())
@@ -253,7 +253,7 @@
  private Set<String> getMonitoringAttributes(BackendDescriptor backend)
  {
    Set<String> attrNames = new HashSet<String>();
    Set<String> attrNames = new HashSet<>();
    if (backend.getMonitoringEntry() != null)
    {
      Set<String> allNames = backend.getMonitoringEntry().getAttributeNames();
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/DeleteBackendPanel.java
@@ -83,7 +83,7 @@
  public void configurationChanged(ConfigurationChangeEvent ev)
  {
    ServerDescriptor desc = ev.getNewDescriptor();
    final SortedSet<String> newElements = new TreeSet<String>();
    final SortedSet<String> newElements = new TreeSet<>();
    for (BackendDescriptor backend : desc.getBackends())
    {
      if (!backend.isConfigBackend())
@@ -101,14 +101,13 @@
  /** {@inheritDoc} */
  public void okClicked()
  {
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>();
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<>();
    ProgressDialog progressDialog = new ProgressDialog(
        Utilities.createFrame(),
        Utilities.getParentDialog(this), getTitle(), getInfo());
    @SuppressWarnings("deprecation")
    Object[] backends = list.getSelectedValues();
    ArrayList<BackendDescriptor> backendsToDelete =
      new ArrayList<BackendDescriptor>();
    ArrayList<BackendDescriptor> backendsToDelete = new ArrayList<>();
    for (Object o : backends)
    {
      String id = (String)o;
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/DeleteBaseDNPanel.java
@@ -166,7 +166,7 @@
        {
          @SuppressWarnings("deprecation")
          Object[] s = list.getSelectedValues();
          Set<Object> selected = new HashSet<Object>();
          Set<Object> selected = new HashSet<>();
          if (s != null)
          {
            for (Object o : s)
@@ -176,7 +176,7 @@
          }
          final DefaultListModel model = (DefaultListModel)list.getModel();
          model.clear();
          SortedSet<Integer> indices = new TreeSet<Integer>();
          SortedSet<Integer> indices = new TreeSet<>();
          int i = 0;
          for (Object newElement : newElements)
          {
@@ -335,7 +335,7 @@
  public void configurationChanged(ConfigurationChangeEvent ev)
  {
    ServerDescriptor desc = ev.getNewDescriptor();
    final SortedSet<DN> newElements = new TreeSet<DN>();
    final SortedSet<DN> newElements = new TreeSet<>();
    for (BackendDescriptor backend : desc.getBackends())
    {
      if (!backend.isConfigBackend())
@@ -356,14 +356,13 @@
  /** {@inheritDoc} */
  public void okClicked()
  {
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>();
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<>();
    ProgressDialog progressDialog = new ProgressDialog(
        Utilities.createFrame(),
        Utilities.getParentDialog(this), getTitle(), getInfo());
    @SuppressWarnings("deprecation")
    Object[] dns = list.getSelectedValues();
    ArrayList<BaseDNDescriptor> baseDNsToDelete =
      new ArrayList<BaseDNDescriptor>();
    ArrayList<BaseDNDescriptor> baseDNsToDelete = new ArrayList<>();
    for (Object o : dns)
    {
      DN dn = (DN)o;
@@ -422,20 +421,19 @@
      Collection<BaseDNDescriptor> baseDNsToDelete)
  {
    LocalizableMessageBuilder mb = new LocalizableMessageBuilder();
    Map<String, Set<BaseDNDescriptor>> hmBackends =
      new HashMap<String, Set<BaseDNDescriptor>>();
    Map<String, Set<BaseDNDescriptor>> hmBackends = new HashMap<>();
    for (BaseDNDescriptor baseDN : baseDNsToDelete)
    {
      String backendID = baseDN.getBackend().getBackendID();
      Set<BaseDNDescriptor> set = hmBackends.get(backendID);
      if (set == null)
      {
        set = new HashSet<BaseDNDescriptor>();
        set = new HashSet<>();
        hmBackends.put(backendID, set);
      }
      set.add(baseDN);
    }
    ArrayList<String> indirectBackendsToDelete = new ArrayList<String>();
    ArrayList<String> indirectBackendsToDelete = new ArrayList<>();
    for (Set<BaseDNDescriptor> set : hmBackends.values())
    {
      BackendDescriptor backend = set.iterator().next().getBackend();
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/EntryCachesMonitoringPanel.java
@@ -53,14 +53,14 @@
      ENTRY_CACHE_TRIES, ENTRY_CACHE_HITS, ENTRY_CACHE_HIT_RATIO, CURRENT_ENTRY_CACHE_SIZE, MAX_ENTRY_CACHE_SIZE,
      CURRENT_ENTRY_CACHE_COUNT, MAX_ENTRY_CACHE_COUNT));
  private ArrayList<JLabel> monitoringLabels = new ArrayList<JLabel>();
  private ArrayList<JLabel> monitoringLabels = new ArrayList<>();
  {
    for (int i=0; i<ngOperations.size(); i++)
    {
      monitoringLabels.add(Utilities.createDefaultLabel());
    }
  }
  private ArrayList<JLabel> labels = new ArrayList<JLabel>();
  private ArrayList<JLabel> labels = new ArrayList<>();
  {
    for (int i=0; i<ngOperations.size(); i++)
    {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ExportLDIFPanel.java
@@ -350,7 +350,7 @@
    setPrimaryValid(lBackend);
    setPrimaryValid(lFile);
    setPrimaryValid(lExportOptions);
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>();
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<>();
    String backendName = (String)backends.getSelectedItem();
    if (backendName == null)
@@ -460,7 +460,7 @@
    public ExportTask(ControlPanelInfo info, ProgressDialog dlg)
    {
      super(info, dlg);
      backendSet = new HashSet<String>();
      backendSet = new HashSet<>();
      backendSet.add((String)backends.getSelectedItem());
      fileName = file.getText();
    }
@@ -543,7 +543,7 @@
    /** {@inheritDoc} */
    protected ArrayList<String> getCommandLineArguments()
    {
      ArrayList<String> args = new ArrayList<String>();
      ArrayList<String> args = new ArrayList<>();
      args.add("--ldifFile");
      args.add(fileName);
      args.add("--backendID");
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ImportLDIFPanel.java
@@ -565,7 +565,7 @@
    setPrimaryValid(lRejectsFile);
    setPrimaryValid(lSkipsFile);
    setPrimaryValid(lThreads);
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>();
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<>();
    String backendName = (String)backends.getSelectedItem();
    if (backendName == null)
@@ -659,7 +659,7 @@
        }
        else if (!overwrite.isSelected() && canInitialize)
        {
          ArrayList<String> dns = new ArrayList<String>();
          ArrayList<String> dns = new ArrayList<>();
          for (DN dn : replicatedBaseDNs)
          {
            dns.add(dn.toString());
@@ -671,7 +671,7 @@
        }
        else if (overwrite.isSelected() && canInitialize)
        {
          ArrayList<String> dns = new ArrayList<String>();
          ArrayList<String> dns = new ArrayList<>();
          for (DN dn : replicatedBaseDNs)
          {
            dns.add(dn.toString());
@@ -742,7 +742,7 @@
  private Set<DN> getReplicatedBaseDNs()
  {
    Set<DN> baseDNs = new TreeSet<DN>();
    Set<DN> baseDNs = new TreeSet<>();
    String backendID = (String)backends.getSelectedItem();
    if (backendID != null)
    {
@@ -783,7 +783,7 @@
    public ImportTask(ControlPanelInfo info, ProgressDialog dlg)
    {
      super(info, dlg);
      backendSet = new HashSet<String>();
      backendSet = new HashSet<>();
      backendSet.add((String)backends.getSelectedItem());
      fileName = file.getText();
      replicatedBaseDNs = getReplicatedBaseDNs();
@@ -834,7 +834,7 @@
    @Override
    protected ArrayList<String> getCommandLineArguments()
    {
      ArrayList<String> args = new ArrayList<String>();
      ArrayList<String> args = new ArrayList<>();
      args.add("--ldifFile");
      args.add(fileName);
      args.add("--backendID");
@@ -952,7 +952,7 @@
        lastException = t;
        state = State.FINISHED_WITH_ERROR;
      }
      HashSet<BackendDescriptor> backends = new HashSet<BackendDescriptor>();
      HashSet<BackendDescriptor> backends = new HashSet<>();
      for (BackendDescriptor backend :
        getInfo().getServerDescriptor().getBackends())
      {
@@ -1004,7 +1004,7 @@
    private String getCommandLineToInitializeAll()
    {
      String cmdLineName = getCommandLinePath("dsreplication");
      ArrayList<String> args = new ArrayList<String>();
      ArrayList<String> args = new ArrayList<>();
      args.add(
          ReplicationCliArgumentParser.INITIALIZE_ALL_REPLICATION_SUBCMD_NAME);
      args.add("--hostName");
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/InclusionExclusionPanel.java
@@ -568,7 +568,7 @@
     */
    protected ArrayList<String> getCommandLineArguments()
    {
      ArrayList<String> args = new ArrayList<String>();
      ArrayList<String> args = new ArrayList<>();
      String s = dnsToInclude.getText();
      if (s.trim().length() > 0)
      {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/IndexPanel.java
@@ -301,12 +301,12 @@
  private void deleteIndex()
  {
    List<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    List<LocalizableMessage> errors = new ArrayList<>();
    ProgressDialog dlg = new ProgressDialog(
        Utilities.createFrame(),
        Utilities.getParentDialog(this),
        INFO_CTRL_PANEL_DELETE_INDEX_TITLE.get(), getInfo());
    ArrayList<AbstractIndexDescriptor> indexesToDelete = new ArrayList<AbstractIndexDescriptor>();
    ArrayList<AbstractIndexDescriptor> indexesToDelete = new ArrayList<>();
    indexesToDelete.add(index);
    DeleteIndexTask newTask = new DeleteIndexTask(getInfo(), dlg, indexesToDelete);
    for (Task task : getInfo().getTasks())
@@ -492,7 +492,7 @@
    private String backendName;
    private int entryLimitValue;
    private IndexDescriptor indexToModify;
    private SortedSet<IndexTypeDescriptor> indexTypes = new TreeSet<IndexTypeDescriptor>();
    private SortedSet<IndexTypeDescriptor> indexTypes = new TreeSet<>();
    private IndexDescriptor modifiedIndex;
    /**
@@ -507,7 +507,7 @@
    {
      super(info, dlg);
      backendName = index.getBackend().getBackendID();
      backendSet = new HashSet<String>();
      backendSet = new HashSet<>();
      backendSet.add(backendName);
      attributeName = index.getName();
      entryLimitValue = Integer.parseInt(entryLimit.getText());
@@ -694,7 +694,7 @@
    /** {@inheritDoc} */
    protected ArrayList<String> getCommandLineArguments()
    {
      return new ArrayList<String>();
      return new ArrayList<>();
    }
    /**
@@ -751,7 +751,7 @@
    private List<String> getDSConfigCommandLineArguments()
    {
      List<String> args = new ArrayList<String>();
      List<String> args = new ArrayList<>();
      args.add("set-local-db-index-prop");
      args.add("--backend-name");
      args.add(backendName);
@@ -762,7 +762,7 @@
      if (!indexTypes.equals(indexToModify.getTypes()))
      {
        // To add
        Set<IndexTypeDescriptor> toAdd = new TreeSet<IndexTypeDescriptor>();
        Set<IndexTypeDescriptor> toAdd = new TreeSet<>();
        for (IndexTypeDescriptor newType : indexTypes)
        {
          if (!indexToModify.getTypes().contains(newType))
@@ -771,7 +771,7 @@
          }
        }
        // To delete
        Set<IndexTypeDescriptor> toDelete = new TreeSet<IndexTypeDescriptor>();
        Set<IndexTypeDescriptor> toDelete = new TreeSet<>();
        for (IndexTypeDescriptor oldType : indexToModify.getTypes())
        {
          if (!indexTypes.contains(oldType))
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/JavaInformationMonitoringPanel.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 *      Portions Copyright 2014-2015 ForgeRock AS
 */
package org.opends.guitools.controlpanel.ui;
@@ -61,8 +61,7 @@
public class JavaInformationMonitoringPanel extends GeneralMonitoringPanel
{
  private static final long serialVersionUID = 9031734563799969830L;
  private List<BasicMonitoringAttributes> generalAttributes =
    new ArrayList<BasicMonitoringAttributes>();
  private List<BasicMonitoringAttributes> generalAttributes = new ArrayList<>();
  {
    generalAttributes.add(BasicMonitoringAttributes.JVM_VERSION);
    generalAttributes.add(BasicMonitoringAttributes.JVM_VENDOR);
@@ -72,15 +71,13 @@
    generalAttributes.add(BasicMonitoringAttributes.JAVA_VERSION);
    generalAttributes.add(BasicMonitoringAttributes.JAVA_VENDOR);
  }
  private List<BasicMonitoringAttributes> extraAttributes =
    new ArrayList<BasicMonitoringAttributes>();
  private List<BasicMonitoringAttributes> extraAttributes = new ArrayList<>();
  {
    extraAttributes.add(BasicMonitoringAttributes.CLASS_PATH);
    extraAttributes.add(BasicMonitoringAttributes.JAVA_VERSION);
    extraAttributes.add(BasicMonitoringAttributes.JAVA_VENDOR);
  }
  private ArrayList<JComponent> generalMonitoringComps =
    new ArrayList<JComponent>();
  private ArrayList<JComponent> generalMonitoringComps = new ArrayList<>();
  {
    for (int i=0; i<generalAttributes.size(); i++)
    {
@@ -101,8 +98,8 @@
    }
  }
  private List<String> memoryAttributes = new ArrayList<String>();
  private List<JLabel> memoryLabels = new ArrayList<JLabel>();
  private List<String> memoryAttributes = new ArrayList<>();
  private List<JLabel> memoryLabels = new ArrayList<>();
  private JPanel memoryPanel;
  /**
@@ -354,7 +351,7 @@
      if (memoryAttributes.isEmpty())
      {
        Set<String> allNames = csrMemory.getAttributeNames();
        SortedSet<String> sortedNames = new TreeSet<String>();
        SortedSet<String> sortedNames = new TreeSet<>();
        for (String attrName : allNames)
        {
          if (!OBJECTCLASS_ATTRIBUTE_TYPE_NAME.equalsIgnoreCase(attrName)
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/JavaPropertiesPanel.java
@@ -108,14 +108,9 @@
  private JCheckBox showAll;
  private Set<JavaArgumentsDescriptor> readJavaArguments =
    new HashSet<JavaArgumentsDescriptor>();
  private Set<JavaArgumentsDescriptor> currentJavaArguments =
    new HashSet<JavaArgumentsDescriptor>();
  private Set<String> allScriptNames =
    new HashSet<String>();
  private Set<JavaArgumentsDescriptor> readJavaArguments = new HashSet<>();
  private Set<JavaArgumentsDescriptor> currentJavaArguments = new HashSet<>();
  private Set<String> allScriptNames = new HashSet<>();
  {
    String[] names =
    {
@@ -136,9 +131,7 @@
    }
  }
  private Set<String> relevantScriptNames =
    new HashSet<String>();
  private Set<String> relevantScriptNames = new HashSet<>();
  {
    String[] relevantNames =
    {
@@ -414,8 +407,7 @@
    p.add(inlineHelp, gbc);
    // Just to create space.
    Set<JavaArgumentsDescriptor> fakeArguments =
      new HashSet<JavaArgumentsDescriptor>();
    Set<JavaArgumentsDescriptor> fakeArguments = new HashSet<>();
    fakeArguments.add(
        new JavaArgumentsDescriptor("start-ds", "-server -XM256j"));
    fakeArguments.add(
@@ -526,11 +518,9 @@
   */
  private Set<JavaArgumentsDescriptor> getCurrentJavaArguments()
  {
    HashSet<JavaArgumentsDescriptor> args =
      new HashSet<JavaArgumentsDescriptor>(currentJavaArguments);
    HashSet<JavaArgumentsDescriptor> args = new HashSet<>(currentJavaArguments);
    HashSet<JavaArgumentsDescriptor> tableArgs =
      new HashSet<JavaArgumentsDescriptor>();
    HashSet<JavaArgumentsDescriptor> tableArgs = new HashSet<>();
    for (int i=0; i<argumentsTableModel.getRowCount(); i++)
    {
      tableArgs.add(argumentsTableModel.getJavaArguments(i));
@@ -573,8 +563,7 @@
    }
    else
    {
      Set<JavaArgumentsDescriptor> filteredArgs =
        new HashSet<JavaArgumentsDescriptor>();
      Set<JavaArgumentsDescriptor> filteredArgs = new HashSet<>();
      for (String relevantName : getRelevantCommandLineNames())
      {
        for (JavaArgumentsDescriptor arg : args)
@@ -739,7 +728,7 @@
  {
    editor.stopCellEditing();
    final ArrayList<LocalizableMessage> javaHomeErrors = new ArrayList<LocalizableMessage>();
    final ArrayList<LocalizableMessage> javaHomeErrors = new ArrayList<>();
    String f = javaHome.getText().trim();
    if (f.length() > 0)
    {
@@ -763,7 +752,7 @@
    }
    if (javaHomeErrors.isEmpty())
    {
      final Set<String> providedArguments = new HashSet<String>();
      final Set<String> providedArguments = new HashSet<>();
      for (JavaArgumentsDescriptor cmd : getCurrentJavaArguments())
      {
        String args = cmd.getJavaArguments().trim();
@@ -785,8 +774,8 @@
        {
          String[] jvms;
          String userJVM = javaHome.getText();
          ArrayList<LocalizableMessage> errorMessages = new ArrayList<LocalizableMessage>();
          ArrayList<LocalizableMessage> confirmationMessages = new ArrayList<LocalizableMessage>();
          ArrayList<LocalizableMessage> errorMessages = new ArrayList<>();
          ArrayList<LocalizableMessage> confirmationMessages = new ArrayList<>();
          String defaultJVM = System.getenv(SetupUtils.OPENDJ_JAVA_HOME);
          if (defaultJVM == null)
          {
@@ -806,7 +795,7 @@
          }
          for (String jvm : jvms)
          {
            Set<String> notWorkingArgs = new HashSet<String>();
            Set<String> notWorkingArgs = new HashSet<>();
            String installPath = getInfo().getServerDescriptor().
            getInstallPath();
@@ -929,12 +918,12 @@
      }
      else
      {
        ArrayList<String> s = new ArrayList<String>();
        ArrayList<String> s = new ArrayList<>();
        for (LocalizableMessage msg : javaHomeErrors)
        {
          s.add(msg.toString());
        }
        ArrayList<LocalizableMessage> msgs = new ArrayList<LocalizableMessage>();
        ArrayList<LocalizableMessage> msgs = new ArrayList<>();
        LocalizableMessage msg = ERR_CTRL_PANEL_GENERIC_ERROR_FALLBACK_JAVAHOME.get(
            f, Utilities.getStringFromCollection(s, "<br>-"));
        msgs.add(msg);
@@ -964,7 +953,7 @@
  private void launchTask()
  {
    ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    ArrayList<LocalizableMessage> errors = new ArrayList<>();
    ProgressDialog dlg = new ProgressDialog(
        Utilities.createFrame(),
        Utilities.getParentDialog(this),
@@ -1109,12 +1098,9 @@
  implements Comparator<JavaArgumentsDescriptor>
  {
    private static final long serialVersionUID = 8288418995255677560L;
    private Set<JavaArgumentsDescriptor> data =
      new HashSet<JavaArgumentsDescriptor>();
    private ArrayList<String[]> dataArray =
      new ArrayList<String[]>();
    private ArrayList<JavaArgumentsDescriptor> argsArray =
      new ArrayList<JavaArgumentsDescriptor>();
    private Set<JavaArgumentsDescriptor> data = new HashSet<>();
    private ArrayList<String[]> dataArray = new ArrayList<>();
    private ArrayList<JavaArgumentsDescriptor> argsArray = new ArrayList<>();
    private final String[] COLUMN_NAMES = new String[] {
        getHeader(INFO_CTRL_PANEL_COMMAND_LINE_NAME_COLUMN.get(), 40),
        getHeader(INFO_CTRL_PANEL_JAVA_ARGUMENTS_COLUMN.get(), 40)};
@@ -1286,8 +1272,7 @@
    private void updateDataArray()
    {
      TreeSet<JavaArgumentsDescriptor> sortedSet =
        new TreeSet<JavaArgumentsDescriptor>(this);
      TreeSet<JavaArgumentsDescriptor> sortedSet = new TreeSet<>(this);
      sortedSet.addAll(data);
      dataArray.clear();
      argsArray.clear();
@@ -1341,8 +1326,7 @@
    private String defaultJavaHome;
    private boolean overwriteOpenDSJavaHome;
    private boolean overwriteOpenDSJavaArgs;
    Set<JavaArgumentsDescriptor> arguments =
      new HashSet<JavaArgumentsDescriptor>();
    Set<JavaArgumentsDescriptor> arguments = new HashSet<>();
    /**
     * The constructor of the task.
@@ -1352,7 +1336,7 @@
    public JavaPropertiesTask(ControlPanelInfo info, ProgressDialog dlg)
    {
      super(info, dlg);
      backendSet = new HashSet<String>();
      backendSet = new HashSet<>();
      defaultJavaHome = javaHome.getText().trim();
      overwriteOpenDSJavaHome = useSpecifiedJavaHome.isSelected();
      overwriteOpenDSJavaArgs = useSpecifiedJavaArgs.isSelected();
@@ -1414,7 +1398,7 @@
    @Override
    protected ArrayList<String> getCommandLineArguments()
    {
      return new ArrayList<String>();
      return new ArrayList<>();
    }
    /** {@inheritDoc} */
@@ -1446,7 +1430,7 @@
    private int updateJavaSettings() throws IOException
    {
      final String propertiesFile = getPropertiesFile();
      ArrayList<String> commentLines = new ArrayList<String>();
      ArrayList<String> commentLines = new ArrayList<>();
      BufferedReader reader = null;
      try
      {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java
@@ -550,7 +550,7 @@
  private void saveChanges(boolean modal)
  {
    newTask = null;
    final ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    final ArrayList<LocalizableMessage> errors = new ArrayList<>();
    // Check that the entry is correct.
    try
    {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2009-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2011-2014 ForgeRock AS
 *      Portions Copyright 2011-2015 ForgeRock AS
 */
package org.opends.guitools.controlpanel.ui;
@@ -467,7 +467,7 @@
    setPrimaryValid(portLabel);
    setPrimaryValid(dnLabel);
    setPrimaryValid(pwdLabel);
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>();
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<>();
    boolean dnInvalid = false;
    boolean pwdInvalid = false;
@@ -730,7 +730,7 @@
            }
            else
            {
              ArrayList<String> stringErrors = new ArrayList<String>();
              ArrayList<String> stringErrors = new ArrayList<>();
              for (LocalizableMessage err : errors)
              {
                stringErrors.add(err.toString());
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/LoginPanel.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008-2009 Sun Microsystems, Inc.
 *      Portions Copyright 2011-2014 ForgeRock AS
 *      Portions Copyright 2011-2015 ForgeRock AS
 */
package org.opends.guitools.controlpanel.ui;
@@ -163,7 +163,7 @@
  {
    setPrimaryValid(dnLabel);
    setPrimaryValid(pwdLabel);
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>();
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<>();
    boolean dnInvalid = false;
    boolean pwdInvalid = false;
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/MainActionsPane.java
@@ -81,9 +81,8 @@
    ArrayList<Category> categories = createCategories();
    ButtonGroup group = new ButtonGroup();
    int maxWidth = 0;
    final Map<Action, GenericFrame> frames =
      new HashMap<Action, GenericFrame>();
    ArrayList<ActionButton> actions = new ArrayList<ActionButton>();
    final Map<Action, GenericFrame> frames = new HashMap<>();
    ArrayList<ActionButton> actions = new ArrayList<>();
    for(Category category: categories)
    {
      JPanel categoryPanel = new JPanel(new GridBagLayout());
@@ -185,7 +184,7 @@
   */
  protected ArrayList<Category> createCategories()
  {
    ArrayList<Category> categories = new ArrayList<Category>();
    ArrayList<Category> categories = new ArrayList<>();
    LocalizableMessage[][] labels;
    if (isWindows())
    {
@@ -256,8 +255,7 @@
          }
      };
    }
    ArrayList<Class<? extends StatusGenericPanel>> classes =
      new ArrayList<Class<? extends StatusGenericPanel>>();
    ArrayList<Class<? extends StatusGenericPanel>> classes = new ArrayList<>();
    classes.add(BrowseEntriesPanel.class);
    classes.add(NewBaseDNPanel.class);
    classes.add(ImportLDIFPanel.class);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/MainMenuBar.java
@@ -93,7 +93,7 @@
   */
  public void quitClicked()
  {
    Set<String> runningTasks = new HashSet<String>();
    Set<String> runningTasks = new HashSet<>();
    for (Task task : getInfo().getTasks())
    {
      if (task.getState() == Task.State.RUNNING)
@@ -250,7 +250,7 @@
   */
  protected void connectToServerClicked()
  {
    Set<String> runningTasks = new HashSet<String>();
    Set<String> runningTasks = new HashSet<>();
    for (Task task : getInfo().getTasks())
    {
      if (task.getState() == Task.State.RUNNING)
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ManageTasksPanel.java
@@ -184,7 +184,7 @@
   */
  private List<TaskEntry> getSelectedTasks(boolean onlyCancelable)
  {
    ArrayList<TaskEntry> tasks = new ArrayList<TaskEntry>();
    ArrayList<TaskEntry> tasks = new ArrayList<>();
    int[] rows = taskTable.getSelectedRows();
    for (int row : rows)
    {
@@ -490,7 +490,7 @@
   */
  private Set<TaskEntry> createRandomTasksList()
  {
    Set<TaskEntry> list = new HashSet<TaskEntry>();
    Set<TaskEntry> list = new HashSet<>();
    Random r = new Random();
    int numberTasks = r.nextInt(10);
    for (int i= 0; i<numberTasks; i++)
@@ -534,7 +534,7 @@
      };
      for (int j=0; j < attrNames.length; j++)
      {
        List<Object> attrValues = new ArrayList<Object>(1);
        List<Object> attrValues = new ArrayList<>(1);
        attrValues.add(values[j] + r.nextInt());
        csr.set(attrNames[j], attrValues);
      }
@@ -559,7 +559,7 @@
   */
  private Set<TaskEntry> createDummyTaskList()
  {
    Set<TaskEntry> list = new HashSet<TaskEntry>();
    Set<TaskEntry> list = new HashSet<>();
    for (int i= 0; i<10; i++)
    {
      CustomSearchResult csr =
@@ -601,7 +601,7 @@
      };
      for (int j=0; j < attrNames.length; j++)
      {
        List<Object> attrValues = new ArrayList<Object>(1);
        List<Object> attrValues = new ArrayList<>(1);
        attrValues.add(values[j]);
        csr.set(attrNames[j], attrValues);
      }
@@ -621,7 +621,7 @@
  private void cancelTaskClicked()
  {
    ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    ArrayList<LocalizableMessage> errors = new ArrayList<>();
    ProgressDialog dlg = new ProgressDialog(
        Utilities.createFrame(),
        Utilities.getParentDialog(this),
@@ -666,11 +666,9 @@
  public static Entry getEntry(CustomSearchResult csr) throws OpenDsException
  {
    DN dn = DN.valueOf(csr.getDN());
    Map<ObjectClass,String> objectClasses = new HashMap<ObjectClass,String>();
    Map<AttributeType,List<Attribute>> userAttributes =
      new HashMap<AttributeType,List<Attribute>>();
    Map<AttributeType,List<Attribute>> operationalAttributes =
      new HashMap<AttributeType,List<Attribute>>();
    Map<ObjectClass,String> objectClasses = new HashMap<>();
    Map<AttributeType,List<Attribute>> userAttributes = new HashMap<>();
    Map<AttributeType,List<Attribute>> operationalAttributes = new HashMap<>();
    for (String wholeName : csr.getAttributeNames())
    {
@@ -719,7 +717,7 @@
          }
          builder.add(bs);
        }
        List<Attribute> attrList = new ArrayList<Attribute>(1);
        List<Attribute> attrList = new ArrayList<>(1);
        attrList.add(builder.toAttribute());
        if (attrType.isOperational())
@@ -1000,7 +998,7 @@
  private Set<String> getSelectedIds()
  {
    Set<String> selectedIds = new HashSet<String>();
    Set<String> selectedIds = new HashSet<>();
    int[] indexes = taskTable.getSelectedRows();
    if (indexes != null)
    {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/MatchingRulePanel.java
@@ -235,7 +235,7 @@
    type.setText(getTypeValue(matchingRule).toString());
    Comparator<String> lowerCaseComparator = new LowerCaseComparator();
    TreeSet<String> attributes = new TreeSet<String>(lowerCaseComparator);
    TreeSet<String> attributes = new TreeSet<>(lowerCaseComparator);
    for (AttributeType attr : schema.getAttributeTypes().values())
    {
      if (matchingRule.equals(attr.getApproximateMatchingRule()) ||
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/MonitoringAttributesViewPanel.java
@@ -63,10 +63,8 @@
{
 private static final long serialVersionUID = 6462932163745559L;
 private LinkedHashSet<T> selectedAttributes = new LinkedHashSet<T>();
 private LinkedHashSet<T> selectedAttributes = new LinkedHashSet<>();
 private LinkedHashSet<T> monitoringAttributes;
 private boolean isCanceled = true;
 /**
@@ -86,7 +84,7 @@
 public static MonitoringAttributesViewPanel<String>
 createStringInstance(LinkedHashSet<String> attributes)
 {
   return new MonitoringAttributesViewPanel<String>(attributes);
   return new MonitoringAttributesViewPanel<>(attributes);
 }
 /**
@@ -100,7 +98,7 @@
 createMonitoringAttributesInstance(
     LinkedHashSet<MonitoringAttributes> attributes)
 {
   return new MonitoringAttributesViewPanel<MonitoringAttributes>(attributes);
   return new MonitoringAttributesViewPanel<>(attributes);
 }
 /**
@@ -112,7 +110,7 @@
 public static MonitoringAttributesViewPanel<LocalizableMessage>
 createMessageInstance(LinkedHashSet<LocalizableMessage> attributes)
 {
   return new MonitoringAttributesViewPanel<LocalizableMessage>(attributes);
   return new MonitoringAttributesViewPanel<>(attributes);
 }
 /** {@inheritDoc} */
@@ -129,7 +127,7 @@
  */
 protected MonitoringAttributesViewPanel(LinkedHashSet<T> attributes)
 {
   monitoringAttributes = new LinkedHashSet<T>(attributes);
   monitoringAttributes = new LinkedHashSet<>(attributes);
   createLayout();
 }
@@ -302,7 +300,7 @@
   }
   if (selectedAttributes.isEmpty())
   {
     ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
     ArrayList<LocalizableMessage> errors = new ArrayList<>();
     errors.add(INFO_CTRL_PANEL_NO_OPERATION_SELECTED.get());
     super.displayErrorDialog(errors);
   }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/NewAttributePanel.java
@@ -173,8 +173,7 @@
  @Override
  public void configurationChanged(ConfigurationChangeEvent ev)
  {
    ArrayList<AttributeSyntax<?>> newSyntaxes =
      new ArrayList<AttributeSyntax<?>>();
    ArrayList<AttributeSyntax<?>> newSyntaxes = new ArrayList<>();
    final ServerDescriptor desc = ev.getNewDescriptor();
    Schema s = desc.getSchema();
@@ -204,8 +203,7 @@
    {
      schema = s;
      HashMap<String, AttributeSyntax<?>> syntaxNameMap = new HashMap<String,
      AttributeSyntax<?>>();
      HashMap<String, AttributeSyntax<?>> syntaxNameMap = new HashMap<>();
      for (String key : schema.getSyntaxes().keySet())
      {
        AttributeSyntax<?> syntax = schema.getSyntax(key);
@@ -217,8 +215,7 @@
        syntaxNameMap.put(name, syntax);
      }
      SortedSet<String> orderedKeys =
        new TreeSet<String>(new LowerCaseComparator());
      SortedSet<String> orderedKeys = new TreeSet<>(new LowerCaseComparator());
      orderedKeys.addAll(syntaxNameMap.keySet());
      for (String key : orderedKeys)
      {
@@ -226,8 +223,7 @@
      }
      updateComboBoxModel(newSyntaxes, (DefaultComboBoxModel) syntax.getModel());
      HashMap<String, AttributeType> attributeNameMap = new HashMap<String,
      AttributeType>();
      HashMap<String, AttributeType> attributeNameMap = new HashMap<>();
      for (String key : schema.getAttributeTypes().keySet())
      {
        AttributeType attr = schema.getAttributeType(key);
@@ -235,7 +231,7 @@
      }
      orderedKeys.clear();
      orderedKeys.addAll(attributeNameMap.keySet());
      ArrayList<Object> newParents = new ArrayList<Object>();
      ArrayList<Object> newParents = new ArrayList<>();
      for (String key : orderedKeys)
      {
        newParents.add(attributeNameMap.get(key));
@@ -243,14 +239,12 @@
      newParents.add(0, NO_PARENT);
      updateComboBoxModel(newParents, (DefaultComboBoxModel) parent.getModel());
      ArrayList<MatchingRule> approximateElements =
        new ArrayList<MatchingRule>();
      ArrayList<MatchingRule> equalityElements = new ArrayList<MatchingRule>();
      ArrayList<MatchingRule> orderingElements = new ArrayList<MatchingRule>();
      ArrayList<MatchingRule> substringElements = new ArrayList<MatchingRule>();
      ArrayList<MatchingRule> approximateElements = new ArrayList<>();
      ArrayList<MatchingRule> equalityElements = new ArrayList<>();
      ArrayList<MatchingRule> orderingElements = new ArrayList<>();
      ArrayList<MatchingRule> substringElements = new ArrayList<>();
      HashMap<String, MatchingRule> matchingRuleNameMap = new HashMap<String,
      MatchingRule>();
      HashMap<String, MatchingRule> matchingRuleNameMap = new HashMap<>();
      for (String key : schema.getMatchingRules().keySet())
      {
        MatchingRule rule = schema.getMatchingRule(key);
@@ -280,8 +274,7 @@
        }
      }
      JComboBox[] combos = {approximate, equality, ordering, substring};
      ArrayList<ArrayList<MatchingRule>> ruleNames =
        new ArrayList<ArrayList<MatchingRule>>();
      ArrayList<ArrayList<MatchingRule>> ruleNames = new ArrayList<>();
      ruleNames.add(approximateElements);
      ruleNames.add(equalityElements);
      ruleNames.add(orderingElements);
@@ -362,7 +355,7 @@
  @Override
  public void okClicked()
  {
    ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    ArrayList<LocalizableMessage> errors = new ArrayList<>();
    for (JLabel label : labels)
    {
      setPrimaryValid(label);
@@ -725,7 +718,7 @@
  private ArrayList<String> getAliases()
  {
    ArrayList<String> al = new ArrayList<String>();
    ArrayList<String> al = new ArrayList<>();
    String s = aliases.getText().trim();
    if (s.length() > 0)
    {
@@ -740,7 +733,7 @@
  private ArrayList<String> getAllNames()
  {
    ArrayList<String> al = new ArrayList<String>();
    ArrayList<String> al = new ArrayList<>();
    al.add(getAttributeName());
    al.addAll(getAliases());
    return al;
@@ -787,18 +780,18 @@
  private Map<String, List<String>> getExtraProperties()
  {
    Map<String, List<String>> map = new HashMap<String, List<String>>();
    Map<String, List<String>> map = new HashMap<>();
    String f = file.getText().trim();
    if (f.length() > 0)
    {
      ArrayList<String> list = new ArrayList<String>();
      ArrayList<String> list = new ArrayList<>();
      list.add(f);
      map.put(ServerConstants.SCHEMA_PROPERTY_FILENAME, list);
    }
    String or = origin.getText().trim();
    if (or.length() > 0)
    {
      ArrayList<String> list = new ArrayList<String>();
      ArrayList<String> list = new ArrayList<>();
      list.add(or);
      map.put(ServerConstants.SCHEMA_PROPERTY_ORIGIN, list);
    }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/NewEntryFromLDIFPanel.java
@@ -181,7 +181,7 @@
      /** {@inheritDoc} */
      public void actionPerformed(ActionEvent ev)
      {
        ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
        ArrayList<LocalizableMessage> errors = new ArrayList<>();
        checkSyntax(errors);
        if (!errors.isEmpty())
        {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/NewGroupPanel.java
@@ -702,7 +702,7 @@
    {
      sb.append("objectClass: ").append(ServerConstants.OC_GROUP_OF_NAMES);
      String[] members = staticMembers.getText().split("\n");
      LinkedHashSet<DN> dns = new LinkedHashSet<DN>();
      LinkedHashSet<DN> dns = new LinkedHashSet<>();
      for (String member : members)
      {
        member = member.trim();
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/NewObjectClassPanel.java
@@ -110,10 +110,8 @@
  private JLabel lAttributes = Utilities.createPrimaryLabel(
      INFO_CTRL_PANEL_OBJECTCLASS_ATTRIBUTES_LABEL.get());
  private Set<AttributeType> inheritedOptionalAttributes =
    new HashSet<AttributeType>();
  private Set<AttributeType> inheritedRequiredAttributes =
    new HashSet<AttributeType>();
  private Set<AttributeType> inheritedOptionalAttributes = new HashSet<>();
  private Set<AttributeType> inheritedRequiredAttributes = new HashSet<>();
  private JLabel[] labels = {lName, lSuperior, lOID, lAliases, lOrigin, lFile,
      lDescription, lType, lAttributes
@@ -234,7 +232,7 @@
  /** {@inheritDoc} */
  public void okClicked()
  {
    ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    ArrayList<LocalizableMessage> errors = new ArrayList<>();
    for (JLabel label : labels)
    {
      setPrimaryValid(label);
@@ -378,7 +376,7 @@
    attributes.getAvailableListModel().addAll(allAttrs);
    HashSet<AttributeType> toDelete = new HashSet<AttributeType>();
    HashSet<AttributeType> toDelete = new HashSet<>();
    for (AttributeType attr : attributes.getSelectedListModel1().getData())
    {
      if (!allAttrs.contains(attr))
@@ -395,7 +393,7 @@
      attributes.getSelectedListModel1().remove(attr);
    }
    toDelete = new HashSet<AttributeType>();
    toDelete = new HashSet<>();
    for (AttributeType attr : attributes.getSelectedListModel2().getData())
    {
      if (!allAttrs.contains(attr))
@@ -417,7 +415,7 @@
    {
      if (sel != null)
      {
        ArrayList<Integer> indexes = new ArrayList<Integer>();
        ArrayList<Integer> indexes = new ArrayList<>();
        for (int j=0; j<sel.length; j++)
        {
          if (sel[j] < lists[i].getModel().getSize())
@@ -510,8 +508,7 @@
            attributes.getSelectedList2(), 0,
            attributes.getSelectedList2().getModel().getSize() - 1);
        Collection<AttributeType> unmovableItems =
          new ArrayList<AttributeType>(inheritedRequiredAttributes);
        Collection<AttributeType> unmovableItems = new ArrayList<>(inheritedRequiredAttributes);
        unmovableItems.addAll(inheritedOptionalAttributes);
        attributes.setUnmovableItems(unmovableItems);
@@ -540,8 +537,7 @@
    SchemaElementComboBoxCellRenderer(type);
    type.setRenderer(renderer);
    attributes =
      new DoubleAddRemovePanel<AttributeType>(0, AttributeType.class);
    attributes = new DoubleAddRemovePanel<>(0, AttributeType.class);
    Comparator<AttributeType> comparator = new Comparator<AttributeType>()
    {
      /** {@inheritDoc} */
@@ -660,18 +656,18 @@
  private Map<String, List<String>> getExtraProperties()
  {
    Map<String, List<String>> map = new HashMap<String, List<String>>();
    Map<String, List<String>> map = new HashMap<>();
    String f = file.getText().trim();
    if (f.length() > 0)
    {
      ArrayList<String> list = new ArrayList<String>();
      ArrayList<String> list = new ArrayList<>();
      list.add(f);
      map.put(ServerConstants.SCHEMA_PROPERTY_FILENAME, list);
    }
    String or = origin.getText().trim();
    if (or.length() > 0)
    {
      ArrayList<String> list = new ArrayList<String>();
      ArrayList<String> list = new ArrayList<>();
      list.add(or);
      map.put(ServerConstants.SCHEMA_PROPERTY_ORIGIN, list);
    }
@@ -680,7 +676,7 @@
  private ArrayList<String> getAliases()
  {
    ArrayList<String> al = new ArrayList<String>();
    ArrayList<String> al = new ArrayList<>();
    String s = aliases.getText().trim();
    if (s.length() > 0)
    {
@@ -695,7 +691,7 @@
  private ArrayList<String> getAllNames()
  {
    ArrayList<String> al = new ArrayList<String>();
    ArrayList<String> al = new ArrayList<>();
    al.add(getObjectClassName());
    al.addAll(getAliases());
    return al;
@@ -736,7 +732,7 @@
  private Set<AttributeType> intersect(Set<AttributeType> set1, Set<AttributeType> set2)
  {
    HashSet<AttributeType> attrs = new HashSet<AttributeType>(set1);
    HashSet<AttributeType> attrs = new HashSet<>(set1);
    attrs.removeAll(set2);
    return attrs;
  }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/NewVLVIndexPanel.java
@@ -184,7 +184,7 @@
    private NewVLVIndexTask(ControlPanelInfo info, ProgressDialog dlg)
    {
      super(info, dlg);
      backendSet = new HashSet<String>();
      backendSet = new HashSet<>();
      backendSet.add(backendName.getText());
      indexName = name.getText().trim();
      sortOrder = getSortOrder();
@@ -352,7 +352,7 @@
    @Override
    protected List<String> getCommandLineArguments()
    {
      return new ArrayList<String>();
      return new ArrayList<>();
    }
    private String getConfigCommandLineName()
@@ -407,7 +407,7 @@
    private List<String> getDSConfigCommandLineArguments()
    {
      final List<String> args = new ArrayList<String>();
      final List<String> args = new ArrayList<>();
      args.add("create-local-db-vlv-index");
      args.add("--backend-name");
      args.add(backendID);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ObjectClassEditorPanel.java
@@ -152,7 +152,7 @@
  public void okClicked()
  {
    String struct = (String)  structural.getSelectedItem();
    TreeSet<String> aux = new TreeSet<String>(auxiliary.getSelectedListModel().getData());
    TreeSet<String> aux = new TreeSet<>(auxiliary.getSelectedListModel().getData());
    aux.add("top");
    ObjectClassValue newValue = new ObjectClassValue(struct, aux);
    valueChanged = !newValue.equals(value);
@@ -172,8 +172,8 @@
    final Schema schema = ev.getNewDescriptor().getSchema();
    if (schema != null)
    {
      final SortedSet<String> auxiliaryOcs = new TreeSet<String>();
      final SortedSet<String> structuralOcs = new TreeSet<String>();
      final SortedSet<String> auxiliaryOcs = new TreeSet<>();
      final SortedSet<String> structuralOcs = new TreeSet<>();
      for (ObjectClass oc : schema.getObjectClasses().values())
      {
        if (oc.getObjectClassType() == ObjectClassType.AUXILIARY)
@@ -210,7 +210,7 @@
          }
          else
          {
            currentAux = new TreeSet<String>();
            currentAux = new TreeSet<>();
          }
          SortableListModel<String> availableListModel =
            auxiliary.getAvailableListModel();
@@ -322,7 +322,7 @@
    gbc.weightx = 1.0;
    gbc.weighty = 1.0;
    gbc.fill = GridBagConstraints.BOTH;
    auxiliary = new AddRemovePanel<String>(String.class);
    auxiliary = new AddRemovePanel<>(String.class);
    gbc.insets.left = 30;
    add(auxiliary, gbc);
  }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/RebuildIndexPanel.java
@@ -79,8 +79,7 @@
  private JLabel lIndexes;
  private JLabel lNoBaseDNsFound;
  private final Map<String, SortedSet<AbstractIndexDescriptor>> hmIndexes =
      new HashMap<String, SortedSet<AbstractIndexDescriptor>>();
  private final Map<String, SortedSet<AbstractIndexDescriptor>> hmIndexes = new HashMap<>();
  /** Constructor of the panel. */
  public RebuildIndexPanel()
@@ -148,7 +147,7 @@
    gbc.anchor = GridBagConstraints.NORTHWEST;
    add(lIndexes, gbc);
    addRemove = new AddRemovePanel<AbstractIndexDescriptor>(AbstractIndexDescriptor.class);
    addRemove = new AddRemovePanel<>(AbstractIndexDescriptor.class);
    addRemove.getAvailableLabel().setText(INFO_CTRL_PANEL_AVAILABLE_INDEXES_LABEL.get().toString());
    addRemove.getSelectedLabel().setText(INFO_CTRL_PANEL_SELECTED_INDEXES_LABEL.get().toString());
@@ -286,7 +285,7 @@
    setPrimaryValid(lBaseDN);
    setSecondaryValid(addRemove.getSelectedLabel());
    final Set<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>();
    final Set<LocalizableMessage> errors = new LinkedHashSet<>();
    String baseDN = getSelectedBaseDN();
    if (baseDN == null)
@@ -313,7 +312,7 @@
    {
      ProgressDialog progressDialog =
          new ProgressDialog(Utilities.createFrame(), Utilities.getParentDialog(this), getTitle(), getInfo());
      Set<String> baseDNs = new HashSet<String>();
      Set<String> baseDNs = new HashSet<>();
      baseDNs.add(getSelectedBaseDN());
      RebuildIndexTask newTask =
          new RebuildIndexTask(getInfo(), progressDialog, baseDNs, addRemove.getSelectedListModel().getData());
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/RefreshOptionsPanel.java
@@ -136,7 +136,7 @@
    isCanceled = true;
    setPrimaryValid(lPeriod);
    LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>();
    LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<>();
    long t = -1;
    try
    {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ResetUserPasswordPanel.java
@@ -102,7 +102,7 @@
  /** {@inheritDoc} */
  public void okClicked()
  {
    final ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    final ArrayList<LocalizableMessage> errors = new ArrayList<>();
    setPrimaryValid(lPassword);
    setPrimaryValid(lConfirmPassword);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/RestorePanel.java
@@ -154,7 +154,7 @@
  /** {@inheritDoc} */
  protected void verifyBackupClicked()
  {
    LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>();
    LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<>();
    // Launch the task in another progress dialog.
    ProgressDialog dlg = new ProgressDialog(
        Utilities.createFrame(),
@@ -242,7 +242,7 @@
    setPrimaryValid(lAvailableBackups);
    setPrimaryValid(lBackupID);
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>();
    final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<>();
    BackupDescriptor backup = getSelectedBackup();
@@ -359,7 +359,7 @@
        dir = parentDirectory.getText();
        backupID = RestorePanel.this.backupID.getText();
      }
      backendSet = new HashSet<String>();
      backendSet = new HashSet<>();
      for (BackendDescriptor backend : info.getServerDescriptor().getBackends())
      {
        if (!backend.isConfigBackend())
@@ -449,7 +449,7 @@
        lastException = t;
        state = State.FINISHED_WITH_ERROR;
      }
      HashSet<BackendDescriptor> backends = new HashSet<BackendDescriptor>();
      HashSet<BackendDescriptor> backends = new HashSet<>();
      for (BackendDescriptor backend :
        getInfo().getServerDescriptor().getBackends())
      {
@@ -477,7 +477,7 @@
    /** {@inheritDoc} */
    protected ArrayList<String> getCommandLineArguments()
    {
      ArrayList<String> args = new ArrayList<String>();
      ArrayList<String> args = new ArrayList<>();
      args.add("--backupDirectory");
      args.add(dir);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/SchemaElementPanel.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2015 ForgeRock AS.
 */
package org.opends.guitools.controlpanel.ui;
@@ -49,8 +50,7 @@
{
  private static final long serialVersionUID = -8556383593966382604L;
  private Set<SchemaElementSelectionListener> listeners =
    new HashSet<SchemaElementSelectionListener>();
  private Set<SchemaElementSelectionListener> listeners = new HashSet<>();
  /**
   * The empty border shared by all the schema element panels.
@@ -141,7 +141,7 @@
   */
  protected Set<String> getAliases(AttributeType attr)
  {
    Set<String> aliases = new LinkedHashSet<String>();
    Set<String> aliases = new LinkedHashSet<>();
    Iterable<String> ocNames = attr.getNormalizedNames();
    String primaryName = attr.getPrimaryName();
    if (primaryName == null)
@@ -165,7 +165,7 @@
   */
  protected Set<String> getAliases(ObjectClass oc)
  {
    Set<String> aliases = new LinkedHashSet<String>();
    Set<String> aliases = new LinkedHashSet<>();
    Iterable<String> ocNames = oc.getNormalizedNames();
    String primaryName = oc.getPrimaryName();
    if (primaryName == null)
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/SelectObjectClassesPanel.java
@@ -55,9 +55,8 @@
public class SelectObjectClassesPanel extends StatusGenericPanel
{
  private static final long serialVersionUID = 1230982500028334L;
  private AddRemovePanel<ObjectClass> addRemove =
    new AddRemovePanel<ObjectClass>(ObjectClass.class);
  private Set<ObjectClass> toExclude = new HashSet<ObjectClass>();
  private AddRemovePanel<ObjectClass> addRemove = new AddRemovePanel<>(ObjectClass.class);
  private Set<ObjectClass> toExclude = new HashSet<>();
  private Schema schema;
  private boolean isCanceled = true;
@@ -180,7 +179,7 @@
   */
  public void setSelectedObjectClasses(Set<ObjectClass> selectedObjectClasses)
  {
    Set<ObjectClass> toAdd = new HashSet<ObjectClass>();
    Set<ObjectClass> toAdd = new HashSet<>();
    Set<ObjectClass> previouslySelected =
      addRemove.getSelectedListModel().getData();
    for (ObjectClass oc : previouslySelected)
@@ -232,7 +231,7 @@
  private void updateWithSchema(Schema schema)
  {
    ArrayList<ObjectClass> allOcs = new ArrayList<ObjectClass>();
    ArrayList<ObjectClass> allOcs = new ArrayList<>();
    for (String key : schema.getObjectClasses().keySet())
    {
      ObjectClass oc = schema.getObjectClass(key);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/SimplifiedViewEntryPanel.java
@@ -119,35 +119,30 @@
  private GenericDialog browseEntriesDlg;
  private LDAPEntrySelectionPanel browseEntriesPanel;
  private Map<String, List<String>> lastUserPasswords =
    new HashMap<String,List<String>>();
  private Map<String, List<String>> lastUserPasswords = new HashMap<>();
  private CustomSearchResult searchResult;
  private boolean isReadOnly;
  private TreePath treePath;
  private JScrollPane scrollAttributes;
  private LinkedHashMap<String, List<EditorComponent>> hmEditors =
    new LinkedHashMap<String, List<EditorComponent>>();
  private LinkedHashMap<String, List<EditorComponent>> hmEditors = new LinkedHashMap<>();
  private Set<String> requiredAttrs = new HashSet<String>();
  private Map<String, JComponent> hmLabels = new HashMap<String, JComponent>();
  private Map<String, String> hmDisplayedNames = new HashMap<String, String>();
  private Map<String, JComponent> hmComponents =
    new HashMap<String, JComponent>();
  private Set<String> requiredAttrs = new HashSet<>();
  private Map<String, JComponent> hmLabels = new HashMap<>();
  private Map<String, String> hmDisplayedNames = new HashMap<>();
  private Map<String, JComponent> hmComponents = new HashMap<>();
  private final String CONFIRM_PASSWORD = "confirm password";
  /** Map containing as key the attribute name and as value a localizable message. */
  static Map<String, LocalizableMessage> hmFriendlyAttrNames =
    new HashMap<String, LocalizableMessage>();
  static Map<String, LocalizableMessage> hmFriendlyAttrNames = new HashMap<>();
  /**
   * Map containing as key an object class and as value the preferred naming
   * attribute for the objectclass.
   */
  static Map<String, String> hmNameAttrNames = new HashMap<String, String>();
  static Map<String, String[]> hmOrdereredAttrNames =
    new HashMap<String, String[]>();
  static Map<String, String> hmNameAttrNames = new HashMap<>();
  static Map<String, String[]> hmOrdereredAttrNames = new HashMap<>();
  static
  {
    hmFriendlyAttrNames.put(ServerConstants.OBJECTCLASS_ATTRIBUTE_TYPE_NAME,
@@ -494,7 +489,7 @@
        List<Object> values = sr.getAttributeValues(attr);
        if (values.isEmpty())
        {
          values = new ArrayList<Object>(1);
          values = new ArrayList<>(1);
          if (isBinary(attr))
          {
            values.add(new byte[]{});
@@ -507,7 +502,7 @@
        if (isPassword(attr))
        {
          List<String> pwds = new ArrayList<String>();
          List<String> pwds = new ArrayList<>();
          for (Object o : values)
          {
            pwds.add(getPasswordStringValue(o));
@@ -679,12 +674,12 @@
  private Collection<String> getSortedAttributes(CustomSearchResult sr,
      boolean isReadOnly)
  {
    LinkedHashSet<String> attrNames = new LinkedHashSet<String>();
    LinkedHashSet<String> attrNames = new LinkedHashSet<>();
//  Get all attributes that the entry can have
    Set<String> attributes = new LinkedHashSet<String>();
    ArrayList<String> entryAttrs = new ArrayList<String>(sr.getAttributeNames());
    ArrayList<String> attrsWithNoOptions = new ArrayList<String>();
    Set<String> attributes = new LinkedHashSet<>();
    ArrayList<String> entryAttrs = new ArrayList<>(sr.getAttributeNames());
    ArrayList<String> attrsWithNoOptions = new ArrayList<>();
    for (String attr : entryAttrs)
    {
      attrsWithNoOptions.add(
@@ -760,8 +755,8 @@
      // alphabetical order) the attributes with no friendly name.  Finally
      // do the same with the other attributes.
      SortedSet<String> requiredAttributes = new TreeSet<String>();
      SortedSet<String> allowedAttributes = new TreeSet<String>();
      SortedSet<String> requiredAttributes = new TreeSet<>();
      SortedSet<String> allowedAttributes = new TreeSet<>();
      if (schema != null)
      {
@@ -957,7 +952,7 @@
  private Set<String> toStrings(Collection<Object> objects)
  {
    Set<String> results = new TreeSet<String>();
    Set<String> results = new TreeSet<>();
    for (Object o : objects)
    {
      results.add(String.valueOf(o));
@@ -973,7 +968,7 @@
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridy = 0;
    List<EditorComponent> components = new ArrayList<EditorComponent>();
    List<EditorComponent> components = new ArrayList<>();
    hmEditors.put(attrName.toLowerCase(), components);
    boolean isBinary = hasBinaryValue(values);
@@ -1238,7 +1233,7 @@
  {
    Entry entry = null;
    ArrayList<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    ArrayList<LocalizableMessage> errors = new ArrayList<>();
    try
    {
@@ -1313,7 +1308,7 @@
  private List<String> getDisplayedStringValues(String attrName)
  {
    List<String> values = new ArrayList<String>();
    List<String> values = new ArrayList<>();
    List<EditorComponent> comps =
      hmEditors.get(attrName.toLowerCase());
    if (comps != null)
@@ -1513,9 +1508,9 @@
      if (oldDN.size() > 0)
      {
        RDN rdn = oldDN.rdn();
        List<AttributeType> attributeTypes = new ArrayList<AttributeType>();
        List<String> attributeNames = new ArrayList<String>();
        List<ByteString> attributeValues = new ArrayList<ByteString>();
        List<AttributeType> attributeTypes = new ArrayList<>();
        List<String> attributeNames = new ArrayList<>();
        List<ByteString> attributeValues = new ArrayList<>();
        for (int i=0; i<rdn.getNumValues(); i++)
        {
          String attrName = rdn.getAttributeName(i);
@@ -1727,8 +1722,8 @@
    Schema schema = getInfo().getServerDescriptor().getSchema();
    if (schema != null)
    {
      ArrayList<String> attributes = new ArrayList<String>();
      ArrayList<String> ocs = new ArrayList<String>();
      ArrayList<String> attributes = new ArrayList<>();
      ArrayList<String> ocs = new ArrayList<>();
      if (newValue.getStructural() != null)
      {
        ocs.add(newValue.getStructural().toLowerCase());
@@ -1935,7 +1930,7 @@
      if (comp instanceof ObjectClassCellPanel)
      {
        ObjectClassValue ocDesc = ((ObjectClassCellPanel)comp).getValue();
        LinkedHashSet<String> values = new LinkedHashSet<String>();
        LinkedHashSet<String> values = new LinkedHashSet<>();
        String structural = ocDesc.getStructural();
        if (structural != null)
        {
@@ -1954,7 +1949,7 @@
        returnValue = values;
      } else if (comp instanceof JTextArea)
      {
        LinkedHashSet<String> values = new LinkedHashSet<String>();
        LinkedHashSet<String> values = new LinkedHashSet<>();
        String value = ((JTextArea)comp).getText();
        String[] lines = value.split("\n");
        for (String line : lines)
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/StandardAttributePanel.java
@@ -315,7 +315,7 @@
    type.setText(getTypeValue(attr).toString());
    Comparator<String> lowerCaseComparator = new LowerCaseComparator();
    SortedSet<String> requiredByOcs = new TreeSet<String>(lowerCaseComparator);
    SortedSet<String> requiredByOcs = new TreeSet<>(lowerCaseComparator);
    for (ObjectClass oc : schema.getObjectClasses().values())
    {
      if (oc.getRequiredAttributeChain().contains(attr))
@@ -331,7 +331,7 @@
      model.addElement(oc);
    }
    SortedSet<String> optionalByOcs = new TreeSet<String>(lowerCaseComparator);
    SortedSet<String> optionalByOcs = new TreeSet<>(lowerCaseComparator);
    for (ObjectClass oc : schema.getObjectClasses().values())
    {
      if (oc.getOptionalAttributeChain().contains(attr))
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/StandardObjectClassPanel.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 *      Portions Copyright 2014-2015 ForgeRock AS
 */
package org.opends.guitools.controlpanel.ui;
@@ -92,16 +92,11 @@
  private static LocalizableMessage OBSOLETE_VALUE =
    INFO_CTRL_PANEL_OBJECTCLASS_OBSOLETE_LABEL.get();
  private Map<String, AttributeType> hmAttrs =
    new HashMap<String, AttributeType>();
  private Map<String, AttributeType> hmAttrs = new HashMap<>();
  /**
   * Default constructor of the panel.
   *
   */
  /** Default constructor of the panel. */
  public StandardObjectClassPanel()
  {
    super();
    createLayout();
  }
@@ -321,7 +316,7 @@
      n = NOT_APPLICABLE.toString();
    }
    description.setText(n);
    ArrayList<String> otherNames = new ArrayList<String>();
    ArrayList<String> otherNames = new ArrayList<>();
    Iterable<String> ocNames = oc.getNormalizedNames();
    String primaryName = oc.getPrimaryName();
    if (primaryName == null)
@@ -348,8 +343,8 @@
    type.setText(getTypeValue(oc).toString());
    Comparator<String> lowerCaseComparator = new LowerCaseComparator();
    SortedSet<String> requiredAttrs = new TreeSet<String>(lowerCaseComparator);
    Set<String> inheritedAttrs = new HashSet<String>();
    SortedSet<String> requiredAttrs = new TreeSet<>(lowerCaseComparator);
    Set<String> inheritedAttrs = new HashSet<>();
    for (AttributeType attr : oc.getRequiredAttributeChain())
    {
      requiredAttrs.add(attr.getNameOrOID());
@@ -398,8 +393,8 @@
      hmAttrs.put(v, schema.getAttributeType(attr.toLowerCase()));
    }
    SortedSet<String> optionalAttrs = new TreeSet<String>(lowerCaseComparator);
    inheritedAttrs = new HashSet<String>();
    SortedSet<String> optionalAttrs = new TreeSet<>(lowerCaseComparator);
    inheritedAttrs = new HashSet<>();
    for (AttributeType attr : oc.getOptionalAttributeChain())
    {
      optionalAttrs.add(attr.getNameOrOID());
@@ -452,7 +447,7 @@
      }
      else
      {
        SortedSet<String> names = new TreeSet<String>();
        SortedSet<String> names = new TreeSet<>();
        for (ObjectClass superior : superiors)
        {
          names.add(superior.getPrimaryName());
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/StatusGenericPanel.java
@@ -159,8 +159,7 @@
  /** The last displayed message in the error pane. */
  private String lastDisplayedError;
  private final List<ConfigurationElementCreatedListener> confListeners =
      new ArrayList<ConfigurationElementCreatedListener>();
  private final List<ConfigurationElementCreatedListener> confListeners = new ArrayList<>();
  private boolean sizeSet;
  private boolean focusSet;
@@ -710,16 +709,16 @@
    }
    if (rebuildIndexes)
    {
      SortedSet<AbstractIndexDescriptor> indexes = new TreeSet<AbstractIndexDescriptor>();
      SortedSet<AbstractIndexDescriptor> indexes = new TreeSet<>();
      indexes.add(index);
      SortedSet<String> baseDNs = new TreeSet<String>();
      SortedSet<String> baseDNs = new TreeSet<>();
      for (BaseDNDescriptor b : index.getBackend().getBaseDns())
      {
        baseDNs.add(Utilities.unescapeUtf8(b.getDn().toString()));
      }
      RebuildIndexTask newTask = new RebuildIndexTask(getInfo(), progressDialog, baseDNs, indexes);
      List<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
      List<LocalizableMessage> errors = new ArrayList<>();
      for (Task task : getInfo().getTasks())
      {
        task.canLaunch(newTask, errors);
@@ -1296,7 +1295,7 @@
  protected void updateSimpleBackendComboBoxModel(final JComboBox combo, final JLabel lNoBackendsFound,
      final ServerDescriptor desc)
  {
    final SortedSet<String> newElements = new TreeSet<String>(new LowerCaseComparator());
    final SortedSet<String> newElements = new TreeSet<>(new LowerCaseComparator());
    for (BackendDescriptor backend : desc.getBackends())
    {
      if (!backend.isConfigBackend())
@@ -1342,9 +1341,9 @@
   */
  protected void updateBaseDNComboBoxModel(final DefaultComboBoxModel model, final ServerDescriptor desc)
  {
    Set<CategorizedComboBoxElement> newElements = new LinkedHashSet<CategorizedComboBoxElement>();
    SortedSet<String> backendIDs = new TreeSet<String>(new LowerCaseComparator());
    Map<String, SortedSet<String>> hmBaseDNs = new HashMap<String, SortedSet<String>>();
    Set<CategorizedComboBoxElement> newElements = new LinkedHashSet<>();
    SortedSet<String> backendIDs = new TreeSet<>(new LowerCaseComparator());
    Map<String, SortedSet<String>> hmBaseDNs = new HashMap<>();
    for (BackendDescriptor backend : desc.getBackends())
    {
@@ -1352,7 +1351,7 @@
      {
        String backendID = backend.getBackendID();
        backendIDs.add(backendID);
        SortedSet<String> baseDNs = new TreeSet<String>(new LowerCaseComparator());
        SortedSet<String> baseDNs = new TreeSet<>(new LowerCaseComparator());
        for (BaseDNDescriptor baseDN : backend.getBaseDns())
        {
          try
@@ -1432,7 +1431,7 @@
  {
    synchronized (hmIndexes)
    {
      Set<String> dns = new HashSet<String>();
      Set<String> dns = new HashSet<>();
      for (BackendDescriptor backend : desc.getBackends())
      {
        if (backend.getType() == BackendDescriptor.Type.LOCAL_DB
@@ -1877,7 +1876,7 @@
   */
  protected void startServer()
  {
    Set<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>();
    Set<LocalizableMessage> errors = new LinkedHashSet<>();
    ProgressDialog progressDialog = new ProgressDialog(Utilities.createFrame(), Utilities.getParentDialog(this),
            INFO_CTRL_PANEL_START_SERVER_PROGRESS_DLG_TITLE.get(), getInfo());
    StartServerTask newTask = new StartServerTask(getInfo(), progressDialog);
@@ -1908,7 +1907,7 @@
   */
  protected void stopServer()
  {
    Set<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>();
    Set<LocalizableMessage> errors = new LinkedHashSet<>();
    ProgressDialog progressDialog = new ProgressDialog(Utilities.createFrame(), Utilities.getParentDialog(this),
            INFO_CTRL_PANEL_STOP_SERVER_PROGRESS_DLG_TITLE.get(), getInfo());
    StopServerTask newTask = new StopServerTask(getInfo(), progressDialog);
@@ -1945,7 +1944,7 @@
   */
  protected void restartServer()
  {
    Set<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>();
    Set<LocalizableMessage> errors = new LinkedHashSet<>();
    ProgressDialog progressDialog = new ProgressDialog(Utilities.createFrame(), Utilities.getParentDialog(this),
            INFO_CTRL_PANEL_RESTART_SERVER_PROGRESS_DLG_TITLE.get(), getInfo());
    RestartServerTask newTask = new RestartServerTask(getInfo(), progressDialog);
@@ -2167,7 +2166,7 @@
   */
  protected List<String> getScheduleArgs(final ScheduleType schedule)
  {
    List<String> args = new ArrayList<String>(2);
    List<String> args = new ArrayList<>(2);
    switch (schedule.getType())
    {
    case LAUNCH_LATER:
@@ -2232,7 +2231,7 @@
  protected void checkCompatibleSuperiors(final Set<ObjectClass> objectClassSuperiors,
      final ObjectClassType objectClassType, final List<LocalizableMessage> errors)
  {
    SortedSet<String> notCompatibleClasses = new TreeSet<String>(new LowerCaseComparator());
    SortedSet<String> notCompatibleClasses = new TreeSet<>(new LowerCaseComparator());
    for (ObjectClass oc : objectClassSuperiors)
    {
      if (oc.getObjectClassType() == ObjectClassType.ABSTRACT)
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/StatusPanel.java
@@ -274,7 +274,7 @@
    }
    else
    {
      ArrayList<LocalizableMessage> msgs = new ArrayList<LocalizableMessage>();
      ArrayList<LocalizableMessage> msgs = new ArrayList<>();
      for (OpenDsException oe : exceptions)
      {
        msgs.add(oe.getMessageObject());
@@ -361,7 +361,7 @@
    Set<DN> rootUsers = desc.getAdministrativeUsers();
    SortedSet<String> sortedRootUsers = new TreeSet<String>();
    SortedSet<String> sortedRootUsers = new TreeSet<>();
    for (DN dn : rootUsers)
    {
      try
@@ -429,7 +429,7 @@
    setText(adminConnector,
        getAdminConnectorStringValue(desc.getAdminConnector()));
    Set<BaseDNDescriptor> baseDNs = new HashSet<BaseDNDescriptor>();
    Set<BaseDNDescriptor> baseDNs = new HashSet<>();
    for (BackendDescriptor backend : desc.getBackends())
    {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/SystemInformationMonitoringPanel.java
@@ -48,8 +48,7 @@
public class SystemInformationMonitoringPanel extends GeneralMonitoringPanel
{
  private static final long serialVersionUID = 9031734563298069830L;
  static List<MonitoringAttributes> operations =
    new ArrayList<MonitoringAttributes>();
  static List<MonitoringAttributes> operations = new ArrayList<>();
  {
    operations.add(BasicMonitoringAttributes.SYSTEM_NAME);
    operations.add(BasicMonitoringAttributes.OPERATING_SYSTEM);
@@ -58,8 +57,7 @@
    operations.add(BasicMonitoringAttributes.FREE_USED_MEMORY);
    operations.add(BasicMonitoringAttributes.MAX_MEMORY);
  }
  private ArrayList<JLabel> monitoringLabels =
    new ArrayList<JLabel>();
  private ArrayList<JLabel> monitoringLabels = new ArrayList<>();
  {
    for (int i=0; i<operations.size(); i++)
    {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/TableViewEntryPanel.java
@@ -283,9 +283,9 @@
      if (oldDN.size() > 0)
      {
        RDN rdn = oldDN.rdn();
        List<AttributeType> attributeTypes = new ArrayList<AttributeType>();
        List<String> attributeNames = new ArrayList<String>();
        List<ByteString> attributeValues = new ArrayList<ByteString>();
        List<AttributeType> attributeTypes = new ArrayList<>();
        List<String> attributeNames = new ArrayList<>();
        List<ByteString> attributeValues = new ArrayList<>();
        for (int i=0; i<rdn.getNumValues(); i++)
        {
          String attrName = rdn.getAttributeName(i);
@@ -395,7 +395,7 @@
  private Set<String> getDisplayedStringValues(String attrName)
  {
    Set<String> values = new LinkedHashSet<String>();
    Set<String> values = new LinkedHashSet<>();
    for (int i=0; i<table.getRowCount(); i++)
    {
      if (attrName.equalsIgnoreCase((String)table.getValueAt(i, 0)))
@@ -426,11 +426,9 @@
  implements Comparator<AttributeValuePair>
  {
    private static final long serialVersionUID = -1240282431326505113L;
    private ArrayList<AttributeValuePair> dataArray =
      new ArrayList<AttributeValuePair>();
    private SortedSet<AttributeValuePair> allSortedValues =
      new TreeSet<AttributeValuePair>(this);
    private Set<String> requiredAttrs = new HashSet<String>();
    private ArrayList<AttributeValuePair> dataArray = new ArrayList<>();
    private SortedSet<AttributeValuePair> allSortedValues = new TreeSet<>(this);
    private Set<String> requiredAttrs = new HashSet<>();
    private final String[] COLUMN_NAMES = new String[] {
        getHeader(LocalizableMessage.raw("Attribute"), 40),
        getHeader(LocalizableMessage.raw("Value", 40))};
@@ -644,7 +642,7 @@
    {
      allSortedValues.clear();
      requiredAttrs.clear();
      List<String> addedAttrs = new ArrayList<String>();
      List<String> addedAttrs = new ArrayList<>();
      Schema schema = getInfo().getServerDescriptor().getSchema();
      List<Object> ocs = null;
      for (String attrName : searchResult.getAttributeNames())
@@ -757,7 +755,7 @@
     */
    public List<Object> getValues(String attrName)
    {
      List<Object> values = new ArrayList<Object>();
      List<Object> values = new ArrayList<>();
      for (AttributeValuePair valuePair : dataArray)
      {
        if (valuePair.attrName.equalsIgnoreCase(attrName)
@@ -795,8 +793,8 @@
      Schema schema = getInfo().getServerDescriptor().getSchema();
      if (schema != null)
      {
        ArrayList<String> attributes = new ArrayList<String>();
        ArrayList<String> ocs = new ArrayList<String>();
        ArrayList<String> attributes = new ArrayList<>();
        ArrayList<String> ocs = new ArrayList<>();
        if (newValue.getStructural() != null)
        {
          ocs.add(newValue.getStructural().toLowerCase());
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/TaskToSchedulePanel.java
@@ -180,7 +180,7 @@
    scheduleType = Utilities.createComboBox();
    scheduleType.setModel(new DefaultComboBoxModel());
    ArrayList<Object> newElements = new ArrayList<Object>();
    ArrayList<Object> newElements = new ArrayList<>();
    newElements.add(new CategorizedComboBoxElement(LAUNCH_NOW,
        CategorizedComboBoxElement.Type.REGULAR));
    newElements.add(COMBO_SEPARATOR);
@@ -308,7 +308,7 @@
  public void okClicked()
  {
    schedule = null;
    ArrayList<LocalizableMessage> errorMessages = new ArrayList<LocalizableMessage>();
    ArrayList<LocalizableMessage> errorMessages = new ArrayList<>();
    updateErrorMessages(errorMessages);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/VLVIndexPanel.java
@@ -350,10 +350,10 @@
  private void deleteIndex()
  {
    final List<LocalizableMessage> errors = new ArrayList<LocalizableMessage>();
    final List<LocalizableMessage> errors = new ArrayList<>();
    final ProgressDialog dlg = new ProgressDialog(
        createFrame(), getParentDialog(this), INFO_CTRL_PANEL_DELETE_VLV_INDEX_TITLE.get(), getInfo());
    final List<AbstractIndexDescriptor> indexesToDelete = new ArrayList<AbstractIndexDescriptor>();
    final List<AbstractIndexDescriptor> indexesToDelete = new ArrayList<>();
    indexesToDelete.add(index);
    final DeleteIndexTask newTask = new DeleteIndexTask(getInfo(), dlg, indexesToDelete);
    for (final Task task : getInfo().getTasks())
@@ -569,7 +569,7 @@
    {
      super(info, dlg);
      backendID = index.getBackend().getBackendID();
      backendSet = new HashSet<String>();
      backendSet = new HashSet<>();
      backendSet.add(backendID);
      indexName = index.getName();
      sortOrder = getSortOrder();
@@ -773,7 +773,7 @@
    @Override
    protected ArrayList<String> getCommandLineArguments()
    {
      return new ArrayList<String>();
      return new ArrayList<>();
    }
    private String getConfigCommandLineName()
@@ -817,7 +817,7 @@
    private List<String> getDSConfigCommandLineArguments()
    {
      final List<String> args = new ArrayList<String>();
      final List<String> args = new ArrayList<>();
      args.add("set-local-db-vlv-index-prop");
      args.add("--backend-name");
      args.add(backendID);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ViewEntryPanel.java
@@ -77,21 +77,18 @@
  /**
   * The read-only attributes as they appear on the schema.
   */
  protected SortedSet<String> schemaReadOnlyAttributes = new TreeSet<String>();
  protected SortedSet<String> schemaReadOnlyAttributes = new TreeSet<>();
  /**
   * The read-only attributes in lower case.
   */
  protected SortedSet<String> schemaReadOnlyAttributesLowerCase =
    new TreeSet<String>();
  protected SortedSet<String> schemaReadOnlyAttributesLowerCase = new TreeSet<>();
  /**
   * The editable operational attributes.
   */
  protected SortedSet<String> editableOperationalAttrNames =
    new TreeSet<String>();
  protected SortedSet<String> editableOperationalAttrNames = new TreeSet<>();
  private JLabel title= Utilities.createDefaultLabel();
  private Set<LDAPEntryChangedListener> listeners =
    new LinkedHashSet<LDAPEntryChangedListener>();
  private Set<LDAPEntryChangedListener> listeners = new LinkedHashSet<>();
  /**
   * Whether the entry change events should be ignored or not.
@@ -291,7 +288,7 @@
      Schema schema)
  {
    ObjectClass structuralObjectClass = null;
    SortedSet<String> auxiliaryClasses = new TreeSet<String>();
    SortedSet<String> auxiliaryClasses = new TreeSet<>();
    for (Object o : ocValues)
    {
      ObjectClass objectClass =
@@ -348,7 +345,7 @@
        {
          if (attr.getNameWithOptions().equals(attrName))
          {
            ArrayList<ByteString> newValues = new ArrayList<ByteString>();
            ArrayList<ByteString> newValues = new ArrayList<>();
            Iterator<ByteString> it = attr.iterator();
            while (it.hasNext())
            {
@@ -365,7 +362,7 @@
      {
        org.opends.server.types.Attribute attr =
          Attributes.create(rdn.getAttributeType(i), value);
        ArrayList<ByteString> newValues = new ArrayList<ByteString>();
        ArrayList<ByteString> newValues = new ArrayList<>();
        newValues.add(value);
        entry.addAttribute(attr, newValues);
      }
@@ -548,7 +545,7 @@
  protected void setValues(CustomSearchResult sr, String attrName)
  {
    List<Object> values = getValues(attrName);
    List<Object> valuesToSet = new ArrayList<Object>();
    List<Object> valuesToSet = new ArrayList<>();
    for (Object value : values)
    {
      if (value instanceof ObjectClassValue)
@@ -621,7 +618,7 @@
  protected Set<String> getObjectClassSuperiorValues(
      ObjectClass oc)
  {
    Set<String> names = new LinkedHashSet<String>();
    Set<String> names = new LinkedHashSet<>();
    Set<ObjectClass> parents = oc.getSuperiorClasses();
    if (parents != null && !parents.isEmpty())
    {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/WindowsServicePanel.java
@@ -226,7 +226,7 @@
  private void updateWindowsService()
  {
    LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>();
    LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<>();
    ProgressDialog progressDialog = new ProgressDialog(
        Utilities.createFrame(), Utilities.getParentDialog(this), getTitle(),
        getInfo());
@@ -288,7 +288,7 @@
    {
      super(info, dlg);
      this.enableService = enableService;
      backendSet = new HashSet<String>();
      backendSet = new HashSet<>();
    }
    /** {@inheritDoc} */
@@ -386,7 +386,7 @@
    /** {@inheritDoc} */
    protected ArrayList<String> getCommandLineArguments()
    {
      ArrayList<String> args = new ArrayList<String>();
      ArrayList<String> args = new ArrayList<>();
      if (enableService)
      {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/WorkQueueMonitoringPanel.java
@@ -48,8 +48,7 @@
public class WorkQueueMonitoringPanel extends GeneralMonitoringPanel
{
  private static final long serialVersionUID = 9031734563700069830L;
  static List<MonitoringAttributes> attributes =
    new ArrayList<MonitoringAttributes>();
  static List<MonitoringAttributes> attributes = new ArrayList<>();
  {
    attributes.add(BasicMonitoringAttributes.AVERAGE_REQUEST_BACKLOG);
    attributes.add(BasicMonitoringAttributes.MAX_REQUEST_BACKLOG);
@@ -57,8 +56,7 @@
    attributes.add(BasicMonitoringAttributes.REQUESTS_SUBMITTED);
    attributes.add(BasicMonitoringAttributes.REQUESTS_REJECTED);
  }
  private ArrayList<JLabel> monitoringLabels =
    new ArrayList<JLabel>();
  private ArrayList<JLabel> monitoringLabels = new ArrayList<>();
  {
    for (int i=0; i<attributes.size(); i++)
    {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/components/AddRemovePanel.java
@@ -177,14 +177,14 @@
    };
    availableListModel = new SortableListModel<T>();
    availableListModel = new SortableListModel<>();
    availableListModel.addListDataListener(listDataListener);
    availableList = new JList();
    availableList.setModel(availableListModel);
    availableList.setVisibleRowCount(15);
    availableList.addMouseListener(doubleClickListener);
    selectedListModel = new SortableListModel<T>();
    selectedListModel = new SortableListModel<>();
    selectedListModel.addListDataListener(listDataListener);
    selectedList = new JList();
    selectedList.setModel(selectedListModel);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/components/CustomTree.java
@@ -298,7 +298,7 @@
    super.addMouseListener(mouseListener);
    if (mouseListeners == null)
    {
      mouseListeners = new HashSet<MouseListener>();
      mouseListeners = new HashSet<>();
    }
    mouseListeners.add(mouseListener);
  }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/components/DoubleAddRemovePanel.java
@@ -85,7 +85,7 @@
  private JList selectedList1;
  private JList selectedList2;
  private Class<T> theClass;
  private Collection<T> unmovableItems = new ArrayList<T>();
  private Collection<T> unmovableItems = new ArrayList<>();
  private boolean ignoreListEvents;
  /**
@@ -193,21 +193,21 @@
    };
    availableListModel = new SortableListModel<T>();
    availableListModel = new SortableListModel<>();
    availableListModel.addListDataListener(listDataListener);
    availableList = new JList();
    availableList.setModel(availableListModel);
    availableList.setVisibleRowCount(15);
    availableList.addMouseListener(doubleClickListener);
    selectedListModel1 = new SortableListModel<T>();
    selectedListModel1 = new SortableListModel<>();
    selectedListModel1.addListDataListener(listDataListener);
    selectedList1 = new JList();
    selectedList1.setModel(selectedListModel1);
    selectedList1.setVisibleRowCount(7);
    selectedList1.addMouseListener(doubleClickListener);
    selectedListModel2 = new SortableListModel<T>();
    selectedListModel2 = new SortableListModel<>();
    selectedListModel2.addListDataListener(listDataListener);
    selectedList2 = new JList();
    selectedList2.setModel(selectedListModel2);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/components/FilterTextField.java
@@ -75,15 +75,10 @@
   */
  public static long DEFAULT_REFRESH_ICON_TIME = 750;
  private LinkedHashSet<ActionListener> listeners =
    new LinkedHashSet<ActionListener>();
  private LinkedHashSet<ActionListener> listeners = new LinkedHashSet<>();
  private boolean constructorBorderSet;
  /**
   * Default constructor.
   *
   */
  /** Default constructor. */
  public FilterTextField()
  {
    super(15);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/components/ObjectClassCellPanel.java
@@ -190,7 +190,7 @@
    LocalizableMessageBuilder sb = new LocalizableMessageBuilder();
    if (value != null)
    {
      Set<String> aux = new TreeSet<String>(value.getAuxiliary());
      Set<String> aux = new TreeSet<>(value.getAuxiliary());
      aux.remove("top");
      if (value.getStructural() != null)
      {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/components/SuperiorObjectClassesEditor.java
@@ -69,7 +69,7 @@
{
  private static final long serialVersionUID = 123123973933568L;
  private Set<ObjectClass> toExclude = new HashSet<ObjectClass>();
  private Set<ObjectClass> toExclude = new HashSet<>();
  private JComboBox singleSuperior = Utilities.createComboBox();
  private JLabel multipleSuperiors = Utilities.createDefaultLabel();
  private JButton bSpecifyMultiple = Utilities.createButton(
@@ -87,11 +87,8 @@
  private boolean isMultiple;
  private Set<ObjectClass> selectedMultipleSuperiors =
    new HashSet<ObjectClass>();
  private Set<SuperiorObjectClassesChangedListener> listeners =
    new HashSet<SuperiorObjectClassesChangedListener>();
  private Set<ObjectClass> selectedMultipleSuperiors = new HashSet<>();
  private Set<SuperiorObjectClassesChangedListener> listeners = new HashSet<>();
  private Schema schema;
@@ -242,8 +239,7 @@
  private void updateMultipleSuperiorsLabel(
      Set<ObjectClass> superiors)
  {
    SortedSet<String> orderedOcs =
      new TreeSet<String>(new LowerCaseComparator());
    SortedSet<String> orderedOcs = new TreeSet<>(new LowerCaseComparator());
    for (ObjectClass oc : superiors)
    {
      orderedOcs.add(oc.getNameOrOID());
@@ -293,8 +289,7 @@
  private void updateWithSchema(Schema schema)
  {
    HashMap<String, ObjectClass> objectClassNameMap = new HashMap<String,
    ObjectClass>();
    HashMap<String, ObjectClass> objectClassNameMap = new HashMap<>();
    for (String key : schema.getObjectClasses().keySet())
    {
      ObjectClass oc = schema.getObjectClass(key);
@@ -303,10 +298,9 @@
        objectClassNameMap.put(oc.getNameOrOID(), oc);
      }
    }
    SortedSet<String> orderedKeys =
      new TreeSet<String>(new LowerCaseComparator());
    SortedSet<String> orderedKeys = new TreeSet<>(new LowerCaseComparator());
    orderedKeys.addAll(objectClassNameMap.keySet());
    ArrayList<Object> newParents = new ArrayList<Object>();
    ArrayList<Object> newParents = new ArrayList<>();
    for (String key : orderedKeys)
    {
      newParents.add(objectClassNameMap.get(key));
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/renderer/LDAPEntryTableCellRenderer.java
@@ -59,7 +59,7 @@
  private ImageIcon lockIcon =
    Utilities.createImageIcon(IconPool.IMAGE_PATH+"/field-locked.png");
  private Schema schema;
  private Collection<String> requiredAttrs = new ArrayList<String>();
  private Collection<String> requiredAttrs = new ArrayList<>();
  /**
   * Constructor of the cell renderer.