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

Jean-Noël Rouvignac
07.07.2016 0eaad3dd7b7aca8d209a5fd92c9e5e970eeca5b9
Remove unused parameters.
Other code cleanups.
Reset the clirr api changes against 3.0.0-SNAPSHOT (waiting for 3.0.0)
16 files modified
818 ■■■■■ changed files
opendj-sdk/opendj-core/clirr-ignored-api-changes.xml 548 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/pom.xml 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/DN.java 16 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/InternalConnection.java 27 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/RDN.java 23 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/RootDSE.java 17 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleUse.java 18 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NameForm.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaBuilder.java 28 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/spi/LdapPromises.java 39 ●●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/HeartBeatConnectionFactoryTestCase.java 2 ●●● patch | view | raw | blame | history
opendj-sdk/opendj-grizzly/src/main/java/org/forgerock/opendj/grizzly/GrizzlyLDAPConnection.java 14 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/UpdateGroupAsync.java 14 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/AddRate.java 14 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/LDAPSearch.java 31 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-ldap-toolkit/src/test/java/com/forgerock/opendj/ldap/tools/LDAPSearchITCase.java 18 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-core/clirr-ignored-api-changes.xml
@@ -21,8 +21,7 @@
  !
  ! CDDL HEADER END
  !
  !      Copyright 2014-2015 ForgeRock AS
  !
  !      Copyright 2014-2016 ForgeRock AS
