diff --git a/core/src/main/java/org/springframework/ldap/core/DistinguishedName.java b/core/src/main/java/org/springframework/ldap/core/DistinguishedName.java
index 192200ae..ee9f9456 100644
--- a/core/src/main/java/org/springframework/ldap/core/DistinguishedName.java
+++ b/core/src/main/java/org/springframework/ldap/core/DistinguishedName.java
@@ -299,26 +299,6 @@ public class DistinguishedName implements Name {
return this.names;
}
- /**
- * Get the String representation of this DistinguishedName. Depending on
- * the setting of property org.springframework.ldap.core.spacedDnFormat a
- * space will be added after each comma, to make the result more readable. Default is
- * compact representation, i.e. without any spaces.
- * @return a syntactically correct, properly escaped String representation of the
- * DistinguishedName.
- * @see #SPACED_DN_FORMAT_PROPERTY
- */
- @Override
- public String toString() {
- String spacedFormatting = System.getProperty(SPACED_DN_FORMAT_PROPERTY);
- if (!StringUtils.hasText(spacedFormatting)) {
- return format(COMPACT);
- }
- else {
- return format(NON_COMPACT);
- }
- }
-
/**
* Get the compact String representation of this DistinguishedName. Add
* no space after each comma, to make it compact.
@@ -544,6 +524,26 @@ public class DistinguishedName implements Name {
return this.getClass().hashCode() ^ getNames().hashCode();
}
+ /**
+ * Get the String representation of this DistinguishedName. Depending on
+ * the setting of property org.springframework.ldap.core.spacedDnFormat a
+ * space will be added after each comma, to make the result more readable. Default is
+ * compact representation, i.e. without any spaces.
+ * @return a syntactically correct, properly escaped String representation of the
+ * DistinguishedName.
+ * @see #SPACED_DN_FORMAT_PROPERTY
+ */
+ @Override
+ public String toString() {
+ String spacedFormatting = System.getProperty(SPACED_DN_FORMAT_PROPERTY);
+ if (!StringUtils.hasText(spacedFormatting)) {
+ return format(COMPACT);
+ }
+ else {
+ return format(NON_COMPACT);
+ }
+ }
+
/**
* Compare this instance to another object. Note that the comparison is done in order
* of significance, so the most significant Rdn is compared first, then the second and
diff --git a/core/src/main/java/org/springframework/ldap/core/LdapRdnComponent.java b/core/src/main/java/org/springframework/ldap/core/LdapRdnComponent.java
index 9a27db84..cfc9a450 100644
--- a/core/src/main/java/org/springframework/ldap/core/LdapRdnComponent.java
+++ b/core/src/main/java/org/springframework/ldap/core/LdapRdnComponent.java
@@ -149,16 +149,6 @@ public class LdapRdnComponent implements Comparable, Serializable {
return buff.toString();
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return getLdapEncoded();
- }
-
/**
* @return The LdapRdn as a string where the value is LDAP-encoded.
*/
@@ -182,16 +172,6 @@ public class LdapRdnComponent implements Comparable, Serializable {
}
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
- return this.key.toUpperCase().hashCode() ^ this.value.toUpperCase().hashCode();
- }
-
/*
* (non-Javadoc)
*
@@ -213,6 +193,26 @@ public class LdapRdnComponent implements Comparable, Serializable {
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return this.key.toUpperCase().hashCode() ^ this.value.toUpperCase().hashCode();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return getLdapEncoded();
+ }
+
/**
* Compare this instance to the supplied object.
* @param obj the object to compare to.
diff --git a/core/src/main/java/org/springframework/ldap/core/support/RangeOption.java b/core/src/main/java/org/springframework/ldap/core/support/RangeOption.java
index eb747dbd..ba099700 100644
--- a/core/src/main/java/org/springframework/ldap/core/support/RangeOption.java
+++ b/core/src/main/java/org/springframework/ldap/core/support/RangeOption.java
@@ -82,14 +82,6 @@ class RangeOption implements Comparable {
return getInitial() == 0 && getTerminal() == TERMINAL_END_OF_RANGE;
}
- @Override
- public String toString() {
- StringBuilder rangeBuilder = new StringBuilder();
- appendTo(rangeBuilder);
-
- return rangeBuilder.toString();
- }
-
void appendTo(StringBuilder rangeBuilder) {
rangeBuilder.append("Range=").append(this.initial);
@@ -191,6 +183,14 @@ class RangeOption implements Comparable {
return result;
}
+ @Override
+ public String toString() {
+ StringBuilder rangeBuilder = new StringBuilder();
+ appendTo(rangeBuilder);
+
+ return rangeBuilder.toString();
+ }
+
RangeOption nextRange(int pageSize) {
if (getTerminal() < 0) {
throw new IllegalStateException("Cannot generate next range, range-terminal: " + getTerminal());
diff --git a/core/src/main/java/org/springframework/ldap/filter/AndFilter.java b/core/src/main/java/org/springframework/ldap/filter/AndFilter.java
index 39196886..0cdaf9ad 100644
--- a/core/src/main/java/org/springframework/ldap/filter/AndFilter.java
+++ b/core/src/main/java/org/springframework/ldap/filter/AndFilter.java
@@ -23,7 +23,7 @@ package org.springframework.ldap.filter;
* AndFilter filter = new AndFilter();
* filter.and(new EqualsFilter("objectclass", "person");
* filter.and(new EqualsFilter("cn", "Some CN");
- * System.out.println(filter.encode());
+ * System.out.println(filter.encode());
*
*
* would result in: (&(objectclass=person)(cn=Some CN))
diff --git a/core/src/main/java/org/springframework/ldap/filter/OrFilter.java b/core/src/main/java/org/springframework/ldap/filter/OrFilter.java
index f3a705ac..5a68c229 100644
--- a/core/src/main/java/org/springframework/ldap/filter/OrFilter.java
+++ b/core/src/main/java/org/springframework/ldap/filter/OrFilter.java
@@ -23,7 +23,7 @@ package org.springframework.ldap.filter;
* OrFilter filter = new OrFilter();
* filter.or(new EqualsFilter("objectclass", "person");
* filter.or(new EqualsFilter("objectclass", "organizationalUnit");
- * System.out.println(filter.encode());
+ * System.out.println(filter.encode());
*
*
* would result in: (|(objectclass=person)(objectclass=organizationalUnit))
diff --git a/core/src/main/java/org/springframework/ldap/support/LdapUtils.java b/core/src/main/java/org/springframework/ldap/support/LdapUtils.java
index 0b7045c2..c4fb3492 100644
--- a/core/src/main/java/org/springframework/ldap/support/LdapUtils.java
+++ b/core/src/main/java/org/springframework/ldap/support/LdapUtils.java
@@ -596,7 +596,7 @@ public final class LdapUtils {
* dddd (four bytes of "d" treated as a 32-bit number in little-endian format)
* eeee (four bytes of "e" treated as a 32-bit number in little-endian format)
* ffff (four bytes of "f" treated as a 32-bit number in little-endian format)
- * etc.
+ * etc.
*
* So for example, if your SID is S-1-5-21-2127521184-1604012920-1887927527-72713, then your raw hex SID is
*