OPENDJ-1591 Modify UniqueMemberEqualityMatchingRuleImpl  to normalized DN
 in the same way than DistinguishedNameEqualityMatchingRuleImpl and add
 the optional uid if present


git-svn-id: https://svn.forgerock.org/opendj/trunk@11219 41b1ffd8-f28e-4786-ab96-9950f0a78031
Improvements to DN class.

Thanks Matt for the suggestion!


DN.java:
In toIrreversibleNormalizedByteString(), initializing the StringBuilder to the number of RDNs was incorrect, creating more garbage than necessary.
In normalizeAVA(), extracted local variable for attributeType + removed useless creation of an Iterator.

DNTestCase.java:
Added more tests to increase code coverage.

git-svn-id: https://svn.forgerock.org/opendj/trunk@11220 41b1ffd8-f28e-4786-ab96-9950f0a78031
Utils.java:
Reduced scope of variables.
Used early exits.

git-svn-id: https://svn.forgerock.org/opendj/trunk@11221 41b1ffd8-f28e-4786-ab96-9950f0a78031
OPENDJ-1613 (CR-5064) NullPointerException while searching on ch=changelog

The problem happens when doing a search in the change number changelog.
It only appears when there are two replicas under the same domain.
When creating the domain cursor, it is initialized from the content of the change number index DB. A replica cursor is created for each replica. The first replica cursor is initialized from the CSN coming from the change number index DB while the second replica cursor is initialized from the null CSN.
Under this circumstance, the second replica cursor is immediately added to the exhausted cursors of the domain cursor, and never gets out of it despite its replica DB being not empty.
The reason is because next() is never called on the the underlying ReplServerDBCursor.


JEReplicaDBCursor.java:
In next(), test whether the cursor has already been initialized (rather than verifying if a previous record exists) in order to verify if this is the first time next() is called.
Removed currentChange field which duplicates the content of ReplServerDBCursor.currentRecord .
Better handled the cursor closed state in all the methods.

git-svn-id: https://svn.forgerock.org/opendj/trunk@11222 41b1ffd8-f28e-4786-ab96-9950f0a78031
AutoRefactored code.

Collapsed else { if (...){...} }  into else if (...) {...}
Reversed boolean equals conditions using constants.

In tests, used the correct assert*() methods.

git-svn-id: https://svn.forgerock.org/opendj/trunk@11224 41b1ffd8-f28e-4786-ab96-9950f0a78031