-->
<differences>
<!--
@@ -42,549 +41,4 @@
Note: waiting on https://jira.codehaus.org/browse/MCLIRR-62 to be resolved to avoid the need to use \s* in the '<to>' tags.
-->
  <difference>
    <className>org/forgerock/opendj/ldap/LDAPConnectionFactory</className>
    <differenceType>7002</differenceType>
    <method>LDAPConnectionFactory(java.net.SocketAddress)</method>
    <justification>Moving from inetSocketAddress to host+port constructors</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/LDAPConnectionFactory</className>
    <differenceType>7002</differenceType>
    <method>LDAPConnectionFactory(java.net.SocketAddress, org.forgerock.opendj.ldap.LDAPOptions)</method>
    <justification>Moving from inetSocketAddress to host+port constructors</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/LDAPConnectionFactory</className>
    <differenceType>7002</differenceType>
    <method>java.net.InetAddress getAddress()</method>
    <justification>Moving from inetSocketAddress to host+port constructors</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/LDAPConnectionFactory</className>
    <differenceType>7002</differenceType>
    <method>java.net.SocketAddress getSocketAddress()</method>
    <justification>Moving from inetSocketAddress to host+port constructors</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/CoreMessages</className>
    <differenceType>8001</differenceType>
    <justification>Incorrectly reported because it is automatically generated</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/Connections</className>
    <differenceType>7005</differenceType>
    <method>%regex[org\.forgerock\.opendj\.ldap\.ConnectionFactory newHeartBeatConnectionFactory\(org\.forgerock\.opendj\.ldap\.ConnectionFactory, long, java\.util\.concurrent\.TimeUnit, org\.forgerock\.opendj\.ldap\.requests\.SearchRequest(, java\.util\.concurrent\.ScheduledExecutorService)?\)]</method>
    <to>%regex[org\.forgerock\.opendj\.ldap\.ConnectionFactory newHeartBeatConnectionFactory\(org\.forgerock\.opendj\.ldap\.ConnectionFactory,\s*long,\s*long,\s*java\.util\.concurrent\.TimeUnit(,\s*org\.forgerock\.opendj\.ldap\.requests\.SearchRequest(,\s*java\.util\.concurrent\.ScheduledExecutorService)?)?\)]</to>
    <justification>OPENDJ-1058: Added a timeout parameter to actively shutdown dead connections</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/Connections</className>
    <differenceType>7004</differenceType>
    <method>org.forgerock.opendj.ldap.ConnectionFactory newHeartBeatConnectionFactory(org.forgerock.opendj.ldap.ConnectionFactory, long, java.util.concurrent.TimeUnit)</method>
    <justification>OPENDJ-1058: Added a timeout parameter to actively shutdown dead connections</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ErrorResultException</className>
    <differenceType>7005</differenceType>
    <method>%regex[org\.forgerock\.opendj\.ldap\.ErrorResultException newErrorResult\(org\.forgerock\.opendj\.ldap\.ResultCode, java\.lang\.String(, java\.lang\.Throwable)?\)]</method>
    <to>%regex[org\.forgerock\.opendj\.ldap\.ErrorResultException newErrorResult\(org\.forgerock\.opendj\.ldap\.ResultCode, java\.lang\.CharSequence(, java\.lang\.Throwable)?\)]</to>
    <justification>OPENDJ-1058: Broadened the API by accepting java.lang.CharSequence while retaining source compatibility</justification>
  </difference>
  <difference>
    <className>%regex[org/forgerock/opendj/ldap/(LDAPConnectionFactory|LDAPListener)]</className>
    <differenceType>7002</differenceType>
    <method>java.lang.String getHostname()</method>
    <justification>OPENDJ-1270: Renamed LDAP{ConnectionFactory|Listener}.getHostname() to getHostName()</justification>
  </difference>
  <difference>
    <className>%regex[org/forgerock/opendj/ldap/(LDAPConnectionFactory|LDAPListener)]</className>
    <differenceType>7006</differenceType>
    <method>java.net.SocketAddress getSocketAddress()</method>
    <to>java.net.InetSocketAddress</to>
    <justification>OPENDJ-1270: Changed LDAP{ConnectionFactory|Listener}.getAddress() to return InetSocketAddresses</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/LDAPConnectionFactory</className>
    <differenceType>7005</differenceType>
    <method>%regex[LDAPConnectionFactory\(java\.lang\.String(.)*(org\.forgerock\.opendj\.ldap\.LDAPOptions)\)]</method>
    <to>%regex[LDAPConnectionFactory\(java\.lang\.String(.)*(org\.forgerock\.util\.Options)\)]</to>
    <justification>OPENDJ-1654: LDAPOptions should be converted in a SchemaOptions style API</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/LDAPListener</className>
    <differenceType>7005</differenceType>
    <method>%regex[LDAPListener\((.*), org\.forgerock\.opendj\.ldap\.ServerConnectionFactory(,\s*org\.forgerock\.opendj\.ldap\.LDAPListenerOptions)?\)]</method>
    <to>%regex[LDAPListener\((.*)\s*org\.forgerock\.opendj\.ldap\.ServerConnectionFactory(,\s*org\.forgerock\.util\.Options)?\)]</to>
    <justification>OPENDJ-1654: LDAPOptions should be converted in a SchemaOptions style API</justification>
  </difference>
  <difference>
    <className>%regex[org/forgerock/opendj/ldap/(LDAPOptions|LDAPListenerOptions)]</className>
    <differenceType>7002</differenceType>
    <method>%regex[org\.glassfish\.grizzly\.nio\.transport\.TCPNIOTransport getTCPNIOTransport\(\)]</method>
    <justification>OPENDJ-346: Decoupled opendj-ldap-sdk from grizzly-framework</justification>
  </difference>
  <difference>
    <className>%regex[org/forgerock/opendj/ldap/(LDAPOptions|LDAPListenerOptions)]</className>
    <differenceType>7002</differenceType>
    <method>%regex[org\.forgerock\.opendj\.ldap\.(LDAPOptions|LDAPListenerOptions) setTCPNIOTransport\(org\.glassfish\.grizzly\.nio\.transport\.TCPNIOTransport\)]</method>
    <justification>OPENDJ-346: Decoupled opendj-ldap-sdk from grizzly-framework</justification>
  </difference>
  <difference>
    <className>%regex[org/forgerock/opendj/asn1/[^/]*]</className>
    <differenceType>8001</differenceType>
    <justification>OPENDJ-175: Moved all classes from org.forgerock.opendj.asn1 package to org.forgerock.opendj.io package</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ByteSequence</className>
    <differenceType>7012</differenceType>
    <method>boolean isEmpty()</method>
    <justification>OPENDJ-701: Added method isEmpty() to interface ByteSequence</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/requests/SearchRequest</className>
    <differenceType>7012</differenceType>
    <method>boolean isSingleEntrySearch()</method>
    <justification>OPENDJ-972: Added method isSingleEntrySearch() to interface SearchRequest</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/schema/MatchingRule</className>
    <differenceType>7002</differenceType>
    <method>%regex[org\.forgerock\.opendj\.ldap\.Assertion getAssertion\(org\.forgerock\.opendj\.ldap\.ByteSequence, java\.util\.List, org\.forgerock\.opendj\.ldap\.ByteSequence\)]</method>
    <justification>Renamed getAssertion() to getSubstringAssertion()</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/schema/MatchingRuleImpl</className>
    <differenceType>7002</differenceType>
    <method>%regex[org\.forgerock\.opendj\.ldap\.Assertion getAssertion\(org\.forgerock\.opendj\.ldap\.schema\.Schema, org\.forgerock\.opendj\.ldap\.ByteSequence, java\.util\.List, org\.forgerock\.opendj\.ldap\.ByteSequence\)]</method>
    <justification>Renamed getAssertion() to getSubstringAssertion()</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/schema/MatchingRuleImpl</className>
    <differenceType>7012</differenceType>
    <method>%regex[org\.forgerock\.opendj\.ldap\.Assertion getSubstringAssertion\(org\.forgerock\.opendj\.ldap\.schema\.Schema, org\.forgerock\.opendj\.ldap\.ByteSequence, java\.util\.List, org\.forgerock\.opendj\.ldap\.ByteSequence\)]</method>
    <justification>Renamed getAssertion() to getSubstringAssertion()</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/schema/SchemaValidationPolicy</className>
    <differenceType>7006</differenceType>
    <method>%regex[org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy\$Policy (checkAttributeValues|checkAttributesAndObjectClasses|checkDITContentRules|checkDITStructureRules|checkNameForms|requireSingleStructuralObjectClass)\(\)]</method>
    <to>%regex[org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy\$Action]</to>
    <justification>Renamed SchemaValidationPolicy.Policy to SchemaValidationPolicy.Action</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/schema/SchemaValidationPolicy</className>
    <differenceType>7005</differenceType>
    <method>%regex[org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy (checkAttributeValues|checkAttributesAndObjectClasses|checkDITContentRules|checkDITStructureRules|checkNameForms|requireSingleStructuralObjectClass)\(org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy\$Policy(, org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy\$EntryResolver)?\)]</method>
    <to>%regex[org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy (checkAttributeValues|checkAttributesAndObjectClasses|checkDITContentRules|checkDITStructureRules|checkNameForms|requireSingleStructuralObjectClass)\(org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy\$Action(,\s*org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy\$EntryResolver)?\)]</to>
    <justification>Renamed SchemaValidationPolicy.Policy to SchemaValidationPolicy.Action</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/schema/SchemaValidationPolicy$Policy</className>
    <differenceType>8001</differenceType>
    <justification>Renamed SchemaValidationPolicy.Policy to SchemaValidationPolicy.Action</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/LDAPListenerOptions</className>
    <differenceType>7002</differenceType>
    <method>org.forgerock.opendj.ldap.LDAPListenerOptions setDecodeOptions(org.forgerock.opendj.ldap.DecodeOptions)</method>
    <justification>OPENDJ-1197: Method return type has changed due to reification</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/LDAPOptions</className>
    <differenceType>7002</differenceType>
    <method>org.forgerock.opendj.ldap.LDAPOptions setDecodeOptions(org.forgerock.opendj.ldap.DecodeOptions)</method>
    <justification>OPENDJ-1197: Method return type has changed due to reification</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/Assertion</className>
    <differenceType>7012</differenceType>
    <method>java.lang.Object createIndexQuery(org.forgerock.opendj.ldap.spi.IndexQueryFactory)</method>
    <justification>OPENDJ-1308 Migrate schema support: allows decoupling indexing from a specific backend</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/schema/MatchingRuleImpl</className>
    <differenceType>7012</differenceType>
    <method>java.util.Collection getIndexers()</method>
    <justification>OPENDJ-1308 Migrate schema support: allows decoupling indexing from a specific backend</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/schema/MatchingRuleImpl</className>
    <differenceType>7012</differenceType>
    <method>boolean isIndexingSupported()</method>
    <justification>OPENDJ-1308 Migrate schema support: allows decoupling indexing from a specific backend</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/*Connection*</className>
    <differenceType>7004</differenceType>
    <method>org.forgerock.opendj.ldap.FutureResult *Async(*org.forgerock.opendj.ldap.ResultHandler)</method>
    <justification>OPENDJ-1285 Migrate SDK from Futures to Promises</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/schema/Schema</className>
    <differenceType>7004</differenceType>
    <method>org.forgerock.opendj.ldap.FutureResult readSchema*Async*(org.forgerock.opendj.ldap.Connection, org.forgerock.opendj.ldap.DN, org.forgerock.opendj.ldap.ResultHandler)</method>
    <justification>OPENDJ-1285 Migrate SDK from Futures to Promises</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/*Connection*</className>
    <differenceType>7006</differenceType>
    <method>org.forgerock.opendj.ldap.FutureResult *Async(*org.forgerock.opendj.ldap.ResultHandler)</method>
    <to>org.forgerock.util.promise.Promise</to>
    <justification>OPENDJ-1285 Migrate SDK from Futures to Promises</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/Connection</className>
    <differenceType>7012</differenceType>
    <method>org.forgerock.opendj.ldap.FutureResult *Async(org.forgerock.opendj.*)</method>
    <justification>OPENDJ-1285 Migrate SDK from Futures to Promises</justification>
  </difference>
  <difference>
    <className>%regex[org/forgerock/opendj/ldap/(RequestHandler|MemoryBackend)]</className>
    <differenceType>7004</differenceType>
    <method>*handleSearch(*)</method>
    <justification>OPENDJ-1285 Migrate SDK from Futures to Promises</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ResultHandler</className>
    <differenceType>7012</differenceType>
    <method>*handleError(org.forgerock.opendj.ldap.ErrorResultException)</method>
    <justification>OPENDJ-1285 Migrate SDK from Futures to Promises</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ResultHandler</className>
    <differenceType>7002</differenceType>
    <method>*handleErrorResult(org.forgerock.opendj.ldap.ErrorResultException)</method>
    <justification>OPENDJ-1285 Migrate SDK from Futures to Promises</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/SearchResultHandler</className>
    <differenceType>4001</differenceType>
    <to>org/forgerock/opendj/ldap/ResultHandler</to>
    <justification>OPENDJ-1285 Migrate SDK from Futures to Promises</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/schema/SchemaBuilder</className>
    <differenceType>7004</differenceType>
    <method>org.forgerock.opendj.ldap.FutureResult addSchema*Async(*)</method>
    <justification>OPENDJ-1285 Migrate SDK from Futures to Promises</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/*Exception</className>
    <differenceType>5001</differenceType>
    <to>org/forgerock/opendj/ldap/ErrorResultException</to>
    <justification>OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/*Exception</className>
    <differenceType>5001</differenceType>
    <to>java/util/concurrent/ExecutionException</to>
    <justification>OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ConnectionEventListener</className>
    <differenceType>7005</differenceType>
    <method>*handleConnectionError(boolean, org.forgerock.opendj.ldap.ErrorResultException)</method>
    <to>*handleConnectionError(boolean, org.forgerock.opendj.ldap.LdapException)</to>
    <justification>OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ResultHandler</className>
    <differenceType>7012</differenceType>
    <method>*handleError(org.forgerock.opendj.ldap.LdapException)</method>
    <justification>OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ErrorResult*Exception</className>
    <differenceType>8001</differenceType>
    <justification>OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/*Connection*</className>
    <differenceType>7006</differenceType>
    <method>*Async*</method>
    <to>org.forgerock.opendj.ldap.LdapPromise</to>
    <justification>OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/RootDSE</className>
    <differenceType>7006</differenceType>
    <method>*Async*</method>
    <to>org.forgerock.opendj.ldap.LdapPromise</to>
    <justification>OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/schema/Schema*</className>
    <differenceType>7006</differenceType>
    <method>*Async*</method>
    <to>org.forgerock.opendj.ldap.LdapPromise</to>
    <justification>OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/Connection</className>
    <differenceType>7012</differenceType>
    <method>org.forgerock.opendj.ldap.LdapPromise *Async(*)</method>
    <justification>OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/FutureResult</className>
    <differenceType>8001</differenceType>
    <justification>OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/Functions</className>
    <differenceType>7002</differenceType>
    <method>*composeFirstP(*)</method>
    <justification>OPENDJ-1550 Replace SDK Function with Function from forgerock-util</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/Functions</className>
    <differenceType>7002</differenceType>
    <method>*composeSecondP(*)</method>
    <justification>OPENDJ-1550 Replace SDK Function with Function from forgerock-util</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/Functions</className>
    <differenceType>7002</differenceType>
    <method>*fixedFunction(*)</method>
    <justification>OPENDJ-1550 Replace SDK Function with Function from forgerock-util</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/Function</className>
    <differenceType>8001</differenceType>
    <justification>OPENDJ-1550 Replace SDK Function with Function from forgerock-util</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/AttributeParser</className>
    <differenceType>7005</differenceType>
    <method>*as*(org.forgerock.opendj.ldap.Function*)</method>
    <to>*as*(org.forgerock.util.Function*)</to>
    <justification>
        OPENDJ-1550 Replace SDK Function with Function from forgerock-util
        OPENDJ-1666 Update sdk to forgerock-util 2.0.0
    </justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/Functions</className>
    <differenceType>7005</differenceType>
    <method>*compose(org.forgerock.opendj.ldap.Function, org.forgerock.opendj.ldap.Function)</method>
    <to>*compose(org.forgerock.util.Function, org.forgerock.util.Function)</to>
    <justification>
        OPENDJ-1550 Replace SDK Function with Function from forgerock-util
        OPENDJ-1666 Update sdk to forgerock-util 2.0.0
    </justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/Functions</className>
    <differenceType>7006</differenceType>
    <method>*</method>
    <to>org.forgerock.util.promise.Function</to>
    <justification>OPENDJ-1550 Replace SDK Function with Function from forgerock-util</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/DN</className>
    <differenceType>7002</differenceType>
    <method>*toNormalizedString()</method>
    <to>*toIrreversibleNormalizedByteString()</to>
    <justification>OPENDJ-1585 Function has been renamed to avoid abuse</justification>
  </difference>
  <difference>
    <className>%regex[org/forgerock/opendj/ldap/schema/Schema(Builder)?]</className>
    <differenceType>7002</differenceType>
    <method>%regex[(boolean|org.forgerock.opendj.ldap.schema.SchemaBuilder) allow(.)*\((boolean)?\)]</method>
    <justification>OPENDJ-1478 Make it easier to add compatibility options to schemas</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ByteSequence</className>
    <differenceType>7012</differenceType>
    <method>java.nio.ByteBuffer copyTo(java.nio.ByteBuffer)</method>
    <justification>Added new utility method copyTo() for a byte buffer</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ByteSequence</className>
    <differenceType>7012</differenceType>
    <method>boolean copyTo(java.nio.CharBuffer, java.nio.charset.CharsetDecoder)</method>
    <justification>OPENDJ-1585: Added new utility method copyTo for a char buffer</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/schema/MatchingRule</className>
    <differenceType>7002</differenceType>
    <method>java.util.Comparator comparator()</method>
    <justification>OPENDJ-1689 method has been removed because all matching rules should support the default comparator</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/schema/MatchingRuleImpl</className>
    <differenceType>7002</differenceType>
    <method>java.util.Comparator comparator(org.forgerock.opendj.ldap.schema.Schema)</method>
    <justification>OPENDJ-1689 method has been removed because all matching rules should support the default comparator</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/schema/MatchingRuleImpl</className>
    <differenceType>7012</differenceType>
    <method>java.util.Collection createIndexers(org.forgerock.opendj.ldap.spi.IndexingOptions)</method>
    <justification>Doesn't really seem correct to call createKeys() with different options each time.</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ByteSequence</className>
    <differenceType>7012</differenceType>
    <method>boolean startsWith(org.forgerock.opendj.ldap.ByteSequence)</method>
    <justification>Lack of startsWith() forced to re-implement it multiple times at different location</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ByteString</className>
    <differenceType>7005</differenceType>
    <method>org.forgerock.opendj.ldap.ByteString valueOf(java.lang.String)</method>
    <from>org.forgerock.opendj.ldap.ByteString valueOf(java.lang.String)</from>
    <to>org.forgerock.opendj.ldap.ByteString valueOf(java.lang.CharSequence)</to>
    <justification>Using CharSequence instead of String allows to reduce memory copy.</justification>
  </difference>
  <!-- OPENDJ-1666 Migration to forgerock-util 2.0.0  -->
  <difference>
    <className>org/forgerock/opendj/ldap/Functions</className>
    <differenceType>7006</differenceType>
    <method>*</method>
    <to>org.forgerock.util.Function</to>
    <justification>OPENDJ-1666 Update sdk to forgerock-util 2.0.0</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/LdapResultHandler</className>
    <differenceType>8000</differenceType>
    <justification>OPENDJ-1666 Update sdk to forgerock-util 2.0.0</justification>
  </difference>
  <difference>
    <className>%regex[org/forgerock/opendj/ldap/(RequestHandler|MemoryBackend)]</className>
    <differenceType>7005</differenceType>
    <method>%regex[(.)* handle*(.)*org\.forgerock\.opendj\.ldap\.ResultHandler(.)*]</method>
    <to>%regex[(.)* handle*(.)*org\.forgerock\.opendj\.ldap\.LdapResultHandler(.)*]</to>
    <justification>OPENDJ-1666 Update sdk to forgerock-util 2.0.0</justification>
  </difference>
  <difference>
    <className>%regex[org/forgerock/opendj/ldap/responses/(Abstract)?ExtendedResultDecoder]</className>
    <differenceType>7006</differenceType>
    <method>org.forgerock.opendj.ldap.ResultHandler adaptExtendedResultHandler(org.forgerock.opendj.ldap.requests.ExtendedRequest, org.forgerock.opendj.ldap.ResultHandler, org.forgerock.opendj.ldap.DecodeOptions)</method>
    <to>org.forgerock.opendj.ldap.LdapResultHandler</to>
    <justification>OPENDJ-1666 Update sdk to forgerock-util 2.0.0</justification>
  </difference>
  <difference>
    <className>%regex[org/forgerock/opendj/ldap/responses/(Abstract)?ExtendedResultDecoder]</className>
    <differenceType>7005</differenceType>
    <method>org.forgerock.opendj.ldap.ResultHandler adaptExtendedResultHandler(org.forgerock.opendj.ldap.requests.ExtendedRequest, org.forgerock.opendj.ldap.ResultHandler, org.forgerock.opendj.ldap.DecodeOptions)</method>
    <to>org.forgerock.opendj.ldap.ResultHandler adaptExtendedResultHandler(org.forgerock.opendj.ldap.requests.ExtendedRequest, org.forgerock.opendj.ldap.LdapResultHandler, org.forgerock.opendj.ldap.DecodeOptions)</to>
    <justification>OPENDJ-1666 Update sdk to forgerock-util 2.0.0</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/RootDSE</className>
    <differenceType>7005</differenceType>
    <method>*readRootDSEAsync(org.forgerock.opendj.ldap.Connection, org.forgerock.opendj.ldap.ResultHandler)</method>
    <to>*readRootDSEAsync(org.forgerock.opendj.ldap.Connection, org.forgerock.opendj.ldap.LdapResultHandler)</to>
    <justification>OPENDJ-1666 Update sdk to forgerock-util 2.0.0</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/AuthenticatedConnectionFactory$AuthenticatedConnection</className>
    <differenceType>7005</differenceType>
    <method>*bindAsync(org.forgerock.opendj.ldap.requests.BindRequest, org.forgerock.opendj.ldap.IntermediateResponseHandler, org.forgerock.opendj.ldap.ResultHandler)</method>
    <to>*bindAsync(org.forgerock.opendj.ldap.requests.BindRequest*org.forgerock.opendj.ldap.IntermediateResponseHandler*org.forgerock.opendj.ldap.LdapResultHandler)</to>
    <justification>OPENDJ-1666 Update sdk to forgerock-util 2.0.0</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ResultHandler</className>
    <differenceType>8001</differenceType>
    <justification>OPENDJ-1666 Update sdk to forgerock-util 2.0.0</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/LDAPListenerOptions</className>
    <differenceType>8001</differenceType>
    <justification>OPENDJ-1654: LDAPOptions should be converted in a SchemaOptions style API</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/LDAPOptions</className>
    <differenceType>8001</differenceType>
    <justification>OPENDJ-1654: LDAPOptions should be converted in a SchemaOptions style API</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ByteStringBuilder</className>
    <differenceType>7002</differenceType>
    <method>%regex[(org\.forgerock\.opendj\.ldap\.ByteStringBuilder|int) append\(.*\)]</method>
    <justification>OPENDJ-1802 ByteStringBuilder.append() => appendByte(), appendShort(), appendInt(), appendLong(), appendBytes(), appendObject()</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ByteStringBuilder</className>
    <differenceType>7004</differenceType>
    <method>org.forgerock.opendj.ldap.ByteStringBuilder append(byte)</method>
    <to>org.forgerock.opendj.ldap.ByteStringBuilder appendByte(int)</to>
    <justification>OPENDJ-1802 Consider making ByteString / ByteStringBuilder methods more intentional</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ByteStringBuilder</className>
    <differenceType>7006</differenceType>
    <method>org.forgerock.opendj.ldap.ByteStringBuilder append(byte)</method>
    <to>void</to>
    <justification>OPENDJ-1802 Consider making ByteString / ByteStringBuilder methods more intentional</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ByteSequenceReader</className>
    <differenceType>7002</differenceType>
    <method>%regex[(\w|\.)+ get\w*\([^)]*\)]</method>
    <justification>OPENDJ-1802 ByteSequenceReader.get*() => readByte(), readBytes() and read*()</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/ByteString</className>
    <differenceType>7002</differenceType>
    <method>%regex[org\.forgerock\.opendj\.ldap\.ByteString valueOf\([^)]+\)]</method>
    <justification>OPENDJ-1802 ByteString.valueOf() => valueOfInt(), valueOfLong(), valueOfUtf8(), valueOfBytes(), valueOfObject()</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/Connections</className>
    <differenceType>7002</differenceType>
    <method>*newAuthenticatedConnectionFactory*</method>
    <justification>OPENDJ-1607: merge authenticated and heart-beat connection factories into
      LDAPConnectionFactory. Pre-authenticated connection support is now part of
      LDAPConnectionFactory and can be enabled by specifying the AUTHN_BIND_REQUEST option.</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/Connections</className>
    <differenceType>7002</differenceType>
    <method>*newHeartBeatConnectionFactory*</method>
    <justification>OPENDJ-1607: merge authenticated and heart-beat connection factories into
      LDAPConnectionFactory. Heart-beat support is now part of
      LDAPConnectionFactory and can be configured using the HEARTBEAT_* options.</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/AuthenticatedConnectionFactory*</className>
    <differenceType>8001</differenceType>
    <justification>OPENDJ-1607: merge authenticated and heart-beat connection factories into
      LDAPConnectionFactory. Pre-authenticated connection support is now part of
      LDAPConnectionFactory and can be enabled by specifying the AUTHN_BIND_REQUEST option.</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/requests/StartTLSExtendedRequest</className>
    <differenceType>7012</differenceType>
    <method>*addEnabled*(java.util.Collection)</method>
    <justification>OPENDJ-1607: added Collection based addEnabled* methods</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/AttributeParser</className>
    <differenceType>7014</differenceType>
    <method>java.util.Set asSetOf(org.forgerock.opendj.ldap.Function, java.lang.Object[])</method>
    <justification>Method needs to be final in order to use SafeVarArgs annotation</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/FailoverLoadBalancingAlgorithm</className>
    <differenceType>1001</differenceType>
    <justification>Class instances are now created using Connections.newFailoverLoadBalancer</justification>
  </difference>
  <difference>
    <className>org/forgerock/opendj/ldap/RoundRobinLoadBalancingAlgorithm</className>
    <differenceType>1001</differenceType>
    <justification>Class instances are now created using Connections.newRoundRobinLoadBalancer</justification>
  </difference>
</differences>
opendj-sdk/opendj-core/pom.xml
@@ -21,8 +21,7 @@
  !
  ! CDDL HEADER END
  !
  !      Copyright 2011-2015 ForgeRock AS
  !
  !      Copyright 2011-2016 ForgeRock AS
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
@@ -185,7 +184,7 @@
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>opendj-ldap-sdk</artifactId>
                                    <!-- former name of this jar -->
                                    <version>2.6.0</version>
                                    <version>3.0.0-SNAPSHOT</version>
                                </comparisonArtifact>
                            </comparisonArtifacts>
                            <excludes>
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/DN.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2009-2010 Sun Microsystems, Inc.
 *      Portions copyright 2011-2015 ForgeRock AS.
 *      Portions copyright 2011-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
@@ -62,7 +62,6 @@
 *      Models </a>
 */
