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

Gaetan Boismal
16.10.2015 24568b267fe8e4bb656994cc02291cc8248e067d
OPENDJ-1714 Code cleanup

Fix copyright and code cleanup on r12098 (Thanks to Matt and Jean-Noël for the review)
1 files modified
19 ■■■■ changed files
opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPManagementContext.java 19 ●●●● patch | view | raw | blame | history
opendj-config/src/main/java/org/forgerock/opendj/config/client/ldap/LDAPManagementContext.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions copyright 2014 ForgeRock AS.
 *      Portions copyright 2014-2015 ForgeRock AS.
 */
package org.forgerock.opendj.config.client.ldap;
@@ -85,14 +85,14 @@
     * @param profile
     *            The LDAP profile
     * @param exceptions
     *            Contains {@code IOException} that may occurred during
     *            management context close. Could be {@code null}
     *            Contains {@code IOException} that may occurred during management context close.
     *            Could be {@code null}
     * @return A LDIF file management context
     * @throws IOException
     *             If problems occurs while reading the file.
     */
    public static ManagementContext newLDIFManagementContext(
        final File ldifFile, final LDAPProfile profile, final List<IOException> exceptions) throws IOException {
    public static ManagementContext newLDIFManagementContext(final File ldifFile, final LDAPProfile profile,
            final List<IOException> exceptions) throws IOException {
        final BufferedReader configReader = new BufferedReader(new FileReader(ldifFile));
        try {
            final MemoryBackend memoryBackend = new MemoryBackend(new LDIFEntryReader(configReader));
@@ -113,7 +113,7 @@
                            exceptions.add(e);
                        } else {
                            logger.error(LocalizableMessage.raw(
                                "IOException occured during LDIF context management close:" + e));
                                    "IOException occured during LDIF context management close:", e));
                        }
                    }
                }
@@ -124,8 +124,7 @@
                }
            };
            // We need to add the root dse entry to make the configuration
            // framework work.
            // We need to add the root dse entry to make the configuration framework work.
            co.add(LDIFEntryReader.valueOfLDIFEntry("dn:", "objectClass:top", "objectClass:ds-root-dse"));
            return LDAPManagementContext.newManagementContext(co, LDAPProfile.getInstance());
        } finally {
@@ -144,8 +143,8 @@
     * @throws IOException
     *             If problems occurs while reading the file.
     */
    public static ManagementContext newLDIFManagementContext(
        final File ldifFile, final LDAPProfile profile) throws IOException {
    public static ManagementContext newLDIFManagementContext(final File ldifFile, final LDAPProfile profile)
            throws IOException {
        return newLDIFManagementContext(ldifFile, profile, null);
    }