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

Jean-Noel Rouvignac
06.42.2015 dc3f266ddaa018e327714c80bd016e91a2742eed
AutoRefactor'ed Use Diamond Operator
51 files modified
607 ■■■■■ changed files
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/NewAttributePanel.java 2 ●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ApplicationPrintStream.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/BackgroundTask.java 8 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java 35 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromFile.java 24 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigReader.java 2 ●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/LDAPEntryReader.java 3 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/NumSubordinateHacker.java 49 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ReadOnlyConfigFileHandler.java 2 ●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/Utilities.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ViewPositions.java 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/UninstallCliHelper.java 7 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/UninstallUserData.java 17 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/Uninstaller.java 80 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/UninstallerArgumentParser.java 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/ui/ConfirmUninstallPanel.java 7 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/ui/LoginDialog.java 2 ●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/BuildInformation.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/CliUserInteraction.java 2 ●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/Configuration.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/CurrentInstallStatus.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/JavaArguments.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ProgressUpdateListenerDelegate.java 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/UserData.java 20 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ConfiguredDomain.java 3 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ConfiguredReplication.java 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java 44 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/NewSuffixOptions.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/offline/OfflineInstaller.java 17 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/DataOptionsPanel.java 15 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/DataReplicationPanel.java 9 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/GlobalAdministratorPanel.java 10 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/InstallReviewPanel.java 12 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/JavaArgumentsDialog.java 40 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/RemoteReplicationPortsPanel.java 34 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/SecurityOptionsDialog.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/SelectAliasDialog.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/ServerSettingsPanel.java 15 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/webstart/WebStartInstaller.java 19 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/ButtonsPanel.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/CertificateDialog.java 2 ●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/CurrentStepPanel.java 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/CustomHTMLEditorKit.java 2 ●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/GuiApplication.java 2 ●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/QuickSetupDialog.java 10 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/QuickSetupErrorPanel.java 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/QuickSetupStepPanel.java 6 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/StepsPanel.java 12 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/UIFactory.java 2 ●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/util/BackgroundTask.java 3 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/util/ServerController.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/NewAttributePanel.java
@@ -511,7 +511,7 @@
      comboBoxes[i].setRenderer(renderer);
    }
    DefaultComboBoxModel<AttributeUsage> model = new DefaultComboBoxModel<AttributeUsage>();
    DefaultComboBoxModel<AttributeUsage> model = new DefaultComboBoxModel<>();
    for (AttributeUsage us : AttributeUsage.values())
    {
      model.addElement(us);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ApplicationPrintStream.java
@@ -42,16 +42,12 @@
 */
public class ApplicationPrintStream extends PrintStream
{
  private ArrayList<PrintStreamListener> listeners =
    new ArrayList<PrintStreamListener>();
  private ArrayList<PrintStreamListener> listeners = new ArrayList<>();
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  private boolean notifyListeners = true;
  /**
   * Default constructor.
   *
   */
  /** Default constructor. */
  public ApplicationPrintStream()
  {
    super(new ByteArrayOutputStream(), true);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/BackgroundTask.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2015 ForgeRock AS.
 */
package org.opends.guitools.controlpanel.util;
@@ -44,14 +45,11 @@
  public final void startBackgroundTask()
  {
    interrupted = false;
    taskThread = new BackgroundTaskThread<T>(this);
    taskThread = new BackgroundTaskThread<>(this);
    taskThread.start();
  }
  /**
   * Interrupts the thread that is running background.
   *
   */
  /** Interrupts the thread that is running background. */
  public final void interrupt()
  {
    interrupted = true;
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java
@@ -124,23 +124,18 @@
  private boolean isLocal = true;
  private final Map<String, CustomSearchResult> hmConnectionHandlersMonitor =
    new HashMap<String, CustomSearchResult>();
  private final Map<String, CustomSearchResult> hmConnectionHandlersMonitor = new HashMap<>();
  /** The monitor root entry DN. */
  protected DN monitorDN = DN.rootDN();
  /** The JVM memory usage monitoring entry DN. */
  protected DN jvmMemoryUsageDN = DN.rootDN();
  /** The system information monitoring entry DN. */
  protected DN systemInformationDN = DN.rootDN();
  /**The entry cache monitoring entry DN. */
  protected DN entryCachesDN = DN.rootDN();
  /** The work queue monitoring entry DN. */
  protected DN workQueueDN = DN.rootDN();
  /** The version monitoring entry DN. */
  protected DN versionDN = DN.rootDN();
@@ -263,11 +258,11 @@
   */
  public void readConfiguration(final InitialLdapContext context)
  {
    final List<OpenDsException> errors = new ArrayList<OpenDsException>();
    final Set<ConnectionHandlerDescriptor> connectionHandlers = new HashSet<ConnectionHandlerDescriptor>();
    final Set<BackendDescriptor> backendDescriptors = new HashSet<BackendDescriptor>();
    final Set<DN> as = new HashSet<DN>();
    final Set<TaskEntry> tasks = new HashSet<TaskEntry>();
    final List<OpenDsException> errors = new ArrayList<>();
    final Set<ConnectionHandlerDescriptor> connectionHandlers = new HashSet<>();
    final Set<BackendDescriptor> backendDescriptors = new HashSet<>();
    final Set<DN> as = new HashSet<>();
    final Set<TaskEntry> tasks = new HashSet<>();
    rootMonitor = null;
    jvmMemoryUsage = null;
@@ -414,14 +409,14 @@
      try
      {
        BackendCfgClient backend = root.getBackend(backendName);
        Set<BaseDNDescriptor> baseDNs = new HashSet<BaseDNDescriptor>();
        Set<BaseDNDescriptor> baseDNs = new HashSet<>();
        for (DN dn : backend.getBaseDN())
        {
          BaseDNDescriptor baseDN = new BaseDNDescriptor(BaseDNDescriptor.Type.NOT_REPLICATED, dn, null, -1, -1, -1);
          baseDNs.add(baseDN);
        }
        Set<IndexDescriptor> indexes = new HashSet<IndexDescriptor>();
        Set<VLVIndexDescriptor> vlvIndexes = new HashSet<VLVIndexDescriptor>();
        Set<IndexDescriptor> indexes = new HashSet<>();
        Set<VLVIndexDescriptor> vlvIndexes = new HashSet<>();
        BackendDescriptor.Type type;
        if (backend instanceof LocalDBBackendCfgClient)
        {
@@ -1008,14 +1003,12 @@
  private ConnectionHandlerDescriptor getConnectionHandler(ConnectionHandlerCfgClient connHandler, String name)
  throws OpenDsException
  {
    SortedSet<InetAddress> addresses = new TreeSet<InetAddress>(getInetAddressComparator());
    int port;
    ConnectionHandlerDescriptor.Protocol protocol;
    SortedSet<InetAddress> addresses = new TreeSet<>(getInetAddressComparator());
    ConnectionHandlerDescriptor.State state = connHandler.isEnabled() ? ConnectionHandlerDescriptor.State.ENABLED
                                                                      : ConnectionHandlerDescriptor.State.DISABLED;
    ConnectionHandlerDescriptor.Protocol protocol;
    int port;
    if (connHandler instanceof LDAPConnectionHandlerCfgClient)
    {
      LDAPConnectionHandlerCfgClient ldap = (LDAPConnectionHandlerCfgClient)connHandler;
@@ -1094,7 +1087,7 @@
  private ConnectionHandlerDescriptor getConnectionHandler(AdministrationConnectorCfgClient adminConnector)
      throws OpenDsException
  {
    SortedSet<InetAddress> addresses = new TreeSet<InetAddress>(getInetAddressComparator());
    SortedSet<InetAddress> addresses = new TreeSet<>(getInetAddressComparator());
    ConnectionHandlerDescriptor.Protocol protocol = ConnectionHandlerDescriptor.Protocol.ADMINISTRATION_CONNECTOR;
    ConnectionHandlerDescriptor.State state = ConnectionHandlerDescriptor.State.ENABLED;
@@ -1191,7 +1184,7 @@
  private Set<CustomSearchResult>getMonitoringEntries(ConnectionHandlerDescriptor ch)
  {
    Set<CustomSearchResult> monitorEntries = new HashSet<CustomSearchResult>();
    Set<CustomSearchResult> monitorEntries = new HashSet<>();
    if (ch.getState() == ConnectionHandlerDescriptor.State.ENABLED)
    {
      for (String key : hmConnectionHandlersMonitor.keySet())
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromFile.java
@@ -105,10 +105,10 @@
   */
  public void readConfiguration()
  {
    final List<OpenDsException> errors = new ArrayList<OpenDsException>();
    final Set<ConnectionHandlerDescriptor> connectionHandlers = new HashSet<ConnectionHandlerDescriptor>();
    final Set<BackendDescriptor> backendDescriptors = new HashSet<BackendDescriptor>();
    final Set<DN> alternateBindDNs = new HashSet<DN>();
    final List<OpenDsException> errors = new ArrayList<>();
    final Set<ConnectionHandlerDescriptor> connectionHandlers = new HashSet<>();
    final Set<BackendDescriptor> backendDescriptors = new HashSet<>();
    final Set<DN> alternateBindDNs = new HashSet<>();
    try
    {
      DirectoryServer.getInstance().initializeConfiguration();
@@ -220,15 +220,15 @@
      try
      {
        final BackendCfg backend = root.getBackend(backendName);
        final Set<BaseDNDescriptor> baseDNs = new HashSet<BaseDNDescriptor>();
        final Set<BaseDNDescriptor> baseDNs = new HashSet<>();
        for (final DN dn : backend.getBaseDN())
        {
          final BaseDNDescriptor baseDN =
              new BaseDNDescriptor(BaseDNDescriptor.Type.NOT_REPLICATED, dn, null, -1, -1, -1);
          baseDNs.add(baseDN);
        }
        final Set<IndexDescriptor> indexes = new HashSet<IndexDescriptor>();
        final Set<VLVIndexDescriptor> vlvIndexes = new HashSet<VLVIndexDescriptor>();
        final Set<IndexDescriptor> indexes = new HashSet<>();
        final Set<VLVIndexDescriptor> vlvIndexes = new HashSet<>();
        BackendDescriptor.Type type;
        if (backend instanceof LocalDBBackendCfg)
        {
@@ -482,15 +482,14 @@
  private ConnectionHandlerDescriptor getConnectionHandler(final ConnectionHandlerCfg connHandler, final String name)
      throws OpenDsException
  {
    final SortedSet<InetAddress> addresses = new TreeSet<InetAddress>(getInetAddressComparator());
    int port;
    ConnectionHandlerDescriptor.Protocol protocol;
    final SortedSet<InetAddress> addresses = new TreeSet<>(getInetAddressComparator());
    final ConnectionHandlerDescriptor.State state =
        connHandler.isEnabled() ? ConnectionHandlerDescriptor.State.ENABLED
            : ConnectionHandlerDescriptor.State.DISABLED;
    ConnectionHandlerDescriptor.Protocol protocol;
    int port;
    if (connHandler instanceof LDAPConnectionHandlerCfg)
    {
      final LDAPConnectionHandlerCfg ldap = (LDAPConnectionHandlerCfg) connHandler;
@@ -569,10 +568,9 @@
  private ConnectionHandlerDescriptor getConnectionHandler(final AdministrationConnectorCfg adminConnector)
      throws OpenDsException
  {
    final SortedSet<InetAddress> addresses = new TreeSet<InetAddress>(getInetAddressComparator());
    final SortedSet<InetAddress> addresses = new TreeSet<>(getInetAddressComparator());
    final ConnectionHandlerDescriptor.Protocol protocol = ConnectionHandlerDescriptor.Protocol.ADMINISTRATION_CONNECTOR;
    final ConnectionHandlerDescriptor.State state = ConnectionHandlerDescriptor.State.ENABLED;
    addAll(addresses, adminConnector.getListenAddress());
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigReader.java
@@ -315,7 +315,7 @@
   */
  protected List<VLVSortOrder> getVLVSortOrder(String s)
  {
    ArrayList<VLVSortOrder> sortOrder = new ArrayList<VLVSortOrder>();
    ArrayList<VLVSortOrder> sortOrder = new ArrayList<>();
    if (s != null)
    {
      String[] attrNames = s.split(" ");
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/LDAPEntryReader.java
@@ -50,8 +50,7 @@
{
  private final String dn;
  private final InitialLdapContext ctx;
  private final Set<EntryReadListener> listeners =
    new HashSet<EntryReadListener>();
  private final Set<EntryReadListener> listeners = new HashSet<>();
  private boolean isOver;
  private boolean notifyListeners;
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/NumSubordinateHacker.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.util;
@@ -34,28 +34,14 @@
import org.opends.server.types.LDAPURL;
import org.opends.server.types.OpenDsException;
/**
 * Class used to handle the case where numsubordinates does not work between
 * databases.
 *
 */
/** Class used to handle the case where numsubordinates does not work between databases. */
public class NumSubordinateHacker {
  String serverHost;
  int serverPort;
  ArrayList<DN> unreliableEntryList;
  String serverHost = "not-initialized";
  int serverPort = -1;
  final ArrayList<DN> unreliableEntryList = new ArrayList<>();
  boolean isUnreliableEntryListEmpty;
  /**
   * Default constructor.
   *
   */
  public NumSubordinateHacker() {
    serverHost = "not-initialized";
    serverPort = -1;
    unreliableEntryList = new ArrayList<DN>();
  }
  /**
    * Tells whether the list of unreliable contains children of
    * the entry with LDAPUrl parentUrl.
    * @param parentUrl the LDAPURL of the parent.
@@ -63,32 +49,27 @@
    * children of the parentUrl.  Returns <CODE>false</CODE> otherwise.
    */
  public boolean containsChildrenOf(LDAPURL parentUrl) {
    boolean containsChildren = false;
    if (!isUnreliableEntryListEmpty) {
      boolean isInServer = serverHost.equalsIgnoreCase(
          String.valueOf(parentUrl.getHost())) &&
      (serverPort == parentUrl.getPort());
      boolean isInServer = serverHost.equalsIgnoreCase(String.valueOf(parentUrl.getHost()))
          && serverPort == parentUrl.getPort();
      if (isInServer) {
        for (DN dn : unreliableEntryList)
        try
        {
          try
          for (DN dn : unreliableEntryList)
          {
            if (dn.equals(DN.valueOf(parentUrl.getRawBaseDN())))
            {
              containsChildren = true;
              break;
              return true;
            }
          }
          catch (OpenDsException oe)
          {
            throw new RuntimeException("Error decoding DN of url: "+
                parentUrl);
          }
        }
        catch (OpenDsException oe)
        {
          throw new RuntimeException("Error decoding DN of url: "+ parentUrl);
        }
      }
    }
    return containsChildren;
    return false;
  }
  /**
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ReadOnlyConfigFileHandler.java
@@ -75,7 +75,7 @@
   * The mapping that holds all of the configuration entries that have been read
   * from the LDIF file.
   */
  private HashMap<DN,ConfigEntry> configEntries = new HashMap<DN,ConfigEntry>();
  private HashMap<DN,ConfigEntry> configEntries = new HashMap<>();
  /** The reference to the configuration root entry. */
  private ConfigEntry configRootEntry;
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/Utilities.java
@@ -262,7 +262,7 @@
    Utilities.centerGoldenMean(dlg, Utilities.getParentDialog(this));
    dlg.setVisible(true);
    */
    ArrayList<String> stringErrors = new ArrayList<String>();
    ArrayList<String> stringErrors = new ArrayList<>();
    for (LocalizableMessage err : errors)
    {
      stringErrors.add(err.toString());
@@ -2363,7 +2363,7 @@
    if (confEntry != null)
    {
      // Copy the values to avoid problems with this recursive method.
      ArrayList<DN> childDNs = new ArrayList<DN>(confEntry.getChildren().keySet());
      ArrayList<DN> childDNs = new ArrayList<>(confEntry.getChildren().keySet());
      for (DN childDN : childDNs)
      {
        deleteConfigSubtree(confHandler, childDN);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ViewPositions.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions Copyright 2015 ForgeRock AS.
 */
package org.opends.guitools.controlpanel.util;
@@ -37,8 +38,8 @@
 */
public class ViewPositions
{
  private ArrayList<JScrollPane> scrolls = new ArrayList<JScrollPane>();
  private ArrayList<Point> points = new ArrayList<Point>();
  private ArrayList<JScrollPane> scrolls = new ArrayList<>();
  private ArrayList<Point> points = new ArrayList<>();
  /**
   * Returns the size of the lists.
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/UninstallCliHelper.java
@@ -336,7 +336,7 @@
        INFO_CLI_UNINSTALL_SPECIFY_WHAT_REMOVE.get()
      };
    MenuBuilder<Integer> builder = new MenuBuilder<Integer>(this);
    MenuBuilder<Integer> builder = new MenuBuilder<>(this);
    builder.setPrompt(INFO_CLI_UNINSTALL_WHAT_TO_DELETE.get());
    for (int i=0; i<indexes.length; i++)
@@ -1321,8 +1321,7 @@
    logger.info(LocalizableMessage.raw("Handle topology cache."));
    Set<TopologyCacheException> exceptions =
      new HashSet<TopologyCacheException>();
    Set<TopologyCacheException> exceptions = new HashSet<>();
    /* Analyze if we had any exception while loading servers.  For the moment
     * only throw the exception found if the user did not provide the
     * Administrator DN and this caused a problem authenticating in one server
@@ -1338,7 +1337,7 @@
        exceptions.add(e);
      }
    }
    Set<LocalizableMessage> exceptionMsgs = new LinkedHashSet<LocalizableMessage>();
    Set<LocalizableMessage> exceptionMsgs = new LinkedHashSet<>();
    /* Check the exceptions and see if we throw them or not. */
    for (TopologyCacheException e : exceptions)
    {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/UninstallUserData.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions Copyright 2015 ForgeRock AS.
 */
package org.opends.guitools.uninstaller;
@@ -38,8 +39,8 @@
 */
public class UninstallUserData extends UserData {
  private Set<String> externalDbsToRemove = new HashSet<String>();
  private Set<String> externalLogsToRemove = new HashSet<String>();
  private Set<String> externalDbsToRemove = new HashSet<>();
  private Set<String> externalLogsToRemove = new HashSet<>();
  private boolean removeDatabases;
  private boolean removeLogs;
  private boolean removeLibrariesAndTools;
@@ -47,13 +48,11 @@
  private boolean removeLDIFs;
  private boolean removeConfigurationAndSchema;
  private boolean updateRemoteReplication;
  private ApplicationTrustManager trustManager =
    new ApplicationTrustManager(null);
  private ApplicationTrustManager trustManager = new ApplicationTrustManager(null);
  private String adminUID;
  private String adminPwd;
  private String localServerUrl;
  private HashSet<ServerDescriptor> remoteServers =
    new HashSet<ServerDescriptor>();
  private HashSet<ServerDescriptor> remoteServers = new HashSet<>();
  private String replicationServer;
  private String referencedHostName;
@@ -76,7 +75,7 @@
   */
  public Set<String> getExternalDbsToRemove()
  {
    return new HashSet<String>(externalDbsToRemove);
    return new HashSet<>(externalDbsToRemove);
  }
  /**
@@ -98,7 +97,7 @@
   */
  public Set<String> getExternalLogsToRemove()
  {
    return new HashSet<String>(externalLogsToRemove);
    return new HashSet<>(externalLogsToRemove);
  }
  /**
@@ -347,7 +346,7 @@
   */
  public Set<ServerDescriptor> getRemoteServers()
  {
    return new HashSet<ServerDescriptor>(remoteServers);
    return new HashSet<>(remoteServers);
  }
  /**
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/Uninstaller.java
@@ -94,6 +94,7 @@
 */
public class Uninstaller extends GuiApplication implements CliApplication {
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  private ProgressStep status = UninstallProgressStep.NOT_STARTED;
  private boolean runStarted;
  private boolean errorOnRemoteOccurred;
@@ -101,27 +102,19 @@
  private UninstallerArgumentParser parser;
  private HashMap<ProgressStep, Integer> hmRatio =
          new HashMap<ProgressStep, Integer>();
  private HashMap<ProgressStep, LocalizableMessage> hmSummary =
          new HashMap<ProgressStep, LocalizableMessage>();
  private Map<ProgressStep, Integer> hmRatio = new HashMap<>();
  private Map<ProgressStep, LocalizableMessage> hmSummary = new HashMap<>();
  private ApplicationException ue;
  private Boolean isWindowsServiceEnabled;
  private UninstallCliHelper cliHelper = new UninstallCliHelper();
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  private LoginDialog loginDialog;
  private ProgressDialog startProgressDlg;
  private LocalizableMessageBuilder startProgressDetails = new LocalizableMessageBuilder();
  private UninstallData conf;
  /**
   * Default constructor.
   */
  /** Default constructor. */
  public Uninstaller()
  {
    super();
@@ -299,13 +292,13 @@
    // This is updated on the method handleTopologyCache
    uud.setUpdateRemoteReplication(false);
    Set<String> dbs = new HashSet<String>();
    Set<String> dbs = new HashSet<>();
    Set<?> s = (Set<?>) qs.getFieldValue(FieldName.EXTERNAL_DB_DIRECTORIES);
    for (Object v : s) {
      dbs.add((String) v);
    }
    Set<String> logs = new HashSet<String>();
    Set<String> logs = new HashSet<>();
    s = (Set<?>) qs.getFieldValue(FieldName.EXTERNAL_LOG_FILES);
    for (Object v : s) {
      logs.add((String) v);
@@ -619,7 +612,7 @@
     Utils.directoryExistsAndIsNotEmpty(resourcesPath);
    boolean classesDefined =
      Utils.directoryExistsAndIsNotEmpty(classesPath);
    ArrayList<String> paths = new ArrayList<String>();
    ArrayList<String> paths = new ArrayList<>();
    paths.add(libPath);
    if (resourcesDefined)
    {
@@ -687,8 +680,7 @@
    * deleting files, the value for downloading will be the double of the
    * value for extracting.
    */
    HashMap<UninstallProgressStep, Integer> hmTime =
            new HashMap<UninstallProgressStep, Integer>();
    Map<UninstallProgressStep, Integer> hmTime = new HashMap<>();
    hmTime.put(UninstallProgressStep.UNCONFIGURING_REPLICATION, 5);
    hmTime.put(UninstallProgressStep.STOPPING_SERVER, 15);
    hmTime.put(UninstallProgressStep.DISABLING_WINDOWS_SERVICE, 5);
@@ -698,8 +690,7 @@
    hmTime.put(UninstallProgressStep.DELETING_INSTALLATION_FILES, 10);
    int totalTime = 0;
    ArrayList<UninstallProgressStep> steps =
            new ArrayList<UninstallProgressStep>();
    List<UninstallProgressStep> steps = new ArrayList<>();
    if (getUninstallUserData().getUpdateRemoteReplication()) {
      totalTime += hmTime.get(UninstallProgressStep.UNCONFIGURING_REPLICATION);
      steps.add(UninstallProgressStep.UNCONFIGURING_REPLICATION);
@@ -1015,7 +1006,7 @@
  /** {@inheritDoc} */
  @Override
  public Set<? extends WizardStep> getWizardSteps() {
    Set<WizardStep> setSteps = new HashSet<WizardStep>();
    Set<WizardStep> setSteps = new HashSet<>();
    setSteps.add(Step.CONFIRM_UNINSTALL);
    setSteps.add(Step.PROGRESS);
    setSteps.add(Step.FINISHED);
@@ -1025,15 +1016,14 @@
  /** {@inheritDoc} */
  @Override
  public QuickSetupStepPanel createWizardStepPanel(WizardStep step) {
    QuickSetupStepPanel p = null;
    if (step == Step.CONFIRM_UNINSTALL) {
      p = new ConfirmUninstallPanel(this, installStatus);
      return new ConfirmUninstallPanel(this, installStatus);
    } else if (step == Step.PROGRESS) {
      p = new ProgressPanel(this);
      return new ProgressPanel(this);
    } else if (step == Step.FINISHED) {
      p = new FinishedPanel(this);
      return new FinishedPanel(this);
    }
    return p;
    return null;
  }
  /**
@@ -1166,7 +1156,7 @@
       * the installation files.
       */
      int totalRatio = 0;
      ArrayList<Integer> cumulatedRatio = new ArrayList<Integer>();
      ArrayList<Integer> cumulatedRatio = new ArrayList<>();
      for (File f : rootFiles) {
        if (filter.accept(f)) {
          Installation installation = getInstallation();
@@ -1629,15 +1619,13 @@
  {
    logger.info(LocalizableMessage.raw("Handling TopologyCache"));
    boolean stopProcessing = false;
    Set<TopologyCacheException> exceptions =
      new HashSet<TopologyCacheException>();
    Set<TopologyCacheException> exceptions = new HashSet<>();
    /* Analyze if we had any exception while loading servers.  For the moment
     * only throw the exception found if the user did not provide the
     * Administrator DN and this caused a problem authenticating in one server
     * or if there is a certificate problem.
     */
    Set<ServerDescriptor> servers = cache.getServers();
    for (ServerDescriptor server : servers)
    for (ServerDescriptor server : cache.getServers())
    {
      TopologyCacheException e = server.getLastException();
      if (e != null)
@@ -1645,7 +1633,7 @@
        exceptions.add(e);
      }
    }
    Set<LocalizableMessage> exceptionMsgs = new LinkedHashSet<LocalizableMessage>();
    Set<LocalizableMessage> exceptionMsgs = new LinkedHashSet<>();
    /* Check the exceptions and see if we throw them or not. */
    for (TopologyCacheException e : exceptions)
    {
@@ -1664,25 +1652,13 @@
      case GENERIC_CREATING_CONNECTION:
        if (isCertificateException(e.getCause()))
        {
          UserDataCertificateException.Type excType;
          ApplicationTrustManager.Cause cause = null;
          if (e.getTrustManager() != null)
          {
            cause = e.getTrustManager().getLastRefusedCause();
          }
          logger.info(LocalizableMessage.raw("Certificate exception cause: "+cause));
          if (cause == ApplicationTrustManager.Cause.NOT_TRUSTED)
          {
            excType = UserDataCertificateException.Type.NOT_TRUSTED;
          }
          else if (cause == ApplicationTrustManager.Cause.HOST_NAME_MISMATCH)
          {
            excType = UserDataCertificateException.Type.HOST_NAME_MISMATCH;
          }
          else
          {
            excType = null;
          }
          UserDataCertificateException.Type excType = getCertificateExceptionType(cause);
          if (excType != null)
          {
            String h;
@@ -1738,6 +1714,22 @@
    }
  }
  private UserDataCertificateException.Type getCertificateExceptionType(ApplicationTrustManager.Cause cause)
  {
    if (cause == ApplicationTrustManager.Cause.NOT_TRUSTED)
    {
      return UserDataCertificateException.Type.NOT_TRUSTED;
    }
    else if (cause == ApplicationTrustManager.Cause.HOST_NAME_MISMATCH)
    {
      return UserDataCertificateException.Type.HOST_NAME_MISMATCH;
    }
    else
    {
      return null;
    }
  }
  /**
   * Displays a dialog asking the user to accept a certificate if the user
   * accepts it, we update the trust manager and call again to the method that
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/UninstallerArgumentParser.java
@@ -102,7 +102,7 @@
  public void initializeGlobalArguments(OutputStream outStream)
  throws ArgumentException
  {
    LinkedHashSet<Argument> args = new LinkedHashSet<Argument>();
    LinkedHashSet<Argument> args = new LinkedHashSet<>();
    cliArg = CommonArguments.getCLI();
    args.add(cliArg);
@@ -175,8 +175,7 @@
      arg.setPropertyName(arg.getLongIdentifier());
    }
    ArrayList<Argument> defaultArgs =
      new ArrayList<Argument>(createGlobalArguments(outStream, alwaysSSL));
    ArrayList<Argument> defaultArgs = new ArrayList<>(createGlobalArguments(outStream, alwaysSSL));
    int index = defaultArgs.indexOf(secureArgsList.bindDnArg);
    if (index != -1)
    {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/ui/ConfirmUninstallPanel.java
@@ -64,8 +64,7 @@
  private Set<String> outsideDbs;
  private Set<String> outsideLogs;
  private HashMap<FieldName, JCheckBox> hmCbs =
    new HashMap<FieldName, JCheckBox>();
  private HashMap<FieldName, JCheckBox> hmCbs = new HashMap<>();
  /**
   * The constructor of this class.
@@ -86,7 +85,7 @@
    switch (fieldName)
    {
    case EXTERNAL_DB_DIRECTORIES:
      Set<String> s1 = new HashSet<String>();
      Set<String> s1 = new HashSet<>();
      if (outsideDbs.size() > 0
          && getCheckBox(FieldName.EXTERNAL_DB_DIRECTORIES).isSelected())
      {
@@ -95,7 +94,7 @@
      return s1;
    case EXTERNAL_LOG_FILES:
      Set<String> s2 = new HashSet<String>();
      Set<String> s2 = new HashSet<>();
      if (outsideLogs.size() > 0
          && getCheckBox(FieldName.EXTERNAL_LOG_FILES).isSelected())
      {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/ui/LoginDialog.java
@@ -492,7 +492,7 @@
            boolean pwdInvalid = false;
            String uid = tfUid.getText();
            ArrayList<LocalizableMessage> possibleCauses = new ArrayList<LocalizableMessage>();
            ArrayList<LocalizableMessage> possibleCauses = new ArrayList<>();
            if ("".equals(uid.trim()))
            {
              uidInvalid = true;
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/BuildInformation.java
@@ -64,7 +64,7 @@
  public static BuildInformation create(Installation installation)
          throws ApplicationException {
    BuildInformation bi = new BuildInformation();
    List<String> args = new ArrayList<String>();
    List<String> args = new ArrayList<>();
    args.add(Utils.getScriptPath(
        Utils.getPath(installation.getServerStartCommandFile())));
    args.add("-F"); // full verbose
@@ -258,7 +258,7 @@
    return bi;
  }
  private Map<String, String> values = new HashMap<String, String>();
  private Map<String, String> values = new HashMap<>();
  /**
   * Gets the name of this build.  This is the first line of the output
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/CliUserInteraction.java
@@ -75,7 +75,7 @@
  public Object confirm(LocalizableMessage summary, LocalizableMessage details, LocalizableMessage fineDetails,
                        LocalizableMessage title, MessageType type, LocalizableMessage[] options,
                        LocalizableMessage def, LocalizableMessage viewDetailsOption) {
    MenuBuilder<Integer> builder = new MenuBuilder<Integer>(this);
    MenuBuilder<Integer> builder = new MenuBuilder<>(this);
    LocalizableMessageBuilder b = new LocalizableMessageBuilder();
    b.append(summary);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/Configuration.java
@@ -255,7 +255,7 @@
  }
  private Set<String> getOutsidePaths(Set<String> paths) {
    Set<String> outsidePaths = new HashSet<String>();
    Set<String> outsidePaths = new HashSet<>();
    for (String path : paths) {
      File fullDbPath;
      File pathFile = new File(path);
@@ -342,7 +342,7 @@
  private Set<String> getConfigurationValues(String attrName)
          throws IOException
  {
    Set<String> set = new HashSet<String>();
    Set<String> set = new HashSet<>();
    attrName += ":";
    String lowerCaseContents = getLowerCaseContents();
    String contents = getContents();
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/CurrentInstallStatus.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.quicksetup;
@@ -72,7 +72,7 @@
    } else
    {
      Installation installation = Installation.getLocal();
      ArrayList<LocalizableMessage> msgs = new ArrayList<LocalizableMessage>();
      ArrayList<LocalizableMessage> msgs = new ArrayList<>();
      if (installation.getStatus().isServerRunning())
      {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/JavaArguments.java
@@ -192,7 +192,7 @@
    }
    else
    {
      ArrayList<LocalizableMessage> lines = new ArrayList<LocalizableMessage>();
      ArrayList<LocalizableMessage> lines = new ArrayList<>();
      if (javaArguments.getInitialMemory() != -1)
      {
        lines.add(INFO_INITIAL_MEMORY.get(javaArguments.getInitialMemory()));
@@ -238,7 +238,7 @@
   */
  public String getStringArguments()
  {
    ArrayList<String> l = new ArrayList<String>();
    ArrayList<String> l = new ArrayList<>();
    if (initialMemory != -1)
    {
      l.add(Utils.escapeCommandLineValue(
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ProgressUpdateListenerDelegate.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 *      Portions Copyright 2014-2015 ForgeRock AS
 */
package org.opends.quicksetup;
@@ -37,8 +37,7 @@
 */
public class ProgressUpdateListenerDelegate {
  private HashSet<ProgressUpdateListener> listeners =
          new HashSet<ProgressUpdateListener>();
  private HashSet<ProgressUpdateListener> listeners = new HashSet<>();
  /**
   * Creates a parameterized instance.
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/UserData.java
@@ -124,7 +124,7 @@
    forceOnError = true;
    verbose = false;
    LinkedList<String> baseDn = new LinkedList<String>();
    LinkedList<String> baseDn = new LinkedList<>();
    baseDn.add("dc=example,dc=com");
    NewSuffixOptions defaultNewSuffixOptions = NewSuffixOptions.createEmpty(baseDn);
    setNewSuffixOptions(defaultNewSuffixOptions);
@@ -162,8 +162,7 @@
    sec.setSslPort(getDefaultSslPort(defaultLdapPort));
    setSecurityOptions(sec);
    remoteWithNoReplicationPort =
      new HashMap<ServerDescriptor, AuthenticationData>();
    remoteWithNoReplicationPort = new HashMap<>();
    createDefaultJavaArguments();
  }
@@ -706,7 +705,7 @@
        {
          try
          {
            SortedMap<String, String> hostNames = new TreeMap<String, String>();
            SortedMap<String, String> hostNames = new TreeMap<>();
            Enumeration<NetworkInterface> i = NetworkInterface
                .getNetworkInterfaces();
            while (i.hasMoreElements())
@@ -821,13 +820,9 @@
   * AuthenticationData corresponding to the Replication Port chosen by the
   * user.
   */
  public Map<ServerDescriptor, AuthenticationData>
  getRemoteWithNoReplicationPort()
  public Map<ServerDescriptor, AuthenticationData> getRemoteWithNoReplicationPort()
  {
    Map<ServerDescriptor, AuthenticationData> copy =
      new HashMap<ServerDescriptor, AuthenticationData>();
    copy.putAll(remoteWithNoReplicationPort);
    return copy;
    return new HashMap<>(remoteWithNoReplicationPort);
  }
  /**
@@ -888,7 +883,7 @@
  private void createDefaultJavaArguments()
  {
    hmJavaArguments = new HashMap<String, JavaArguments>();
    hmJavaArguments = new HashMap<>();
    int maxMemoryMb = 256;
    int minMemoryMb = 128;
    final int maxMemoryBytes = maxMemoryMb * 1024 * 1024;
@@ -923,8 +918,7 @@
    controlPanelJavaArgument.setAdditionalArguments(new String[] {"-client"});
    hmJavaArguments.put("control-panel", controlPanelJavaArgument);
    hmDefaultJavaArguments =
      new HashMap<String, JavaArguments>(hmJavaArguments);
    hmDefaultJavaArguments = new HashMap<>(hmJavaArguments);
  }
  private String[] getClientScripts()
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ConfiguredDomain.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2015 ForgeRock AS.
 */
package org.opends.quicksetup.installer;
@@ -53,7 +54,7 @@
  {
    this.domainName = domainName;
    this.isCreated = isCreated;
    this.addedReplicationServers = new HashSet<String>();
    this.addedReplicationServers = new HashSet<>();
    this.addedReplicationServers.addAll(addedReplicationServers);
  }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ConfiguredReplication.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2015 ForgeRock AS.
 */
package org.opends.quicksetup.installer;
@@ -67,9 +68,9 @@
    this.synchProviderEnabled = synchProviderEnabled;
    this.replicationServerCreated = replicationServerCreated;
    this.secureReplicationEnabled = secureReplicationEnabled;
    this.newReplicationServers = new HashSet<String>();
    this.newReplicationServers = new HashSet<>();
    this.newReplicationServers.addAll(newReplicationServers);
    this.domainsConf = new HashSet<ConfiguredDomain>();
    this.domainsConf = new HashSet<>();
    this.domainsConf.addAll(domainsConf);
  }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java
@@ -153,7 +153,7 @@
    final File importLDIFPath = new File(binPath, isWindows() ? Installation.WINDOWS_IMPORT_LDIF
                                                              : Installation.UNIX_IMPORT_LDIF);
    final ArrayList<String> argList = new ArrayList<String>();
    final ArrayList<String> argList = new ArrayList<>();
    argList.add(Utils.getScriptPath(importLDIFPath.getAbsolutePath()));
    argList.addAll(Arrays.asList(args));
    logger.info(LocalizableMessage.raw("import-ldif arg list: " + argList));
@@ -387,12 +387,7 @@
      RootCfgClient root = mCtx.getRootConfiguration();
      BackendCfgClient backend = root.createBackend(backendType, backendName, null);
      backend.setEnabled(true);
      Set<DN> setBaseDNs = new HashSet<DN>();
      for (String baseDN : baseDNs)
      {
        setBaseDNs.add(DN.valueOf(baseDN));
      }
      backend.setBaseDN(setBaseDNs);
      backend.setBaseDN(toByteStrings(baseDNs));
      backend.setBackendId(backendName);
      backend.setWritabilityMode(BackendCfgDefn.WritabilityMode.ENABLED);
      backend.commit();
@@ -404,6 +399,16 @@
    }
  }
  private Set<DN> toByteStrings(Set<String> strings) throws DirectoryException
  {
    Set<DN> results = new HashSet<>();
    for (String s : strings)
    {
      results.add(DN.valueOf(s));
    }
    return results;
  }
  /**
   * Sets the base DNs on a given backend.
   * @param ctx the connection to the server.
@@ -425,12 +430,7 @@
          JNDIDirContextAdaptor.adapt(ctx));
      RootCfgClient root = mCtx.getRootConfiguration();
      BackendCfgClient backend = root.getBackend(backendName);
      Set<DN> setBaseDNs = new HashSet<DN>();
      for (String baseDN : baseDNs)
      {
        setBaseDNs.add(DN.valueOf(baseDN));
      }
      backend.setBaseDN(setBaseDNs);
      backend.setBaseDN(toByteStrings(baseDNs));
      backend.commit();
    }
    catch (Throwable t)
@@ -565,9 +565,9 @@
      Set<String> servers = replicationServer.getReplicationServer();
      if (servers == null)
      {
        servers = new HashSet<String>();
        servers = new HashSet<>();
      }
      Set<String> oldServers = new HashSet<String>(servers);
      Set<String> oldServers = new HashSet<>(servers);
      for (Set<String> rs : replicationServers.values())
      {
        servers.addAll(rs);
@@ -586,7 +586,7 @@
      {
        domainNames = new String[]{};
      }
      Set<ConfiguredDomain> domainsConf = new HashSet<ConfiguredDomain>();
      Set<ConfiguredDomain> domainsConf = new HashSet<>();
      ReplicationDomainCfgClient[] domains =
        new ReplicationDomainCfgClient[domainNames.length];
      for (int i=0; i<domains.length; i++)
@@ -626,7 +626,7 @@
        oldServers = domain.getReplicationServer();
        if (oldServers == null)
        {
          oldServers = new TreeSet<String>();
          oldServers = new TreeSet<>();
        }
        servers = replicationServers.get(dn);
        domain.setReplicationServer(servers);
@@ -654,7 +654,7 @@
  private Set<String> intersect(Set<String> set1, Set<String> set2)
  {
    Set<String> result = new TreeSet<String>(set1);
    Set<String> result = new TreeSet<>(set1);
    result.removeAll(set2);
    return result;
  }
@@ -908,7 +908,7 @@
    // Try to transform things if necessary.  The following map has as key
    // the original JavaArgument object and as value the 'transformed' JavaArgument.
    Map<JavaArguments, JavaArguments> hmJavaArguments = new HashMap<JavaArguments, JavaArguments>();
    Map<JavaArguments, JavaArguments> hmJavaArguments = new HashMap<>();
    for (String script : uData.getScriptNamesForJavaArguments())
    {
      JavaArguments origJavaArguments = uData.getJavaArguments(script);
@@ -931,8 +931,8 @@
    }
    Properties fileProperties = getJavaPropertiesFileContents(getPropertiesFileName(installPath));
    Map<String, JavaArguments> args = new HashMap<String, JavaArguments>();
    Map<String, String> otherProperties = new HashMap<String, String>();
    Map<String, JavaArguments> args = new HashMap<>();
    Map<String, String> otherProperties = new HashMap<>();
    for (String script : uData.getScriptNamesForJavaArguments())
    {
@@ -1048,7 +1048,7 @@
  private List<String> getJavaPropertiesFileComments(String propertiesFile) throws IOException
  {
    ArrayList<String> commentLines = new ArrayList<String>();
    ArrayList<String> commentLines = new ArrayList<>();
    BufferedReader reader = new BufferedReader(new FileReader(propertiesFile));
    String line;
    while ((line = reader.readLine()) != null)
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/NewSuffixOptions.java
@@ -61,9 +61,9 @@
  private Type type;
  private List<String> baseDns = new LinkedList<String>();
  private List<String> baseDns = new LinkedList<>();
  private List<String> ldifPaths = new LinkedList<String>();
  private List<String> ldifPaths = new LinkedList<>();
  private String rejectedFile;
  private String skippedFile;
@@ -154,7 +154,7 @@
   */
  public LinkedList<String> getLDIFPaths()
  {
    return new LinkedList<String>(ldifPaths);
    return new LinkedList<>(ldifPaths);
  }
  /**
@@ -198,7 +198,7 @@
   */
  public LinkedList<String> getBaseDns()
  {
    return new LinkedList<String>(baseDns);
    return new LinkedList<>(baseDns);
  }
  /**
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/offline/OfflineInstaller.java
@@ -70,18 +70,15 @@
 */
public class OfflineInstaller extends Installer
{
  /** This map contains the ratio associated with each step. */
  private final Map<ProgressStep, Integer> hmRatio =
      new HashMap<ProgressStep, Integer>();
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** This map contains the ratio associated with each step. */
  private final Map<ProgressStep, Integer> hmRatio = new HashMap<>();
  /** This map contains the summary associated with each step. */
  private final Map<ProgressStep, LocalizableMessage> hmSummary =
      new HashMap<ProgressStep, LocalizableMessage>();
  private final Map<ProgressStep, LocalizableMessage> hmSummary = new HashMap<>();
  private ApplicationException runError;
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /**
   * Actually performs the install in this thread.  The thread is blocked.
   */
@@ -449,8 +446,7 @@
     * extracting, the value for downloading will be the double of the value for
     * extracting.
     */
    Map<ProgressStep, Integer> hmTime =
        new HashMap<ProgressStep, Integer>();
    Map<ProgressStep, Integer> hmTime = new HashMap<>();
    hmTime.put(InstallProgressStep.CONFIGURING_SERVER, 5);
    hmTime.put(InstallProgressStep.CREATING_BASE_ENTRY, 10);
    hmTime.put(InstallProgressStep.IMPORTING_LDIF, 20);
@@ -463,8 +459,7 @@
    hmTime.put(InstallProgressStep.INITIALIZE_REPLICATED_SUFFIXES, 25);
    int totalTime = 0;
    List<InstallProgressStep> steps =
        new ArrayList<InstallProgressStep>();
    List<InstallProgressStep> steps = new ArrayList<>();
    totalTime += hmTime.get(InstallProgressStep.CONFIGURING_SERVER);
    steps.add(InstallProgressStep.CONFIGURING_SERVER);
    if (createNotReplicatedSuffix())
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/DataOptionsPanel.java
@@ -68,21 +68,16 @@
 */
public class DataOptionsPanel extends QuickSetupStepPanel
{
  private Component lastFocusComponent;
  private static final long serialVersionUID = 1815782841921928118L;
  private Component lastFocusComponent;
  private UserData defaultUserData;
  private HashMap<FieldName, JLabel> hmLabels = new HashMap<FieldName, JLabel>();
  private HashMap<FieldName, JTextComponent> hmFields = new HashMap<FieldName, JTextComponent>();
  private HashMap<NewSuffixOptions.Type, JRadioButton> hmRadioButtons =
      new HashMap<NewSuffixOptions.Type, JRadioButton>();
  private HashMap<FieldName, JLabel> hmLabels = new HashMap<>();
  private HashMap<FieldName, JTextComponent> hmFields = new HashMap<>();
  private HashMap<NewSuffixOptions.Type, JRadioButton> hmRadioButtons = new HashMap<>();
  private JButton ldifBrowseButton;
  private JComboBox<BackendTypeUIAdapter> backendTypeComboBox;
  /**
@@ -400,7 +395,7 @@
  /** Creates the components and populates the Maps with them. */
  private void populateComponentMaps()
  {
    final HashMap<FieldName, LabelFieldDescriptor> hm = new HashMap<FieldName, LabelFieldDescriptor>();
    final HashMap<FieldName, LabelFieldDescriptor> hm = new HashMap<>();
    final LabelFieldDescriptor baseDNLabelDescriptor = new LabelFieldDescriptor(
        INFO_BASE_DN_LABEL.get(), INFO_BASE_DN_TOOLTIP.get(), LabelFieldDescriptor.FieldType.TEXTFIELD,
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/DataReplicationPanel.java
@@ -73,10 +73,8 @@
  private JRadioButton rbReplicated;
  private JCheckBox cbSecureReplication;
  private JCheckBox cbTopologyExists;
  private HashMap<FieldName, JLabel> hmLabels =
    new HashMap<FieldName, JLabel>();
  private HashMap<FieldName, JTextComponent> hmFields =
    new HashMap<FieldName, JTextComponent>();
  private HashMap<FieldName, JLabel> hmLabels = new HashMap<>();
  private HashMap<FieldName, JTextComponent> hmFields = new HashMap<>();
  /**
   * Constructor of the panel.
@@ -372,8 +370,7 @@
   */
  private void populateComponentMaps()
  {
    HashMap<FieldName, LabelFieldDescriptor> hm =
        new HashMap<FieldName, LabelFieldDescriptor>();
    HashMap<FieldName, LabelFieldDescriptor> hm = new HashMap<>();
    hm.put(FieldName.REPLICATION_PORT, new LabelFieldDescriptor(
        INFO_REPLICATION_PORT_LABEL.get(),
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/GlobalAdministratorPanel.java
@@ -60,11 +60,8 @@
  private Component lastFocusComponent;
  private HashMap<FieldName, JLabel> hmLabels =
      new HashMap<FieldName, JLabel>();
  private HashMap<FieldName, JTextComponent> hmFields =
      new HashMap<FieldName, JTextComponent>();
  private HashMap<FieldName, JLabel> hmLabels = new HashMap<>();
  private HashMap<FieldName, JTextComponent> hmFields = new HashMap<>();
  /**
   * Constructor of the panel.
@@ -229,8 +226,7 @@
   */
  private void populateLabelAndFieldMaps()
  {
    HashMap<FieldName, LabelFieldDescriptor> hm =
        new HashMap<FieldName, LabelFieldDescriptor>();
    HashMap<FieldName, LabelFieldDescriptor> hm = new HashMap<>();
    hm.put(FieldName.GLOBAL_ADMINISTRATOR_UID, new LabelFieldDescriptor(
        INFO_GLOBAL_ADMINISTRATOR_UID_LABEL.get(),
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/InstallReviewPanel.java
@@ -84,8 +84,8 @@
  private final boolean displayServerLocation;
  private final HashMap<FieldName, JLabel> hmLabels = new HashMap<FieldName, JLabel>();
  private final HashMap<FieldName, JTextComponent> hmFields = new HashMap<FieldName, JTextComponent>();
  private final HashMap<FieldName, JLabel> hmLabels = new HashMap<>();
  private final HashMap<FieldName, JTextComponent> hmFields = new HashMap<>();
  private JPanel bottomComponent;
  private JCheckBox startCheckBox;
  private JCheckBox enableWindowsServiceCheckBox;
@@ -276,7 +276,7 @@
  /** Create the components and populate the Maps. */
  private void populateLabelAndFieldsMap()
  {
    final HashMap<FieldName, LabelFieldDescriptor> hm = new HashMap<FieldName, LabelFieldDescriptor>();
    final HashMap<FieldName, LabelFieldDescriptor> hm = new HashMap<>();
    if (displayServerLocation)
    {
@@ -390,7 +390,7 @@
      }
      buf.append(s);
      final TreeSet<LocalizableMessage> remoteServerLines = new TreeSet<LocalizableMessage>();
      final TreeSet<LocalizableMessage> remoteServerLines = new TreeSet<>();
      for (final ServerDescriptor server : remotePorts.keySet())
      {
        String serverDisplay;
@@ -505,7 +505,7 @@
    panel.setOpaque(false);
    final GridBagConstraints gbc = new GridBagConstraints();
    final List<FieldName> fieldNames = new LinkedList<FieldName>();
    final List<FieldName> fieldNames = new LinkedList<>();
    if (displayServerLocation)
    {
      fieldNames.add(FieldName.SERVER_LOCATION);
@@ -759,7 +759,7 @@
    final StringBuilder sb = new StringBuilder();
    final JavaArguments serverArguments = userData.getJavaArguments(UserData.SERVER_SCRIPT_NAME);
    final JavaArguments importArguments = userData.getJavaArguments(UserData.IMPORT_SCRIPT_NAME);
    final List<String> linesToAdd = new ArrayList<String>();
    final List<String> linesToAdd = new ArrayList<>();
    final boolean defaultServer =
        userData.getDefaultJavaArguments(UserData.SERVER_SCRIPT_NAME).equals(serverArguments);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/JavaArgumentsDialog.java
@@ -191,25 +191,21 @@
  private String[] getOtherArguments()
  {
    String sArgs = this.tfOtherArguments.getText().trim();
    if (sArgs.length() > 0)
    {
      String[] args = sArgs.split(" ");
      ArrayList<String> array = new ArrayList<String>();
      for (String arg : args)
      {
        if (arg.length() > 0)
        {
          array.add(arg);
        }
      }
      String[] fArgs = new String[array.size()];
      array.toArray(fArgs);
      return fArgs;
    }
    else
    if (sArgs.length() <= 0)
    {
      return new String[]{};
    }
    String[] args = sArgs.split(" ");
    ArrayList<String> array = new ArrayList<>();
    for (String arg : args)
    {
      if (arg.length() > 0)
      {
        array.add(arg);
      }
    }
    return array.toArray(new String[array.size()]);
  }
  /**
@@ -473,7 +469,7 @@
        setValidLater(lOtherArguments, true);
        int initialMemory = -1;
        int maxMemory = -1;
        ArrayList<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>();
        ArrayList<LocalizableMessage> errorMsgs = new ArrayList<>();
        try
        {
          String sInitialMemory = tfInitialMemory.getText().trim();
@@ -523,14 +519,14 @@
        if (errorMsgs.isEmpty())
        {
          // Try the options together, often there are interdependencies.
          ArrayList<LocalizableMessage> allErrors = new ArrayList<LocalizableMessage>();
          ArrayList<LocalizableMessage> allErrors = new ArrayList<>();
          checkAllArgumentsTogether(initialMemory, maxMemory, allErrors);
          if (!allErrors.isEmpty())
          {
            ArrayList<LocalizableMessage> memoryErrors = new ArrayList<LocalizableMessage>();
            ArrayList<LocalizableMessage> memoryErrors = new ArrayList<>();
            checkMemoryArguments(initialMemory, maxMemory, memoryErrors);
            ArrayList<LocalizableMessage> otherErrors = new ArrayList<LocalizableMessage>();
            ArrayList<LocalizableMessage> otherErrors = new ArrayList<>();
            checkOtherArguments(otherErrors);
            if (!memoryErrors.isEmpty())
@@ -841,7 +837,7 @@
    setValidLater(lInitialMemory, true);
    setValidLater(lMaxMemory, true);
    setValidLater(lOtherArguments, true);
    ArrayList<JLabel> ls = new ArrayList<JLabel>();
    ArrayList<JLabel> ls = new ArrayList<>();
    StringBuilder sb = new StringBuilder();
    if (initialMemory != -1)
@@ -891,7 +887,7 @@
  private void checkOtherArguments(Collection<LocalizableMessage> errorMsgs)
  {
    setValidLater(lOtherArguments, true);
    ArrayList<JLabel> ls = new ArrayList<JLabel>();
    ArrayList<JLabel> ls = new ArrayList<>();
    StringBuilder sb = new StringBuilder();
    String[] otherArgs = getOtherArguments();
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/RemoteReplicationPortsPanel.java
@@ -67,20 +67,13 @@
{
  private static final long serialVersionUID = -3742350600617826375L;
  private Component lastFocusComponent;
  private HashMap<String, JLabel> hmLabels =
    new HashMap<String, JLabel>();
  private HashMap<String, JTextComponent> hmFields =
    new HashMap<String, JTextComponent>();
  private HashMap<String, JCheckBox> hmCbs =
    new HashMap<String, JCheckBox>();
  private HashMap<String, JLabel> hmLabels = new HashMap<>();
  private HashMap<String, JTextComponent> hmFields = new HashMap<>();
  private HashMap<String, JCheckBox> hmCbs = new HashMap<>();
  private JScrollPane scroll;
  private JPanel fieldsPanel;
  private TreeSet<ServerDescriptor> orderedServers =
    new TreeSet<ServerDescriptor>(this);
  /**
   *The display of the server the user provided in the replication options
   * panel.
   */
  private TreeSet<ServerDescriptor> orderedServers = new TreeSet<>(this);
  /** The display of the server the user provided in the replication options panel. */
  private String serverToConnectDisplay;
  /**
@@ -100,7 +93,7 @@
    if (fieldName == FieldName.REMOTE_REPLICATION_PORT)
    {
      Map<String, String> hm = new HashMap<String, String>();
      Map<String, String> hm = new HashMap<>();
      for (String id : hmFields.keySet())
      {
        hm.put(id, hmFields.get(id).getText());
@@ -109,7 +102,7 @@
    }
    else if (fieldName == FieldName.REMOTE_REPLICATION_SECURE)
    {
      Map<String, Boolean> hm = new HashMap<String, Boolean>();
      Map<String, Boolean> hm = new HashMap<>();
      for (String id : hmCbs.keySet())
      {
        hm.put(id, hmCbs.get(id).isSelected());
@@ -237,13 +230,12 @@
        }
      };
      lastFocusComponent = null;
      HashMap<String, String> hmOldValues = new HashMap<String, String>();
      HashMap<String, String> hmOldValues = new HashMap<>();
      for (String id : hmFields.keySet())
      {
        hmOldValues.put(id, hmFields.get(id).getText());
      }
      HashMap<String, Boolean> hmOldSecureValues =
        new HashMap<String, Boolean>();
      HashMap<String, Boolean> hmOldSecureValues = new HashMap<>();
      for (String id : hmCbs.keySet())
      {
        hmOldSecureValues.put(id, hmCbs.get(id).isSelected());
@@ -348,14 +340,10 @@
    addVerticalGlue(fieldsPanel);
  }
  private TreeSet<ServerDescriptor> orderServers(
  Set<ServerDescriptor> servers)
  private TreeSet<ServerDescriptor> orderServers(Set<ServerDescriptor> servers)
  {
    TreeSet<ServerDescriptor> ordered = new TreeSet<ServerDescriptor>(this);
    TreeSet<ServerDescriptor> ordered = new TreeSet<>(this);
    ordered.addAll(servers);
    return ordered;
  }
}
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/SecurityOptionsDialog.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2013-2014 ForgeRock AS
 *      Portions Copyright 2013-2015 ForgeRock AS
 */
@@ -673,7 +673,7 @@
      @Override
      public ArrayList<LocalizableMessage> processBackgroundTask()
      {
        ArrayList<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>();
        ArrayList<LocalizableMessage> errorMsgs = new ArrayList<>();
        errorMsgs.addAll(checkPort());
        errorMsgs.addAll(checkKeystore());
        return errorMsgs;
@@ -895,7 +895,7 @@
   */
  private ArrayList<LocalizableMessage> checkPort()
  {
    ArrayList<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>();
    ArrayList<LocalizableMessage> errorMsgs = new ArrayList<>();
    if (cbEnableSSL.isSelected())
    {
@@ -940,7 +940,7 @@
   */
  private ArrayList<LocalizableMessage> checkKeystore()
  {
    ArrayList<LocalizableMessage> errorMsgs = new ArrayList<LocalizableMessage>();
    ArrayList<LocalizableMessage> errorMsgs = new ArrayList<>();
    boolean pathValid = true;
    boolean pwdValid = true;
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/SelectAliasDialog.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.quicksetup.installer.ui;
@@ -105,7 +105,7 @@
          "The provided aliases are null or empty.");
    }
    isCanceled = true;
    TreeSet<String> s = new TreeSet<String>();
    TreeSet<String> s = new TreeSet<>();
    Collections.addAll(s, aliases);
    String[] orderedAliases = new String[s.size()];
    s.toArray(orderedAliases);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/ui/ServerSettingsPanel.java
@@ -67,27 +67,19 @@
  private UserData defaultUserData;
  private Component lastFocusComponent;
  private JLabel lSecurity;
  private JButton secureAccessButton;
  private JButton browseButton;
  private boolean displayServerLocation;
  private boolean canUpdateSecurity;
  private SecurityOptions securityOptions;
  private HashMap<FieldName, JLabel> hmLabels =
      new HashMap<FieldName, JLabel>();
  private HashMap<FieldName, JTextComponent> hmFields =
      new HashMap<FieldName, JTextComponent>();
  private HashMap<FieldName, JLabel> hmLabels = new HashMap<>();
  private HashMap<FieldName, JTextComponent> hmFields = new HashMap<>();
  private JTextComponent tfServerLocationParent;
  private JTextComponent tfServerLocationRelativePath;
  private JLabel lServerLocation;
@@ -438,8 +430,7 @@
   */
  private void populateLabelAndFieldMaps()
  {
    HashMap<FieldName, LabelFieldDescriptor> hm =
        new HashMap<FieldName, LabelFieldDescriptor>();
    HashMap<FieldName, LabelFieldDescriptor> hm = new HashMap<>();
    hm.put(FieldName.HOST_NAME, new LabelFieldDescriptor(
        INFO_HOST_NAME_LABEL.get(),
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/webstart/WebStartInstaller.java
@@ -79,14 +79,10 @@
 * will send a ProgressUpdateEvent.
 *
 * This class is supposed to be fully independent of the graphical layout.
 *
 */
public class WebStartInstaller extends Installer {
  private final Map<ProgressStep, Integer> hmRatio =
      new HashMap<ProgressStep, Integer>();
  private final Map<ProgressStep, LocalizableMessage> hmSummary =
      new HashMap<ProgressStep, LocalizableMessage>();
  private final Map<ProgressStep, Integer> hmRatio = new HashMap<>();
  private final Map<ProgressStep, LocalizableMessage> hmSummary = new HashMap<>();
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
@@ -99,10 +95,7 @@
    setCurrentProgressStep(InstallProgressStep.NOT_STARTED);
  }
  /**
   * Actually performs the install in this thread.  The thread is blocked.
   *
   */
  /** Actually performs the install in this thread.  The thread is blocked. */
  @Override
  public void run()
  {
@@ -368,8 +361,7 @@
     * extracting, the value for downloading will be the double of the value for
     * extracting.
     */
    Map<ProgressStep, Integer> hmTime =
        new HashMap<ProgressStep, Integer>();
    Map<ProgressStep, Integer> hmTime = new HashMap<>();
    hmTime.put(InstallProgressStep.DOWNLOADING, 30);
    hmTime.put(InstallProgressStep.EXTRACTING, 15);
    hmTime.put(InstallProgressStep.CONFIGURING_SERVER, 5);
@@ -384,8 +376,7 @@
    hmTime.put(InstallProgressStep.INITIALIZE_REPLICATED_SUFFIXES, 25);
    int totalTime = 0;
    List<InstallProgressStep> steps =
        new ArrayList<InstallProgressStep>();
    List<InstallProgressStep> steps = new ArrayList<>();
    totalTime += hmTime.get(InstallProgressStep.DOWNLOADING);
    steps.add(InstallProgressStep.DOWNLOADING);
    totalTime += hmTime.get(InstallProgressStep.EXTRACTING);
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/ButtonsPanel.java
@@ -51,23 +51,17 @@
{
  private static final long serialVersionUID = -8460400337486357976L;
  private HashSet<ButtonActionListener> buttonListeners =
      new HashSet<ButtonActionListener>();
  private HashSet<ButtonActionListener> buttonListeners = new HashSet<>();
  private JButton nextButton;
  private JButton previousButton;
  private JButton quitButton;
  private JButton closeButton;
  private JButton finishButton;
  /**
   * Default constructor.
   * @param application Application running in QuickSetup
   *
   */
  public ButtonsPanel(GuiApplication application)
  {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/CertificateDialog.java
@@ -409,7 +409,7 @@
              INFO_CERTIFICATE_CHAIN_COMBO_TOOLTIP.get().toString());
      final CardLayout cl = new CardLayout();
      final JPanel cardPanel = new JPanel(cl);
      final Map<String, JPanel> hmPanels = new HashMap<String, JPanel>();
      final Map<String, JPanel> hmPanels = new HashMap<>();
      LocalizableMessage[] labels =
      {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/CurrentStepPanel.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 *      Portions Copyright 2013 ForgeRock AS.
 *      Portions Copyright 2013-2015 ForgeRock AS.
 */
package org.opends.quicksetup.ui;
@@ -59,8 +59,7 @@
  private static final String LOADING_PANEL = "loading";
  private Map<WizardStep, QuickSetupStepPanel> hmPanels =
      new HashMap<WizardStep, QuickSetupStepPanel>();
  private Map<WizardStep, QuickSetupStepPanel> hmPanels = new HashMap<>();
  /**
   * The constructor of this class.
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/CustomHTMLEditorKit.java
@@ -44,7 +44,7 @@
 */
public class CustomHTMLEditorKit extends HTMLEditorKit
{
  private HashSet<ActionListener> listeners = new HashSet<ActionListener>();
  private HashSet<ActionListener> listeners = new HashSet<>();
  private static final long serialVersionUID = 298103926252426388L;
  /**
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/GuiApplication.java
@@ -273,7 +273,7 @@
   */
  public LinkedHashSet<WizardStep> getOrderedSteps()
  {
    LinkedHashSet<WizardStep> orderedSteps = new LinkedHashSet<WizardStep>();
    LinkedHashSet<WizardStep> orderedSteps = new LinkedHashSet<>();
    WizardStep step = getFirstWizardStep();
    orderedSteps.add(step);
    while (null != (step = getNextWizardStep(step))) {
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/QuickSetupDialog.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 *      Portions Copyright 2013-2014 ForgeRock AS.
 *      Portions Copyright 2013-2015 ForgeRock AS.
 */
package org.opends.quicksetup.ui;
@@ -61,23 +61,17 @@
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  private JFrame frame;
  private QuickSetupErrorPanel installedPanel;
  private JPanel framePanel;
  private StepsPanel stepsPanel;
  private CurrentStepPanel currentStepPanel;
  private ButtonsPanel buttonsPanel;
  private WizardStep displayedStep;
  private CurrentInstallStatus installStatus;
  private HashSet<ButtonActionListener> buttonListeners =
      new HashSet<ButtonActionListener>();
  private HashSet<ButtonActionListener> buttonListeners = new HashSet<>();
  private GuiApplication application;
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/QuickSetupErrorPanel.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 *      Portions Copyright 2014-2015 ForgeRock AS
 */
package org.opends.quicksetup.ui;
@@ -55,8 +55,7 @@
{
  private static final long serialVersionUID = 1765037717593522233L;
  private HashSet<ButtonActionListener> buttonListeners =
      new HashSet<ButtonActionListener>();
  private HashSet<ButtonActionListener> buttonListeners = new HashSet<>();
  private JButton quitButton;
  private JButton continueButton;
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/QuickSetupStepPanel.java
@@ -66,8 +66,7 @@
  private JPanel inputContainer;
  private Component inputPanel;
  private HashSet<ButtonActionListener> buttonListeners =
    new HashSet<ButtonActionListener>();
  private HashSet<ButtonActionListener> buttonListeners = new HashSet<>();
  private ProgressMessageFormatter formatter;
@@ -80,8 +79,7 @@
   * We can use a HashMap (not multi-thread safe) because all
   * the calls to this object are done in the event-thread.
  */
  private HashMap<String, URLWorker> hmURLWorkers =
      new HashMap<String, URLWorker>();
  private HashMap<String, URLWorker> hmURLWorkers = new HashMap<>();
  /**
   * Creates a default instance.
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/StepsPanel.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 *      Portions Copyright 2014-2015 ForgeRock AS
 */
package org.opends.quicksetup.ui;
@@ -53,11 +53,9 @@
{
  private static final long serialVersionUID = -2003945907121690657L;
  HashMap<WizardStep, JLabel> hmLabels = new HashMap<WizardStep, JLabel>();
  HashMap<WizardStep, JLabel> hmIcons = new HashMap<WizardStep, JLabel>();
  HashMap<WizardStep, JPanel> hmSubPanels = new HashMap<WizardStep, JPanel>();
  HashMap<WizardStep, JLabel> hmLabels = new HashMap<>();
  HashMap<WizardStep, JLabel> hmIcons = new HashMap<>();
  HashMap<WizardStep, JPanel> hmSubPanels = new HashMap<>();
  /**
   * Creates a StepsPanel.
@@ -133,7 +131,7 @@
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.anchor = GridBagConstraints.WEST;
    HashMap<WizardStep, LocalizableMessage> hmText = new HashMap<WizardStep, LocalizableMessage>();
    HashMap<WizardStep, LocalizableMessage> hmText = new HashMap<>();
    LinkedHashSet<WizardStep> orderedSteps = app.getOrderedSteps();
    boolean first = true;
    for (WizardStep s : orderedSteps)
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/ui/UIFactory.java
@@ -779,7 +779,7 @@
   */
  public static <T> JList<T> makeJList(TextStyle textStyle)
  {
    final JList<T> list = new JList<T>();
    final JList<T> list = new JList<>();
    list.setCellRenderer(makeCellRenderer(textStyle));
    return list;
  }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/util/BackgroundTask.java
@@ -22,6 +22,7 @@
 *
 *
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2015 ForgeRock AS.
 */
package org.opends.quicksetup.util;
@@ -42,7 +43,7 @@
   */
  public final void startBackgroundTask()
  {
    BackgroundTaskThread<T> taskThread = new BackgroundTaskThread<T>(this);
    BackgroundTaskThread<T> taskThread = new BackgroundTaskThread<>(this);
    taskThread.start();
  }
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/quicksetup/util/ServerController.java
@@ -148,7 +148,7 @@
      }
      logger.info(LocalizableMessage.raw("stopping server"));
      ArrayList<String> argList = new ArrayList<String>();
      ArrayList<String> argList = new ArrayList<>();
      argList.add(Utils.getScriptPath(
          Utils.getPath(installation.getServerStopCommandFile())));
      int size = argList.size();
@@ -343,7 +343,7 @@
      }
      logger.info(LocalizableMessage.raw("starting server"));
      ArrayList<String> argList = new ArrayList<String>();
      ArrayList<String> argList = new ArrayList<>();
      argList.add(Utils.getScriptPath(
          Utils.getPath(installation.getServerStartCommandFile())));
      argList.add("--timeout");