public final class DN implements Iterable<RDN>, Comparable<DN> {
    static final byte NORMALIZED_RDN_SEPARATOR = 0x00;
    static final byte NORMALIZED_AVA_SEPARATOR = 0x01;
    static final byte NORMALIZED_ESC_BYTE = 0x02;
@@ -78,8 +77,6 @@
    private static final ThreadLocal<WeakHashMap<Schema, Map<String, DN>>> CACHE =
            new ThreadLocal<WeakHashMap<Schema, Map<String, DN>>>() {
                /** {@inheritDoc} */
                @Override
                protected WeakHashMap<Schema, Map<String, DN>> initialValue() {
                    return new WeakHashMap<>();
@@ -283,7 +280,7 @@
        RDN rdn;
        try {
            rdn = RDN.decode(null, reader, schema);
            rdn = RDN.decode(reader, schema);
        } catch (final UnknownSchemaElementException e) {
            final LocalizableMessage message =
                    ERR_DN_TYPE_NOT_FOUND.get(reader.getString(), e.getMessageObject());
@@ -457,13 +454,11 @@
        return child(new RDN(attributeType, attributeValue));
    }
    /** {@inheritDoc} */
    @Override
    public int compareTo(final DN dn) {
        return compareTo(this, dn);
    }
    /** {@inheritDoc} */
    @Override
    public boolean equals(final Object obj) {
        if (this == obj) {
@@ -476,7 +471,6 @@
        return false;
    }
    /** {@inheritDoc} */
    @Override
    public int hashCode() {
        return toNormalizedByteString().hashCode();
@@ -955,7 +949,6 @@
     * @Deprecated This class will eventually be replaced by a compact implementation of a DN.
     */
    public static final class CompactDn implements Comparable<CompactDn> {
        /** Original string corresponding to the DN. */
        private final byte[] originalValue;
@@ -972,7 +965,6 @@
            this.schema = dn.schema;
        }
        /** {@inheritDoc} */
        @Override
        public int compareTo(final CompactDn other) {
            byte[] normValue = getNormalizedValue();
@@ -989,13 +981,11 @@
            return DN.valueOf(ByteString.toString(originalValue, 0, originalValue.length), schema);
        }
        /** {@inheritDoc} */
        @Override
        public int hashCode() {
            return Arrays.hashCode(getNormalizedValue());
        }
        /** {@inheritDoc} */
        @Override
        public boolean equals(Object obj) {
            if (this == obj) {
@@ -1008,7 +998,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public String toString() {
            return ByteString.toString(originalValue, 0, originalValue.length);
@@ -1030,5 +1019,4 @@
    public CompactDn compact() {
        return new CompactDn(this);
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/InternalConnection.java
@@ -22,9 +22,8 @@
 *
 *
 *      Copyright 2010 Sun Microsystems, Inc.
 *      Portions copyright 2011-2015 ForgeRock AS.
 *      Portions copyright 2011-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
import java.util.List;
@@ -73,7 +72,6 @@
        this.serverConnection = serverConnection;
    }
    /** {@inheritDoc} */
    @Override
    public LdapPromise<Void> abandonAsync(final AbandonRequest request) {
        final int i = messageID.getAndIncrement();
@@ -81,7 +79,6 @@
        return newSuccessfulLdapPromise((Void) null, i);
    }
    /** {@inheritDoc} */
    @Override
    public LdapPromise<Result> addAsync(final AddRequest request,
            final IntermediateResponseHandler intermediateResponseHandler) {
@@ -92,32 +89,28 @@
        return promise;
    }
    /** {@inheritDoc} */
    @Override
    public void addConnectionEventListener(final ConnectionEventListener listener) {
        Reject.ifNull(listener);
        listeners.add(listener);
    }
    /** {@inheritDoc} */
    @Override
    public LdapPromise<BindResult> bindAsync(final BindRequest request,
            final IntermediateResponseHandler intermediateResponseHandler) {
        final int i = messageID.getAndIncrement();
        final BindResultLdapPromiseImpl promise =
                newBindLdapPromise(i, request, null, intermediateResponseHandler, this);
                newBindLdapPromise(i, request, null, intermediateResponseHandler);
        serverConnection.handleBind(i, 3, request, promise, promise);
        return promise;
    }
    /** {@inheritDoc} */
    @Override
    public void close(final UnbindRequest request, final String reason) {
        final int i = messageID.getAndIncrement();
        serverConnection.handleConnectionClosed(i, request);
    }
    /** {@inheritDoc} */
    @Override
    public LdapPromise<CompareResult> compareAsync(final CompareRequest request,
            final IntermediateResponseHandler intermediateResponseHandler) {
@@ -128,7 +121,6 @@
        return promise;
    }
    /** {@inheritDoc} */
    @Override
    public LdapPromise<Result> deleteAsync(final DeleteRequest request,
            final IntermediateResponseHandler intermediateResponseHandler) {
@@ -139,7 +131,6 @@
        return promise;
    }
    /** {@inheritDoc} */
    @Override
    public <R extends ExtendedResult> LdapPromise<R> extendedRequestAsync(final ExtendedRequest<R> request,
            final IntermediateResponseHandler intermediateResponseHandler) {
@@ -150,21 +141,18 @@
        return promise;
    }
    /** {@inheritDoc} */
    @Override
    public boolean isClosed() {
        // FIXME: this should be true after close has been called.
        return false;
    }
    /** {@inheritDoc} */
    @Override
    public boolean isValid() {
        // FIXME: this should be false if this connection is disconnected.
        return true;
    }
    /** {@inheritDoc} */
    @Override
    public LdapPromise<Result> modifyAsync(final ModifyRequest request,
            final IntermediateResponseHandler intermediateResponseHandler) {
@@ -175,7 +163,6 @@
        return promise;
    }
    /** {@inheritDoc} */
    @Override
    public LdapPromise<Result> modifyDNAsync(final ModifyDNRequest request,
            final IntermediateResponseHandler intermediateResponseHandler) {
@@ -186,14 +173,12 @@
        return promise;
    }
    /** {@inheritDoc} */
    @Override
    public void removeConnectionEventListener(final ConnectionEventListener listener) {
        Reject.ifNull(listener);
        listeners.remove(listener);
    }
    /** {@inheritDoc} */
    @Override
    public LdapPromise<Result> searchAsync(final SearchRequest request,
            final IntermediateResponseHandler intermediateResponseHandler, final SearchResultHandler entryHandler) {
@@ -204,14 +189,8 @@
        return promise;
    }
    /** {@inheritDoc} */
    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("InternalConnection(");
        builder.append(serverConnection);
        builder.append(')');
        return builder.toString();
        return getClass().getSimpleName() + "(" + serverConnection + ')';
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/RDN.java
@@ -22,9 +22,8 @@
 *
 *
 *      Copyright 2009-2010 Sun Microsystems, Inc.
 *      Portions copyright 2011-2015 ForgeRock AS.
 *      Portions copyright 2011-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
import static com.forgerock.opendj.ldap.CoreMessages.ERR_RDN_TYPE_NOT_FOUND;
@@ -32,11 +31,11 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.TreeSet;
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.LocalizedIllegalArgumentException;
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.ldap.schema.Schema;
@@ -140,17 +139,14 @@
    public static RDN valueOf(final String rdn, final Schema schema) {
        final SubstringReader reader = new SubstringReader(rdn);
        try {
            return decode(rdn, reader, schema);
            return decode(reader, schema);
        } catch (final UnknownSchemaElementException e) {
            final LocalizableMessage message =
                    ERR_RDN_TYPE_NOT_FOUND.get(rdn, e.getMessageObject());
            throw new LocalizedIllegalArgumentException(message);
            throw new LocalizedIllegalArgumentException(ERR_RDN_TYPE_NOT_FOUND.get(rdn, e.getMessageObject()));
        }
    }
    // FIXME: ensure that the decoded RDN does not contain multiple AVAs
    // with the same type.
    static RDN decode(final String rdnString, final SubstringReader reader, final Schema schema) {
    /** FIXME: ensure that the decoded RDN does not contain multiple AVAs with the same type. */
    static RDN decode(final SubstringReader reader, final Schema schema) {
        final AVA firstAVA = AVA.decode(reader, schema);
        // Skip over any spaces that might be after the attribute value.
@@ -256,7 +252,6 @@
        this.stringValue = stringValue;
    }
    /** {@inheritDoc} */
    @Override
    public int compareTo(final RDN rdn) {
        // Identity.
@@ -304,7 +299,6 @@
        return 0;
    }
    /** {@inheritDoc} */
    @Override
    public boolean equals(final Object obj) {
        if (this == obj) {
@@ -343,7 +337,6 @@
        return avas[0];
    }
    /** {@inheritDoc} */
    @Override
    public int hashCode() {
        // Avoid an algorithm that requires the AVAs to be sorted.
@@ -478,9 +471,7 @@
    private Iterator<AVA> getSortedAvas() {
        TreeSet<AVA> sortedAvas = new TreeSet<>();
        for (AVA ava : avas) {
            sortedAvas.add(ava);
        }
        Collections.addAll(sortedAvas, avas);
        return sortedAvas.iterator();
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/RootDSE.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2009-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2011-2014 ForgeRock AS
 *      Portions Copyright 2011-2016 ForgeRock AS
 */
package org.forgerock.opendj.ldap;
@@ -137,9 +137,6 @@
     * @param connection
     *            A connection to the Directory Server whose Root DSE is to be
     *            read.
     * @param handler
     *            A result handler which can be used to asynchronously process
     *            the operation result when it is received, may be {@code null}.
     * @return A promise representing the result of the operation.
     * @throws UnsupportedOperationException
     *             If the connection does not support search operations.
@@ -149,8 +146,7 @@
     * @throws NullPointerException
     *             If the {@code connection} was {@code null}.
     */
    public static LdapPromise<RootDSE> readRootDSEAsync(final Connection connection,
            final LdapResultHandler<? super RootDSE> handler) {
    public static LdapPromise<RootDSE> readRootDSEAsync(final Connection connection) {
        return connection.searchSingleEntryAsync(SEARCH_REQUEST).then(
            new Function<SearchResultEntry, RootDSE, LdapException>() {
                @Override
@@ -424,19 +420,16 @@
        if (attr != null) {
            return Collections.unmodifiableCollection(Collections2.transformedCollection(attr,
                    function, Functions.objectToByteString()));
        } else {
            return Collections.emptySet();
        }
        return Collections.emptySet();
    }
    private <N> N getSingleValuedAttribute(final AttributeDescription attributeDescription,
        final Function<ByteString, N, NeverThrowsException> function) {
        final Attribute attr = entry.getAttribute(attributeDescription);
        if (attr == null || attr.isEmpty()) {
            return null;
        } else {
        if (attr != null && !attr.isEmpty()) {
            return function.apply(attr.firstValue());
        }
        return null;
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleUse.java
@@ -22,9 +22,8 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions copyright 2015 ForgeRock AS
 *      Portions copyright 2015-2016 ForgeRock AS
 */
package org.forgerock.opendj.ldap.schema;
import static java.util.Arrays.*;
@@ -52,7 +51,6 @@
 * attribute types that may be used for a given matching rule.
 */
public final class MatchingRuleUse extends SchemaElement {
    /** A fluent API for incrementally constructing matching rule uses. */
    public static final class Builder extends SchemaElementBuilder<Builder> {
        private String oid;
@@ -245,13 +243,9 @@
            this.names.remove(name);
            return this;
        }
    }
    /**
     * The OID of the matching rule associated with this matching rule
     * use definition.
     */
    /** The OID of the matching rule associated with this matching rule use definition. */
    private final String oid;
    /** The set of user defined names for this definition. */
@@ -260,10 +254,7 @@
    /** Indicates whether this definition is declared "obsolete". */
    private final boolean isObsolete;
    /**
     * The set of attribute types with which this matching rule use is
     * associated.
     */
    /** The set of attribute types with which this matching rule use is associated. */
    private final Set<String> attributeOIDs;
    private MatchingRule matchingRule;
@@ -471,8 +462,7 @@
        }
    }
    void validate(final Schema schema, final List<LocalizableMessage> warnings)
            throws SchemaException {
    void validate(final Schema schema) throws SchemaException {
        try {
            matchingRule = schema.getMatchingRule(oid);
        } catch (final UnknownSchemaElementException e) {
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NameForm.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions copyright 2011-2015 ForgeRock AS
 *      Portions copyright 2011-2016 ForgeRock AS
 */
package org.forgerock.opendj.ldap.schema;
@@ -589,7 +589,7 @@
        }
    }
    void validate(final Schema schema, final List<LocalizableMessage> warnings) throws SchemaException {
    void validate(final Schema schema) throws SchemaException {
        try {
            structuralClass = schema.getObjectClass(structuralClassOID);
        } catch (final UnknownSchemaElementException e) {
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaBuilder.java
@@ -23,7 +23,7 @@
 *
 *      Copyright 2009-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2014 Manuel Gaupp
 *      Portions Copyright 2011-2015 ForgeRock AS
 *      Portions Copyright 2011-2016 ForgeRock AS
 */
package org.forgerock.opendj.ldap.schema;
@@ -81,9 +81,7 @@
import com.forgerock.opendj.util.StaticUtils;
import com.forgerock.opendj.util.SubstringReader;
/**
 * Schema builders should be used for incremental construction of new schemas.
 */
/** Schema builders should be used for incremental construction of new schemas. */
public final class SchemaBuilder {
    /** Constant used for name to oid mapping when one name actually maps to multiple numerical OID. */
@@ -108,10 +106,7 @@
                SUBSCHEMA_SUBENTRY_ATTRS);
    }
    /**
     * Constructs a search request for retrieving the named subschema
     * sub-entry.
     */
    /** Constructs a search request for retrieving the named subschema sub-entry. */
    private static SearchRequest getReadSchemaSearchRequest(final DN dn) {
        return Requests.newSearchRequest(dn, SearchScope.BASE_OBJECT, SUBSCHEMA_FILTER,
                SUBSCHEMA_ATTRS);
@@ -160,20 +155,13 @@
    private List<LocalizableMessage> warnings;
    private Options options;
    /** A schema which should be copied into this builder on any mutation. */
    private Schema copyOnWriteSchema;
    /**
     * A unique ID which can be used to uniquely identify schemas
     * constructed without a name.
     */
    /** A unique ID which can be used to uniquely identify schemas constructed without a name. */
    private static final AtomicInteger NEXT_SCHEMA_ID = new AtomicInteger();
    /**
     * Creates a new schema builder with no schema elements and default
     * compatibility options.
     */
    /** Creates a new schema builder with no schema elements and default compatibility options. */
    public SchemaBuilder() {
        preLazyInitBuilder(null, null);
    }
@@ -870,7 +858,7 @@
            }
            // Make sure that the set of attributes was defined.
            if (attributes == null || attributes.size() == 0) {
            if (attributes == null || attributes.isEmpty()) {
                throw new LocalizedIllegalArgumentException(ERR_ATTR_SYNTAX_MRUSE_NO_ATTR.get(definition));
            }
            useBuilder.attributes(attributes);
@@ -2675,7 +2663,7 @@
        for (final MatchingRuleUse use : numericOID2MatchingRuleUses.values().toArray(
                new MatchingRuleUse[numericOID2MatchingRuleUses.values().size()])) {
            try {
                use.validate(schema, warnings);
                use.validate(schema);
                for (final String name : use.getNames()) {
                    registerNameToOIDMapping(StaticUtils.toLowerCase(name), use.getMatchingRuleOID());
                }
@@ -2688,7 +2676,7 @@
        for (final NameForm form : numericOID2NameForms.values().toArray(
                new NameForm[numericOID2NameForms.values().size()])) {
            try {
                form.validate(schema, warnings);
                form.validate(schema);
                // build the objectClass2NameForms map
                final String ocOID = form.getStructuralClass().getOID();
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/spi/LdapPromises.java
@@ -21,7 +21,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2014-2015 ForgeRock AS.
 *      Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.spi;
@@ -51,9 +51,7 @@
import org.forgerock.util.promise.PromiseImpl;
import org.forgerock.util.promise.Promises;
/**
 * Utility methods for creating and composing {@link LdapPromise}s.
 */
/** Utility methods for creating and composing {@link LdapPromise}s. */
public final class LdapPromises {
    private LdapPromises() {
    }
@@ -83,44 +81,13 @@
     *         Client that binds to the server.
     * @param intermediateResponseHandler
     *         Handler that consumes intermediate responses from extended operations.
     * @param connection
     *         The connection to directory server.
     * @return The new {@link BindResultLdapPromiseImpl}.
     */
    public static BindResultLdapPromiseImpl newBindLdapPromise(
            final int requestID,
            final BindRequest request,
            final BindClient bindClient,
            final IntermediateResponseHandler intermediateResponseHandler,
            final Connection connection) {
        return new BindResultLdapPromiseImpl(LdapPromises.<BindResult>newInnerBindOrStartTLSPromise(),
                                             requestID,
                                             request,
                                             bindClient,
                                             intermediateResponseHandler);
    }
    /**
     * Creates a new bind {@link BindResultLdapPromiseImpl}.
     *
     * @param requestID
     *         Identifier of the request.
     * @param request
     *         The bind request sent to server.
     * @param bindClient
     *         Client that binds to the server.
     * @param intermediateResponseHandler
     *         Handler that consumes intermediate responses from extended operations.
     * @param connection
     *         The connection to directory server.
     * @return The new {@link BindResultLdapPromiseImpl}.
     */
    public static BindResultLdapPromiseImpl newBindLdapPromise(
            final int requestID,
            final BindRequest request,
            final BindClient bindClient,
            final IntermediateResponseHandler intermediateResponseHandler,
            final LDAPConnectionImpl connection) {
            final IntermediateResponseHandler intermediateResponseHandler) {
        return new BindResultLdapPromiseImpl(LdapPromises.<BindResult>newInnerBindOrStartTLSPromise(),
                                             requestID,
                                             request,
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/HeartBeatConnectionFactoryTestCase.java
@@ -446,7 +446,7 @@
    }
    private BindResultLdapPromiseImpl mockBindAsyncResponse() {
        final BindResultLdapPromiseImpl bindPromise = newBindLdapPromise(-1, null, null, null, ldapConnection);
        final BindResultLdapPromiseImpl bindPromise = newBindLdapPromise(-1, null, null, null);
        when(ldapConnection.bindAsync(any(BindRequest.class), any(IntermediateResponseHandler.class)))
                .thenReturn(bindPromise);
        return bindPromise;
opendj-sdk/opendj-grizzly/src/main/java/org/forgerock/opendj/grizzly/GrizzlyLDAPConnection.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2010 Sun Microsystems, Inc.
 *      Portions Copyright 2011-2015 ForgeRock AS
 *      Portions Copyright 2011-2016 ForgeRock AS
 */
package org.forgerock.opendj.grizzly;
@@ -276,7 +276,7 @@
        }
        final BindResultLdapPromiseImpl promise =
                newBindLdapPromise(messageID, request, context, intermediateResponseHandler, this);
                newBindLdapPromise(messageID, request, context, intermediateResponseHandler);
        try {
            synchronized (stateLock) {
@@ -521,7 +521,6 @@
        }
    }
    /** {@inheritDoc} */
    @Override
    public LdapPromise<Result> searchAsync(final SearchRequest request,
        final IntermediateResponseHandler intermediateResponseHandler, final SearchResultHandler entryHandler) {
@@ -554,13 +553,8 @@
    @Override
    public String toString() {
        final StringBuilder builder = new StringBuilder();
        builder.append("LDAPConnection(");
        builder.append(connection.getLocalAddress());
        builder.append(',');
        builder.append(connection.getPeerAddress());
        builder.append(')');
        return builder.toString();
        return getClass().getSimpleName() + "(" + connection.getLocalAddress()
            + ',' + connection.getPeerAddress() + ')';
    }
    @Override
opendj-sdk/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/UpdateGroupAsync.java
@@ -20,10 +20,8 @@
 *
 * CDDL HEADER END
 *
 *      Copyright 2015 ForgeRock AS.
 *
 *      Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.examples;
import static org.forgerock.util.Utils.closeSilently;
@@ -115,7 +113,7 @@
                    @Override
                    public Promise<RootDSE, LdapException> apply(BindResult bindResult)
                            throws LdapException {
                        return RootDSE.readRootDSEAsync(connection, null);
                        return RootDSE.readRootDSEAsync(connection);
                    }
                })
                .thenAsync(new AsyncFunction<RootDSE, Result, LdapException>() {
@@ -191,9 +189,7 @@
        System.exit(resultCode);
    }
    /**
     * Print usage then exit.
     */
    /** Print usage then exit. */
    private static void printUsage() {
        System.err.println("Usage: host port group-dn member-dn {add|del}");
        System.err.println("For example: localhost 1389 "
@@ -224,9 +220,7 @@
        System.out.println(message);
    }
    /**
     * Constructor not used.
     */
    /** Constructor not used. */
    private UpdateGroupAsync() {
        // Not used.
    }
opendj-sdk/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/AddRate.java
@@ -21,9 +21,8 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2014-2015 ForgeRock AS.
 *      Copyright 2014-2016 ForgeRock AS.
 */
package com.forgerock.opendj.ldap.tools;
import static java.util.Locale.ENGLISH;
@@ -83,7 +82,6 @@
    }
    private final class AddPerformanceRunner extends PerformanceRunner {
        private final class AddStatsHandler extends UpdateStatsResultHandler<Result> {
            private final String entryDN;
@@ -169,7 +167,7 @@
                startPurgeIfMaxNumberAddReached();
                startToggleDeleteIfAgeThresholdReached(currentTime);
                try {
                    String entryToRemove = getEntryToRemove(currentTime);
                    String entryToRemove = getEntryToRemove();
                    if (entryToRemove != null) {
                        return doDelete(connection, currentTime, entryToRemove);
                    }
@@ -203,15 +201,12 @@
            // FIXME Followings @Checkstyle:ignore tags are related to the maven-checkstyle-plugin
            // issue related here: https://github.com/checkstyle/checkstyle/issues/5
            // @Checkstyle:ignore
            private String getEntryToRemove(final long currentTime) throws AddRateExecutionEndedException {
            private String getEntryToRemove() throws AddRateExecutionEndedException {
                if (isPurgeBranchRunning.get()) {
                    return purgeEntry();
                }
                if (toggleDelete && entryCount.get() > sizeThreshold) {
                } else if (toggleDelete && entryCount.get() > sizeThreshold) {
                    return removeFirstAddedEntry();
                }
                return null;
            }
@@ -538,6 +533,5 @@
            new BooleanArgument("scriptFriendly", 'S', "scriptFriendly", INFO_DESCRIPTION_SCRIPT_FRIENDLY.get());
        scriptFriendly.setPropertyName("scriptFriendly");
        argParser.addArgument(scriptFriendly);
    }
}
opendj-sdk/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/LDAPSearch.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2010 Sun Microsystems, Inc.
 *      Portions Copyright 2011-2015 ForgeRock AS.
 *      Portions Copyright 2011-2016 ForgeRock AS.
 */
package com.forgerock.opendj.ldap.tools;
@@ -192,7 +192,7 @@
     */
    public static void main(final String[] args) {
        final int retCode = new LDAPSearch().run(args, false);
        final int retCode = new LDAPSearch().run(args);
        System.exit(filterExitCode(retCode));
    }
@@ -225,7 +225,7 @@
    }
    /** Run ldapsearch with provided command-line arguments. */
    int run(final String[] args, final boolean returnMatchingEntries) {
    int run(final String[] args) {
        // Create the command-line argument parser for use with this program.
        final LocalizableMessage toolDescription = INFO_LDAPSEARCH_TOOL_DESCRIPTION.get();
        final ArgumentParser argParser =
@@ -471,18 +471,14 @@
        if (filename.isPresent()) {
            // Read the filter strings.
            BufferedReader in = null;
            try {
                in = new BufferedReader(new FileReader(filename.getValue()));
            try (BufferedReader in = new BufferedReader(new FileReader(filename.getValue()))) {
                String line = null;
                while ((line = in.readLine()) != null) {
                    if ("".equals(line.trim())) {
                        // ignore empty lines.
                        continue;
                    }
                    final Filter ldapFilter = Filter.valueOf(line);
                    filters.add(ldapFilter);
                    filters.add(Filter.valueOf(line));
                }
            } catch (final LocalizedIllegalArgumentException e) {
                errPrintln(e.getMessageObject());
@@ -490,14 +486,6 @@
            } catch (final IOException e) {
                errPrintln(LocalizableMessage.raw(e.toString()));
                return ResultCode.CLIENT_SIDE_FILTER_ERROR.intValue();
            } finally {
                if (in != null) {
                    try {
                        in.close();
                    } catch (final IOException ioe) {
                        // Ignored.
                    }
                }
            }
        }
@@ -783,9 +771,7 @@
            return 0;
        }
        Connection connection = null;
        try {
            connection = connectionFactory.getConnection();
        try (Connection connection = connectionFactory.getConnection()) {
            if (bindRequest != null) {
                printPasswordPolicyResults(this, connection.bind(bindRequest));
            }
@@ -874,12 +860,11 @@
                println(INFO_LDAPSEARCH_MATCHING_ENTRY_COUNT.get(resultHandler.entryCount));
                println();
            }
            return 0;
        } catch (final LdapException ere) {
            return printErrorMessage(this, ere);
        } finally {
            closeSilently(ldifWriter, connection);
            closeSilently(ldifWriter);
        }
        return 0;
    }
}
opendj-sdk/opendj-ldap-toolkit/src/test/java/com/forgerock/opendj/ldap/tools/LDAPSearchITCase.java
@@ -21,7 +21,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2014 ForgeRock AS.
 *      Copyright 2014-2016 ForgeRock AS.
 */
package com.forgerock.opendj.ldap.tools;
@@ -30,7 +30,6 @@
import static com.forgerock.opendj.ldap.tools.ToolsMessages.ERR_TOOL_RESULT_CODE;
import static com.forgerock.opendj.ldap.tools.ToolsMessages.INFO_LDAPSEARCH_MATCHING_ENTRY_COUNT;
import static com.forgerock.opendj.ldap.tools.ToolsMessages.INFO_LDAPSEARCH_TOOL_DESCRIPTION;
import static org.forgerock.util.Utils.closeSilently;
import java.io.PrintStream;
import java.util.Random;
@@ -42,9 +41,7 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Simple integration tests to check the ldapsearch command.
 */
/** Simple integration tests to check the ldapsearch command. */
@SuppressWarnings("javadoc")
public class LDAPSearchITCase extends ToolsITCase {
    private static final int NB_RAND_SIMPLE_SEARCH = 10;
@@ -90,16 +87,11 @@
        ByteStringBuilder out = new ByteStringBuilder();
        ByteStringBuilder err = new ByteStringBuilder();
        PrintStream outStream = new PrintStream(out.asOutputStream());
        PrintStream errStream = new PrintStream(err.asOutputStream());
        try {
        try (PrintStream outStream = new PrintStream(out.asOutputStream());
            PrintStream errStream = new PrintStream(err.asOutputStream())) {
            LDAPSearch ldapSearch = new LDAPSearch(outStream, errStream);
            ldapSearch.run(arguments, false);
            ldapSearch.run(arguments);
            checkOuputStreams(out, err, expectedOut, expectedErr);
        } finally {
            closeSilently(outStream, errStream);
        }
    }
}