From afc35b1a55801c8c6ad3b849dae348242761ec2b Mon Sep 17 00:00:00 2001 From: hanweiwei Date: Sat, 4 Apr 2026 12:42:09 +0800 Subject: [PATCH] Remove javadoc warnings for spring-security-ldap Replace deprecated tags with {@code} and fix unresolvable {@link javax.naming.*} references to {@code} across the ldap module. Closes gh-18457 Signed-off-by: hanweiwei --- .../ldap/DefaultLdapUsernameToDnMapper.java | 8 +++---- .../DefaultSpringSecurityContextSource.java | 12 +++++----- .../security/ldap/LdapUtils.java | 4 ++-- .../ldap/SpringSecurityLdapTemplate.java | 4 ++-- .../AbstractLdapAuthenticationProvider.java | 10 ++++---- .../AbstractLdapAuthenticator.java | 4 ++-- .../LdapAuthenticationProvider.java | 8 +++---- ...ctiveDirectoryAuthenticationException.java | 2 +- .../ldap/authentication/package-info.java | 4 ++-- .../PasswordPolicyAwareContextSource.java | 4 ++-- .../PasswordPolicyControlExtractor.java | 2 +- .../ppolicy/PasswordPolicyErrorStatus.java | 2 +- .../ldap/ppolicy/PasswordPolicyException.java | 2 +- .../PasswordPolicyResponseControl.java | 6 ++--- .../search/FilterBasedLdapUserSearch.java | 2 +- .../DefaultLdapAuthoritiesPopulator.java | 24 +++++++++---------- .../ldap/userdetails/InetOrgPerson.java | 4 ++-- .../userdetails/LdapAuthoritiesPopulator.java | 2 +- .../ldap/userdetails/LdapUserDetailsImpl.java | 2 +- .../userdetails/LdapUserDetailsManager.java | 2 +- .../userdetails/LdapUserDetailsMapper.java | 4 ++-- .../userdetails/LdapUserDetailsService.java | 6 ++--- .../NestedLdapAuthoritiesPopulator.java | 2 +- .../security/ldap/userdetails/Person.java | 2 +- 24 files changed, 61 insertions(+), 61 deletions(-) diff --git a/ldap/src/main/java/org/springframework/security/ldap/DefaultLdapUsernameToDnMapper.java b/ldap/src/main/java/org/springframework/security/ldap/DefaultLdapUsernameToDnMapper.java index 31e6d8561c2..76763b25df0 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/DefaultLdapUsernameToDnMapper.java +++ b/ldap/src/main/java/org/springframework/security/ldap/DefaultLdapUsernameToDnMapper.java @@ -21,10 +21,10 @@ import org.springframework.ldap.support.LdapNameBuilder; /** - * This implementation appends a name component to the userDnBase context using - * the usernameAttributeName property. So if the uid attribute is used - * to store the username, and the base DN is cn=users and we are creating a new - * user called "sam", then the DN will be uid=sam,cn=users. + * This implementation appends a name component to the {@code userDnBase} context using + * the {@code usernameAttributeName} property. So if the {@code uid} attribute is used + * to store the username, and the base DN is {@code cn=users} and we are creating a new + * user called "sam", then the DN will be {@code uid=sam,cn=users}. * * @author Luke Taylor */ diff --git a/ldap/src/main/java/org/springframework/security/ldap/DefaultSpringSecurityContextSource.java b/ldap/src/main/java/org/springframework/security/ldap/DefaultSpringSecurityContextSource.java index fc06923159a..599970eaf63 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/DefaultSpringSecurityContextSource.java +++ b/ldap/src/main/java/org/springframework/security/ldap/DefaultSpringSecurityContextSource.java @@ -34,18 +34,18 @@ import org.springframework.util.Assert; /** - * ContextSource implementation which uses Spring LDAP's LdapContextSource as a + * ContextSource implementation which uses Spring LDAP's {@code LdapContextSource} as a * base class. Used internally by the Spring Security LDAP namespace configuration. *

- * From Spring Security 3.0, Spring LDAP 1.3 is used and the ContextSource + * From Spring Security 3.0, Spring LDAP 1.3 is used and the {@code ContextSource} * interface provides support for binding with a username and password. As a result, - * Spring LDAP ContextSource implementations such as LdapContextSource + * Spring LDAP {@code ContextSource} implementations such as {@code LdapContextSource} * may be used directly with Spring Security. *

* Spring LDAP 1.3 doesn't have JVM-level LDAP connection pooling enabled by default. This - * class sets the pooled property to true, but customizes the - * {@link DirContextAuthenticationStrategy} used to disable pooling when the DN - * doesn't match the userDn property. This prevents pooling for calls to + * class sets the {@code pooled} property to true, but customizes the + * {@link DirContextAuthenticationStrategy} used to disable pooling when the {@code DN} + * doesn't match the {@code userDn} property. This prevents pooling for calls to * {@link #getContext(String, String)} to authenticate as specific users. * * @author Luke Taylor diff --git a/ldap/src/main/java/org/springframework/security/ldap/LdapUtils.java b/ldap/src/main/java/org/springframework/security/ldap/LdapUtils.java index 19e1241ea36..dad55c044b2 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/LdapUtils.java +++ b/ldap/src/main/java/org/springframework/security/ldap/LdapUtils.java @@ -125,7 +125,7 @@ public static String convertPasswordToString(Object passObj) { /** * Works out the root DN for an LDAP URL. *

- * For example, the URL ldap://monkeymachine:11389/dc=springframework,dc=org + * For example, the URL {@code ldap://monkeymachine:11389/dc=springframework,dc=org} * has the root DN "dc=springframework,dc=org". *

* @param url the LDAP URL @@ -151,7 +151,7 @@ public static String parseRootDnFromUrl(String url) { /** * Parses the supplied LDAP URL. * @param url the URL (e.g. - * ldap://monkeymachine:11389/dc=springframework,dc=org). + * {@code ldap://monkeymachine:11389/dc=springframework,dc=org}). * @return the URI object created from the URL * @throws IllegalArgumentException if the URL is null, empty or the URI syntax is * invalid. diff --git a/ldap/src/main/java/org/springframework/security/ldap/SpringSecurityLdapTemplate.java b/ldap/src/main/java/org/springframework/security/ldap/SpringSecurityLdapTemplate.java index 593b0cc9fe2..0b9526bc572 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/SpringSecurityLdapTemplate.java +++ b/ldap/src/main/java/org/springframework/security/ldap/SpringSecurityLdapTemplate.java @@ -203,7 +203,7 @@ public Set>> searchForMultipleAttributeValues(String ba /** * Returns the DN for the context representing this LDAP record. By default this is - * using {@link javax.naming.Context#getNameInNamespace()} instead of + * using {@code Context#getNameInNamespace()} instead of * {@link org.springframework.ldap.core.DirContextAdapter#getDn()} since the latter * returns a partial DN if a base has been specified. * @param adapter - the Context to extract the DN from @@ -249,7 +249,7 @@ private void extractStringAttributeValues(DirContextAdapter adapter, Map - * Ignores PartialResultException if thrown, for compatibility with Active + * Ignores {@code PartialResultException} if thrown, for compatibility with Active * Directory (see {@link LdapTemplate#setIgnorePartialResultException(boolean)}). * @param base the search base, relative to the base context supplied by the context * source. diff --git a/ldap/src/main/java/org/springframework/security/ldap/authentication/AbstractLdapAuthenticationProvider.java b/ldap/src/main/java/org/springframework/security/ldap/authentication/AbstractLdapAuthenticationProvider.java index fa6f04f138f..5ed79b80043 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/authentication/AbstractLdapAuthenticationProvider.java +++ b/ldap/src/main/java/org/springframework/security/ldap/authentication/AbstractLdapAuthenticationProvider.java @@ -95,8 +95,8 @@ protected abstract Collection loadUserAuthorities(Di * Creates the final {@code Authentication} object which will be returned from the * {@code authenticate} method. * @param authentication the original authentication request token - * @param user the UserDetails instance returned by the configured - * UserDetailsContextMapper. + * @param user the {@code UserDetails} instance returned by the configured + * {@code UserDetailsContextMapper}. * @return the Authentication object for the fully authenticated user. */ protected Authentication createSuccessfulAuthentication(UsernamePasswordAuthenticationToken authentication, @@ -149,12 +149,12 @@ public void setAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper) { } /** - * Allows a custom strategy to be used for creating the UserDetails which - * will be stored as the principal in the Authentication returned by the + * Allows a custom strategy to be used for creating the {@code UserDetails} which + * will be stored as the principal in the {@code Authentication} returned by the * {@link #createSuccessfulAuthentication(org.springframework.security.authentication.UsernamePasswordAuthenticationToken, org.springframework.security.core.userdetails.UserDetails)} * method. * @param userDetailsContextMapper the strategy instance. If not set, defaults to a - * simple LdapUserDetailsMapper. + * simple {@code LdapUserDetailsMapper}. */ public void setUserDetailsContextMapper(UserDetailsContextMapper userDetailsContextMapper) { Assert.notNull(userDetailsContextMapper, "UserDetailsContextMapper must not be null"); diff --git a/ldap/src/main/java/org/springframework/security/ldap/authentication/AbstractLdapAuthenticator.java b/ldap/src/main/java/org/springframework/security/ldap/authentication/AbstractLdapAuthenticator.java index 92a28d3e6a1..5041fc8bde6 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/authentication/AbstractLdapAuthenticator.java +++ b/ldap/src/main/java/org/springframework/security/ldap/authentication/AbstractLdapAuthenticator.java @@ -86,9 +86,9 @@ protected ContextSource getContextSource() { /** * Builds list of possible DNs for the user, worked out from the - * userDnPatterns property. + * {@code userDnPatterns} property. * @param username the user's login name - * @return the list of possible DN matches, empty if userDnPatterns wasn't + * @return the list of possible DN matches, empty if {@code userDnPatterns} wasn't * set. */ protected List 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>, @Nullable GrantedAuthority> authorityMapper; /** - * Constructor for group search scenarios. userRoleAttributes may still be + * Constructor for group search scenarios. {@code userRoleAttributes} may still be * set as a property. * @param contextSource supplies the contexts used to search for user roles. * @param groupSearchBase if this is an empty string the search will be performed from @@ -277,7 +277,7 @@ public void setGroupSearchFilter(String groupSearchFilter) { /** * Sets the prefix which will be prepended to the values loaded from the directory. - * Defaults to "ROLE_" for compatibility with RoleVoter. + * Defaults to "ROLE_" for compatibility with {@code RoleVoter}. */ public void setRolePrefix(String rolePrefix) { Assert.notNull(rolePrefix, "rolePrefix must not be null"); @@ -288,7 +288,7 @@ public void setRolePrefix(String rolePrefix) { * If set to true, a subtree scope search will be performed. If false a single-level * search is used. * @param searchSubtree set to true to enable searching of the entire tree below the - * groupSearchBase. + * {@code groupSearchBase}. */ public void setSearchSubtree(boolean searchSubtree) { int searchScope = searchSubtree ? SearchControls.SUBTREE_SCOPE : SearchControls.ONELEVEL_SCOPE; diff --git a/ldap/src/main/java/org/springframework/security/ldap/userdetails/InetOrgPerson.java b/ldap/src/main/java/org/springframework/security/ldap/userdetails/InetOrgPerson.java index f11b6f89386..7a0d285d3d6 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/userdetails/InetOrgPerson.java +++ b/ldap/src/main/java/org/springframework/security/ldap/userdetails/InetOrgPerson.java @@ -26,10 +26,10 @@ /** * UserDetails implementation whose properties are based on a subset of the LDAP schema - * for inetOrgPerson. + * for {@code inetOrgPerson}. * *

- * The username will be mapped from the uid attribute by default. + * The username will be mapped from the {@code uid} attribute by default. * * @author Luke Taylor */ diff --git a/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapAuthoritiesPopulator.java b/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapAuthoritiesPopulator.java index 629c177ba3d..0e658d43d0f 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapAuthoritiesPopulator.java +++ b/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapAuthoritiesPopulator.java @@ -24,7 +24,7 @@ /** * Obtains a list of granted authorities for an Ldap user. *

- * Used by the LdapAuthenticationProvider once a user has been authenticated to + * Used by the {@code LdapAuthenticationProvider} once a user has been authenticated to * create the final user details object. *

* diff --git a/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsImpl.java b/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsImpl.java index 2a0d2800cf9..c61aa103067 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsImpl.java +++ b/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsImpl.java @@ -40,7 +40,7 @@ * An instance may be created as the result of a search, or when user information is * retrieved during authentication. *

- * An instance of this class will be used by the LdapAuthenticationProvider to + * An instance of this class will be used by the {@code LdapAuthenticationProvider} to * construct the final user details object that it returns. *

* The {@code equals} and {@code hashcode} methods are implemented using the {@code Dn} diff --git a/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsManager.java b/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsManager.java index 2a5f296b917..9ea49d50a40 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsManager.java +++ b/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsManager.java @@ -365,7 +365,7 @@ public void setUserDetailsMapper(UserDetailsContextMapper userDetailsMapper) { * Sets the name of the multi-valued attribute which holds the DNs of users who are * members of a group. *

- * Usually this will be uniquemember (the default value) or member. + * Usually this will be {@code uniquemember} (the default value) or {@code member}. *

* @param groupMemberAttributeName the name of the attribute used to store group * members. diff --git a/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsMapper.java b/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsMapper.java index ff39c02f1ca..2aa835c5a1b 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsMapper.java +++ b/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsMapper.java @@ -119,7 +119,7 @@ protected String mapPassword(Object passwordValue) { * object creation. *

* The default implementation converts string attributes to roles, making use of the - * rolePrefix and convertToUpperCase properties. Non-String + * {@code rolePrefix} and {@code convertToUpperCase} properties. Non-String * attributes are ignored. *

* @param role the attribute returned from @@ -156,7 +156,7 @@ public void setPasswordAttributeName(String passwordAttributeName) { /** * The names of any attributes in the user's entry which represent application roles. - * These will be converted to GrantedAuthoritys and added to the list in the + * These will be converted to {@code GrantedAuthority}s and added to the list in the * returned LdapUserDetails object. The attribute values must be Strings by default. * @param roleAttributes the names of the role attributes. */ diff --git a/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsService.java b/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsService.java index 9d951e31ff5..e3e83f80372 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsService.java +++ b/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsService.java @@ -29,9 +29,9 @@ /** * LDAP implementation of UserDetailsService based around an {@link LdapUserSearch} and an - * {@link LdapAuthoritiesPopulator}. The final UserDetails object returned from - * loadUserByUsername is created by the configured - * UserDetailsContextMapper. + * {@link LdapAuthoritiesPopulator}. The final {@code UserDetails} object returned from + * {@code loadUserByUsername} is created by the configured + * {@code UserDetailsContextMapper}. * * @author Luke Taylor */ diff --git a/ldap/src/main/java/org/springframework/security/ldap/userdetails/NestedLdapAuthoritiesPopulator.java b/ldap/src/main/java/org/springframework/security/ldap/userdetails/NestedLdapAuthoritiesPopulator.java index e64429a6d0c..4ce5146d5bb 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/userdetails/NestedLdapAuthoritiesPopulator.java +++ b/ldap/src/main/java/org/springframework/security/ldap/userdetails/NestedLdapAuthoritiesPopulator.java @@ -137,7 +137,7 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula private int maxSearchDepth = 10; /** - * Constructor for group search scenarios. userRoleAttributes may still be + * Constructor for group search scenarios. {@code userRoleAttributes} may still be * set as a property. * @param contextSource supplies the contexts used to search for user roles. * @param groupSearchBase if this is an empty string the search will be performed from diff --git a/ldap/src/main/java/org/springframework/security/ldap/userdetails/Person.java b/ldap/src/main/java/org/springframework/security/ldap/userdetails/Person.java index 7deb644ae70..02c60b13cc9 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/userdetails/Person.java +++ b/ldap/src/main/java/org/springframework/security/ldap/userdetails/Person.java @@ -29,7 +29,7 @@ /** * UserDetails implementation whose properties are based on the LDAP schema for - * Person. + * {@code Person}. * * @author Luke * @since 2.0