getUserDns(String username) {
diff --git a/ldap/src/main/java/org/springframework/security/ldap/authentication/LdapAuthenticationProvider.java b/ldap/src/main/java/org/springframework/security/ldap/authentication/LdapAuthenticationProvider.java
index 9b4573a0db5..f72c7a91ec5 100644
--- a/ldap/src/main/java/org/springframework/security/ldap/authentication/LdapAuthenticationProvider.java
+++ b/ldap/src/main/java/org/springframework/security/ldap/authentication/LdapAuthenticationProvider.java
@@ -95,12 +95,12 @@
*
*
* This would set up the provider to access an LDAP server with URL
- * ldap://monkeymachine:389/dc=springframework,dc=org. Authentication will be
+ * {@code ldap://monkeymachine:389/dc=springframework,dc=org}. Authentication will be
* performed by attempting to bind with the DN
- * uid=<user-login-name>,ou=people,dc=springframework,dc=org. After
+ * {@code uid=<user-login-name>,ou=people,dc=springframework,dc=org}. After
* successful authentication, roles will be assigned to the user by searching under the DN
- * ou=groups,dc=springframework,dc=org with the default filter
- * (member=<user's-DN>). The role name will be taken from the "ou"
+ * {@code ou=groups,dc=springframework,dc=org} with the default filter
+ * {@code (member=<user's-DN>)}. The role name will be taken from the "ou"
* attribute of each match.
*
* The authenticate method will reject empty passwords outright. LDAP servers may allow an
diff --git a/ldap/src/main/java/org/springframework/security/ldap/authentication/ad/ActiveDirectoryAuthenticationException.java b/ldap/src/main/java/org/springframework/security/ldap/authentication/ad/ActiveDirectoryAuthenticationException.java
index 202c82091f6..cbf74680c04 100644
--- a/ldap/src/main/java/org/springframework/security/ldap/authentication/ad/ActiveDirectoryAuthenticationException.java
+++ b/ldap/src/main/java/org/springframework/security/ldap/authentication/ad/ActiveDirectoryAuthenticationException.java
@@ -22,7 +22,7 @@
/**
*
- * Thrown as a translation of an {@link javax.naming.AuthenticationException} when
+ * Thrown as a translation of a {@code javax.naming.AuthenticationException} when
* attempting to authenticate against Active Directory using
* {@link ActiveDirectoryLdapAuthenticationProvider}. Typically this error is wrapped by
* an {@link AuthenticationException} since it does not provide a user friendly message.
diff --git a/ldap/src/main/java/org/springframework/security/ldap/authentication/package-info.java b/ldap/src/main/java/org/springframework/security/ldap/authentication/package-info.java
index da04eaa0ae1..485e5390d21 100644
--- a/ldap/src/main/java/org/springframework/security/ldap/authentication/package-info.java
+++ b/ldap/src/main/java/org/springframework/security/ldap/authentication/package-info.java
@@ -18,8 +18,8 @@
* The LDAP authentication provider package. Interfaces are provided for both
* authentication and retrieval of user roles from an LDAP server.
*
- * The main provider class is LdapAuthenticationProvider. This is configured with
- * an LdapAuthenticator instance and an LdapAuthoritiesPopulator. The
+ * The main provider class is {@code LdapAuthenticationProvider}. This is configured with
+ * an {@code LdapAuthenticator} instance and an {@code LdapAuthoritiesPopulator}. The
* latter is used to obtain the list of roles for the user.
*/
@NullMarked
diff --git a/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyAwareContextSource.java b/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyAwareContextSource.java
index 1d5e4996521..b2ff935f21f 100755
--- a/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyAwareContextSource.java
+++ b/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyAwareContextSource.java
@@ -28,11 +28,11 @@
import org.springframework.security.ldap.DefaultSpringSecurityContextSource;
/**
- * Extended version of the DefaultSpringSecurityContextSource which adds support
+ * Extended version of the {@code DefaultSpringSecurityContextSource} which adds support
* for the use of {@link PasswordPolicyControl} to make use of user account data stored in
* the directory.
*
- * When binding with specific username (not the userDn) property it will connect
+ * When binding with specific username (not the {@code userDn}) property it will connect
* first as the userDn, then reconnect as the user in order to retrieve any
* password-policy control sent with the response, even if an exception occurs.
*
diff --git a/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyControlExtractor.java b/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyControlExtractor.java
index 43a2e7eec0e..8f1896c215e 100644
--- a/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyControlExtractor.java
+++ b/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyControlExtractor.java
@@ -25,7 +25,7 @@
import org.jspecify.annotations.Nullable;
/**
- * Obtains the PasswordPolicyControl from a context for use by other classes.
+ * Obtains the {@code PasswordPolicyControl} from a context for use by other classes.
*
* @author Luke Taylor
* @since 3.0
diff --git a/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyErrorStatus.java b/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyErrorStatus.java
index fa3a1bb7af2..c509e281d00 100644
--- a/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyErrorStatus.java
+++ b/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyErrorStatus.java
@@ -17,7 +17,7 @@
package org.springframework.security.ldap.ppolicy;
/**
- * Defines status codes for use with PasswordPolicyException, with error codes
+ * Defines status codes for use with {@code PasswordPolicyException}, with error codes
* (for message source lookup) and default messages.
*
*
diff --git a/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyException.java b/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyException.java
index 537a09be596..9db89c9bf82 100644
--- a/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyException.java
+++ b/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyException.java
@@ -21,7 +21,7 @@
/**
* Generic exception raised by the ppolicy package.
*
- * The status property should be checked for more detail on the cause of the
+ * The {@code status} property should be checked for more detail on the cause of the
* exception.
*
* @author Luke Taylor
diff --git a/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyResponseControl.java b/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyResponseControl.java
index ae1ad524967..615375ac6cf 100755
--- a/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyResponseControl.java
+++ b/ldap/src/main/java/org/springframework/security/ldap/ppolicy/PasswordPolicyResponseControl.java
@@ -37,11 +37,11 @@
import org.springframework.dao.DataRetrievalFailureException;
/**
- * Represents the response control received when a PasswordPolicyControl is used
+ * Represents the response control received when a {@code PasswordPolicyControl} is used
* when binding to a directory. Currently tested with the OpenLDAP 2.3.19 implementation
* of the LDAP Password Policy Draft. It extends the request control with the control
- * specific data. This is accomplished by the properties timeBeforeExpiration,
- * graceLoginsRemaining.
+ * specific data. This is accomplished by the properties {@code timeBeforeExpiration},
+ * {@code graceLoginsRemaining}.
*
*
* @author Stefan Zoerner
diff --git a/ldap/src/main/java/org/springframework/security/ldap/search/FilterBasedLdapUserSearch.java b/ldap/src/main/java/org/springframework/security/ldap/search/FilterBasedLdapUserSearch.java
index 2277b45463a..969720538a9 100644
--- a/ldap/src/main/java/org/springframework/security/ldap/search/FilterBasedLdapUserSearch.java
+++ b/ldap/src/main/java/org/springframework/security/ldap/search/FilterBasedLdapUserSearch.java
@@ -57,7 +57,7 @@ public class FilterBasedLdapUserSearch implements LdapUserSearch {
/**
* The filter expression used in the user search. This is an LDAP search filter (as
* defined in 'RFC 2254') with optional arguments. See the documentation for the
- * search methods in {@link javax.naming.directory.DirContext DirContext} for
+ * {@code search} methods in {@code DirContext} for
* more information.
*
*
diff --git a/ldap/src/main/java/org/springframework/security/ldap/userdetails/DefaultLdapAuthoritiesPopulator.java b/ldap/src/main/java/org/springframework/security/ldap/userdetails/DefaultLdapAuthoritiesPopulator.java
index 7dcf417052d..0caec92bda5 100644
--- a/ldap/src/main/java/org/springframework/security/ldap/userdetails/DefaultLdapAuthoritiesPopulator.java
+++ b/ldap/src/main/java/org/springframework/security/ldap/userdetails/DefaultLdapAuthoritiesPopulator.java
@@ -48,10 +48,10 @@
* It obtains roles by performing a search for "groups" the user is a member of.
*
* A typical group search scenario would be where each group/role is specified using the
- * groupOfNames (or groupOfUniqueNames) LDAP objectClass and the user's
- * DN is listed in the member (or uniqueMember) attribute to indicate
+ * {@code groupOfNames} (or {@code groupOfUniqueNames}) LDAP objectClass and the user's
+ * DN is listed in the {@code member} (or {@code uniqueMember}) attribute to indicate
* that they should be assigned that role. The following LDIF sample has the groups stored
- * under the DN ou=groups,dc=springframework,dc=org and a group called
+ * under the DN {@code ou=groups,dc=springframework,dc=org} and a group called
* "developers" with "ben" and "luke" as members:
*
*
@@ -70,13 +70,13 @@
* ou: developer
*
*
- * The group search is performed within a DN specified by the groupSearchBase
- * property, which should be relative to the root DN of its ContextSource. If the
+ * The group search is performed within a DN specified by the {@code groupSearchBase}
+ * property, which should be relative to the root DN of its {@code ContextSource}. If the
* search base is null, group searching is disabled. The filter used in the search is
- * defined by the groupSearchFilter property, with the filter argument {0} being
+ * defined by the {@code groupSearchFilter} property, with the filter argument {0} being
* the full DN of the user. You can also optionally use the parameter {1}, which will be
* substituted with the username. You can also specify which attribute defines the role
- * name by setting the groupRoleAttribute property (the default is "cn").
+ * name by setting the {@code groupRoleAttribute} property (the default is "cn").
*
* The configuration below shows how the group search might be performed with the above
* schema.
@@ -97,9 +97,9 @@
* A search for roles for user "uid=ben,ou=people,dc=springframework,dc=org" would return
* the single granted authority "ROLE_DEVELOPER".
*
- * The single-level search is performed by default. Setting the searchSubTree
+ * The single-level search is performed by default. Setting the {@code searchSubTree}
* property to true will enable a search of the entire subtree under
- * groupSearchBase.
+ * {@code groupSearchBase}.
*
* @author Luke Taylor
* @author Filip Hanik
@@ -155,7 +155,7 @@ public class DefaultLdapAuthoritiesPopulator implements LdapAuthoritiesPopulator
private Function