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

Mark Craig
11.07.2013 7082db353f7e81f6aef01a8c820cd0299b05ef90
opendj3/src/main/docbkx/dev-guide/chap-ldif.xml
@@ -20,7 +20,7 @@
  !
  ! CCPL HEADER END
  !
  !      Copyright 2011-2012 ForgeRock AS
  !      Copyright 2011-2013 ForgeRock AS
  !
-->
<chapter xml:id='chap-ldif'
@@ -180,32 +180,6 @@
  directory server.</para>
  <programlisting language="java"
  >final LDIFChangeRecordReader reader = new LDIFChangeRecordReader(ldif);
final LDAPConnectionFactory factory = new LDAPConnectionFactory(host, port);
Connection connection = null;
try {
    connection = factory.getConnection();
    connection.bind(userDN, password.toCharArray());
    final ConnectionChangeRecordWriter writer =
            new ConnectionChangeRecordWriter(connection);
    while (reader.hasNext()) {
        ChangeRecord changeRecord = reader.readChangeRecord();
        writer.writeChangeRecord(changeRecord);
    }
} catch (final ErrorResultException e) {
    System.err.println(e.getMessage());
    System.exit(e.getResult().getResultCode().intValue());
    return;
} catch (final IOException e) {
    System.err.println(e.getMessage());
    System.exit(ResultCode.CLIENT_SIDE_LOCAL_ERROR.intValue());
    return;
} finally {
    if (connection != null) {
        connection.close();
    }
}</programlisting>
  >[jcp:org.forgerock.opendj.examples.Modify:--- JCite ---]</programlisting>
 </section>
</chapter>