This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new b62222a326 Remove unnecessary Javadoc b62222a326 is described below commit b62222a326c4d96783d35be1ca0511f67c90c347 Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Mar 9 14:37:46 2023 +0000 Remove unnecessary Javadoc --- java/org/apache/catalina/Realm.java | 47 +++++---- java/org/apache/catalina/realm/CombinedRealm.java | 62 ++---------- .../org/apache/catalina/realm/DataSourceRealm.java | 19 +--- .../catalina/realm/JAASMemoryLoginModule.java | 42 +------- java/org/apache/catalina/realm/JAASRealm.java | 36 ------- java/org/apache/catalina/realm/JNDIRealm.java | 10 +- java/org/apache/catalina/realm/LockOutRealm.java | 39 +------ java/org/apache/catalina/realm/MemoryRealm.java | 25 ----- java/org/apache/catalina/realm/RealmBase.java | 112 ++------------------- .../apache/catalina/realm/UserDatabaseRealm.java | 15 +-- 10 files changed, 55 insertions(+), 352 deletions(-) diff --git a/java/org/apache/catalina/Realm.java b/java/org/apache/catalina/Realm.java index 4ea8ae577b..6c0096b9ac 100644 --- a/java/org/apache/catalina/Realm.java +++ b/java/org/apache/catalina/Realm.java @@ -63,8 +63,8 @@ public interface Realm extends Contained { * Try to authenticate with the specified username. * * @param username Username of the Principal to look up - * @return the associated principal, or <code>null</code> if none is - * associated. + * + * @return the associated principal, or {@code null} if none is associated. */ Principal authenticate(String username); @@ -76,7 +76,8 @@ public interface Realm extends Contained { * @param username Username of the Principal to look up * @param credentials Password or other credentials to use in * authenticating this username - * @return the associated principal, or <code>null</code> if there is none + * + * @return the associated principal, or {@code null} if there is none */ Principal authenticate(String username, String credentials); @@ -92,12 +93,13 @@ public interface Realm extends Contained { * for this request * @param nc the nonce counter * @param cnonce the client chosen nonce - * @param qop the "quality of protection" (<code>nc</code> and <code>cnonce</code> - * will only be used, if <code>qop</code> is not <code>null</code>). + * @param qop the "quality of protection" ({@code nc} and {@code cnonce} + * will only be used, if {@code qop} is not {@code null}). * @param realm Realm name * @param md5a2 Second MD5 digest used to calculate the digest : * MD5(Method + ":" + uri) - * @return the associated principal, or <code>null</code> if there is none. + * + * @return the associated principal, or {@code null} if there is none. */ Principal authenticate(String username, String digest, String nonce, String nc, String cnonce, @@ -106,22 +108,23 @@ public interface Realm extends Contained { /** - * Try to authenticate using a {@link GSSContext} + * Try to authenticate using a {@link GSSContext}. * * @param gssContext The gssContext processed by the {@link Authenticator}. * @param storeCreds Should the realm attempt to store the delegated * credentials in the returned Principal? - * @return the associated principal, or <code>null</code> if there is none + * @return the associated principal, or {@code null} if there is none */ Principal authenticate(GSSContext gssContext, boolean storeCreds); /** - * Try to authenticate using {@link X509Certificate}s + * Try to authenticate using a chain of {@link X509Certificate}s. * * @param certs Array of client certificates, with the first one in * the array being the certificate of the client itself. - * @return the associated principal, or <code>null</code> if there is none + * + * @return the associated principal, or {@code null} if there is none */ Principal authenticate(X509Certificate certs[]); @@ -139,9 +142,10 @@ public interface Realm extends Contained { * this request. * * @param request Request we are processing - * @param context {@link Context} for this request - * @return the configured {@link SecurityConstraint}, of <code>null</code> - * if there is none + * @param context Context the Request is mapped to + * + * @return the configured {@link SecurityConstraint}, or {@code null} if + * there is none */ SecurityConstraint [] findSecurityConstraints(Request request, Context context); @@ -154,8 +158,9 @@ public interface Realm extends Contained { * @param response Response we are creating * @param constraint Security constraint we are enforcing * @param context The Context to which client of this class is attached. - * @return <code>true</code> if this constraint is satisfied and processing - * should continue, or <code>false</code> otherwise + * + * @return {@code true} if this constraint is satisfied and processing + * should continue, or {@code false} otherwise * * @exception IOException if an input/output error occurs */ @@ -173,9 +178,10 @@ public interface Realm extends Contained { * @param wrapper wrapper context for evaluating role * @param principal Principal for whom the role is to be checked * @param role Security role to be checked - * @return <code>true</code> if the specified Principal has the specified + * + * @return {@code true} if the specified Principal has the specified * security role, within the context of this Realm; otherwise return - * <code>false</code>. + * {@code false}. */ boolean hasRole(Wrapper wrapper, Principal principal, String role); @@ -187,8 +193,9 @@ public interface Realm extends Contained { * @param request Request we are processing * @param response Response we are creating * @param constraint Security constraint being checked - * @return <code>true</code> if this constraint - * was not violated and processing should continue, or <code>false</code> + * + * @return {@code true} if this constraint + * was not violated and processing should continue, or {@code false} * if we have created a response already. * * @exception IOException if an input/output error occurs @@ -218,7 +225,7 @@ public interface Realm extends Contained { /** * Return the availability of the realm for authentication. - * @return <code>true</code> if the realm is able to perform authentication + * @return {@code true} if the realm is able to perform authentication */ boolean isAvailable(); diff --git a/java/org/apache/catalina/realm/CombinedRealm.java b/java/org/apache/catalina/realm/CombinedRealm.java index afc7ee7cbd..2ed646241e 100644 --- a/java/org/apache/catalina/realm/CombinedRealm.java +++ b/java/org/apache/catalina/realm/CombinedRealm.java @@ -86,6 +86,7 @@ public class CombinedRealm extends RealmBase { return result; } + /** * @return the list of Realms contained by this Realm. */ @@ -93,16 +94,7 @@ public class CombinedRealm extends RealmBase { return realms.toArray(new Realm[0]); } - /** - * Return the Principal associated with the specified username, which matches the digest calculated using the given - * parameters using the method described in RFC 2069; otherwise return <code>null</code>. - * - * @param username Username of the Principal to look up - * @param clientDigest Digest which has been submitted by the client - * @param nonce Unique (or supposedly unique) token which has been used for this request - * @param realmName Realm name - * @param md5a2 Second MD5 digest used to calculate the digest : MD5(Method + ":" + uri) - */ + @Override public Principal authenticate(String username, String clientDigest, String nonce, String nc, String cnonce, String qop, String realmName, String md5a2) { @@ -130,11 +122,6 @@ public class CombinedRealm extends RealmBase { } - /** - * Return the Principal associated with the specified user name otherwise return <code>null</code>. - * - * @param username User name of the Principal to look up - */ @Override public Principal authenticate(String username) { Principal authenticatedUser = null; @@ -161,13 +148,6 @@ public class CombinedRealm extends RealmBase { } - /** - * Return the Principal associated with the specified username and credentials, if there is one; otherwise return - * <code>null</code>. - * - * @param username Username of the Principal to look up - * @param credentials Password or other credentials to use in authenticating this username - */ @Override public Principal authenticate(String username, String credentials) { Principal authenticatedUser = null; @@ -194,11 +174,6 @@ public class CombinedRealm extends RealmBase { } - /** - * Set the Container with which this Realm has been associated. - * - * @param container The associated Container - */ @Override public void setContainer(Container container) { for (Realm realm : realms) { @@ -214,13 +189,6 @@ public class CombinedRealm extends RealmBase { } - /** - * Prepare for the beginning of active use of the public methods of this component and implement the requirements of - * {@link org.apache.catalina.util.LifecycleBase#startInternal()}. - * - * @exception LifecycleException if this component detects a fatal error that prevents this component from being - * used - */ @Override protected void startInternal() throws LifecycleException { // Start 'sub-realms' then this one @@ -248,12 +216,6 @@ public class CombinedRealm extends RealmBase { } - /** - * Gracefully terminate the active use of the public methods of this component and implement the requirements of - * {@link org.apache.catalina.util.LifecycleBase#stopInternal()}. - * - * @exception LifecycleException if this component detects a fatal error that needs to be reported - */ @Override protected void stopInternal() throws LifecycleException { // Stop this realm, then the sub-realms (reverse order to start) @@ -279,6 +241,7 @@ public class CombinedRealm extends RealmBase { super.destroyInternal(); } + /** * Delegate the backgroundProcess call to all sub-realms. */ @@ -291,13 +254,7 @@ public class CombinedRealm extends RealmBase { } } - /** - * Return the Principal associated with the specified chain of X509 client certificates. If there is none, return - * <code>null</code>. - * - * @param certs Array of client certificates, with the first one in the array being the certificate of the client - * itself. - */ + @Override public Principal authenticate(X509Certificate[] certs) { Principal authenticatedUser = null; @@ -327,9 +284,7 @@ public class CombinedRealm extends RealmBase { return authenticatedUser; } - /** - * {@inheritDoc} - */ + @Override public Principal authenticate(GSSContext gssContext, boolean storeCred) { if (gssContext.isEstablished()) { @@ -367,9 +322,6 @@ public class CombinedRealm extends RealmBase { return null; } - /** - * {@inheritDoc} - */ @SuppressWarnings("deprecation") @Override public Principal authenticate(GSSName gssName, GSSCredential gssCredential) { @@ -404,9 +356,7 @@ public class CombinedRealm extends RealmBase { return authenticatedUser; } - /** - * {@inheritDoc} - */ + @Override public boolean hasRole(Wrapper wrapper, Principal principal, String role) { for (Realm realm : realms) { diff --git a/java/org/apache/catalina/realm/DataSourceRealm.java b/java/org/apache/catalina/realm/DataSourceRealm.java index 278ba53c42..1bfbbaef95 100644 --- a/java/org/apache/catalina/realm/DataSourceRealm.java +++ b/java/org/apache/catalina/realm/DataSourceRealm.java @@ -233,15 +233,11 @@ public class DataSourceRealm extends RealmBase { // --------------------------------------------------------- Public Methods /** - * Return the Principal associated with the specified username and credentials, if there is one; otherwise return - * <code>null</code>. If there are any errors with the JDBC connection, executing the query or anything we return - * null (don't authenticate). This event is also logged, and the connection will be closed so that a subsequent + * {@inheritDoc} + * <p> + * If there are any errors with the JDBC connection, executing the query or anything this method returns + * null (doesn't authenticate). This event is also logged, and the connection will be closed so that a subsequent * request will automatically re-open it. - * - * @param username Username of the Principal to look up - * @param credentials Password or other credentials to use in authenticating this username - * - * @return the associated principal, or <code>null</code> if there is none. */ @Override public Principal authenticate(String username, String credentials) { @@ -545,13 +541,6 @@ public class DataSourceRealm extends RealmBase { // ------------------------------------------------------ Lifecycle Methods - /** - * Prepare for the beginning of active use of the public methods of this component and implement the requirements of - * {@link org.apache.catalina.util.LifecycleBase#startInternal()}. - * - * @exception LifecycleException if this component detects a fatal error that prevents this component from being - * used - */ @Override protected void startInternal() throws LifecycleException { diff --git a/java/org/apache/catalina/realm/JAASMemoryLoginModule.java b/java/org/apache/catalina/realm/JAASMemoryLoginModule.java index a8ab8982a2..5be13b7c6b 100644 --- a/java/org/apache/catalina/realm/JAASMemoryLoginModule.java +++ b/java/org/apache/catalina/realm/JAASMemoryLoginModule.java @@ -126,15 +126,7 @@ public class JAASMemoryLoginModule extends MemoryRealm implements LoginModule { } } - /** - * Phase 2 of authenticating a <code>Subject</code> when Phase 1 fails. This method is called if the - * <code>LoginContext</code> failed somewhere in the overall authentication chain. - * - * @return <code>true</code> if this method succeeded, or <code>false</code> if this <code>LoginModule</code> should - * be ignored - * - * @exception LoginException if the abort fails - */ + @Override public boolean abort() throws LoginException { @@ -157,15 +149,6 @@ public class JAASMemoryLoginModule extends MemoryRealm implements LoginModule { } - /** - * Phase 2 of authenticating a <code>Subject</code> when Phase 1 was successful. This method is called if the - * <code>LoginContext</code> succeeded in the overall authentication chain. - * - * @return <code>true</code> if the authentication succeeded, or <code>false</code> if this <code>LoginModule</code> - * should be ignored - * - * @exception LoginException if the commit fails - */ @Override public boolean commit() throws LoginException { if (log.isDebugEnabled()) { @@ -196,14 +179,6 @@ public class JAASMemoryLoginModule extends MemoryRealm implements LoginModule { } - /** - * Initialize this <code>LoginModule</code> with the specified configuration information. - * - * @param subject The <code>Subject</code> to be authenticated - * @param callbackHandler A <code>CallbackHandler</code> for communicating with the end user as necessary - * @param sharedState State information shared with other <code>LoginModule</code> instances - * @param options Configuration information for this specific <code>LoginModule</code> instance - */ @Override public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) { @@ -257,14 +232,6 @@ public class JAASMemoryLoginModule extends MemoryRealm implements LoginModule { } - /** - * Phase 1 of authenticating a <code>Subject</code>. - * - * @return <code>true</code> if the authentication succeeded, or <code>false</code> if this <code>LoginModule</code> - * should be ignored - * - * @exception LoginException if the authentication fails - */ @Override public boolean login() throws LoginException { // Set up our CallbackHandler requests @@ -333,13 +300,6 @@ public class JAASMemoryLoginModule extends MemoryRealm implements LoginModule { } - /** - * Log out this user. - * - * @return <code>true</code> in all cases because the <code>LoginModule</code> should not be ignored - * - * @exception LoginException if logging out failed - */ @Override public boolean logout() throws LoginException { subject.getPrincipals().remove(principal); diff --git a/java/org/apache/catalina/realm/JAASRealm.java b/java/org/apache/catalina/realm/JAASRealm.java index 9c0e120454..705f143db3 100644 --- a/java/org/apache/catalina/realm/JAASRealm.java +++ b/java/org/apache/catalina/realm/JAASRealm.java @@ -318,36 +318,12 @@ public class JAASRealm extends RealmBase { // --------------------------------------------------------- Public Methods - /** - * Return the <code>Principal</code> associated with the specified username and credentials, if there is one; - * otherwise return <code>null</code>. - * - * @param username Username of the <code>Principal</code> to look up - * @param credentials Password or other credentials to use in authenticating this username - * - * @return the associated principal, or <code>null</code> if there is none. - */ @Override public Principal authenticate(String username, String credentials) { return authenticate(username, new JAASCallbackHandler(this, username, credentials)); } - /** - * Return the <code>Principal</code> associated with the specified username and digest, if there is one; otherwise - * return <code>null</code>. - * - * @param username Username of the <code>Principal</code> to look up - * @param clientDigest Digest to use in authenticating this username - * @param nonce Server generated nonce - * @param nc Nonce count - * @param cnonce Client generated nonce - * @param qop Quality of protection applied to the message - * @param realmName Realm name - * @param md5a2 Second MD5 digest used to calculate the digest MD5(Method + ":" + uri) - * - * @return the associated principal, or <code>null</code> if there is none. - */ @Override public Principal authenticate(String username, String clientDigest, String nonce, String nc, String cnonce, String qop, String realmName, String md5a2) { @@ -356,12 +332,8 @@ public class JAASRealm extends RealmBase { } - // -------------------------------------------------------- Package Methods - - // ------------------------------------------------------ Protected Methods - /** * Perform the actual JAAS authentication. * @@ -611,14 +583,6 @@ public class JAASRealm extends RealmBase { // ------------------------------------------------------ Lifecycle Methods - - /** - * Prepare for the beginning of active use of the public methods of this component and implement the requirements of - * {@link org.apache.catalina.util.LifecycleBase#startInternal()}. - * - * @exception LifecycleException if this component detects a fatal error that prevents this component from being - * used - */ @Override protected void startInternal() throws LifecycleException { diff --git a/java/org/apache/catalina/realm/JNDIRealm.java b/java/org/apache/catalina/realm/JNDIRealm.java index 5b391ff154..a04f4261d2 100644 --- a/java/org/apache/catalina/realm/JNDIRealm.java +++ b/java/org/apache/catalina/realm/JNDIRealm.java @@ -1129,15 +1129,11 @@ public class JNDIRealm extends RealmBase { // ---------------------------------------------------------- Realm Methods /** - * Return the Principal associated with the specified username and credentials, if there is one; otherwise return - * <code>null</code>. If there are any errors with the JDBC connection, executing the query or anything we return + * {@inheritDoc} + * <p> + * If there are any errors with the JNDI connection, executing the query or anything we return * null (don't authenticate). This event is also logged, and the connection will be closed so that a subsequent * request will automatically re-open it. - * - * @param username Username of the Principal to look up - * @param credentials Password or other credentials to use in authenticating this username - * - * @return the associated principal, or <code>null</code> if there is none. */ @Override public Principal authenticate(String username, String credentials) { diff --git a/java/org/apache/catalina/realm/LockOutRealm.java b/java/org/apache/catalina/realm/LockOutRealm.java index fe220e6c7b..43fad7af5f 100644 --- a/java/org/apache/catalina/realm/LockOutRealm.java +++ b/java/org/apache/catalina/realm/LockOutRealm.java @@ -77,13 +77,6 @@ public class LockOutRealm extends CombinedRealm { protected Map<String, LockRecord> failedUsers = null; - /** - * Prepare for the beginning of active use of the public methods of this component and implement the requirements of - * {@link org.apache.catalina.util.LifecycleBase#startInternal()}. - * - * @exception LifecycleException if this component detects a fatal error that prevents this component from being - * used - */ @Override protected synchronized void startInternal() throws LifecycleException { /* @@ -114,16 +107,6 @@ public class LockOutRealm extends CombinedRealm { } - /** - * Return the Principal associated with the specified username, which matches the digest calculated using the given - * parameters using the method described in RFC 2069; otherwise return <code>null</code>. - * - * @param username Username of the Principal to look up - * @param clientDigest Digest which has been submitted by the client - * @param nonce Unique (or supposedly unique) token which has been used for this request - * @param realmName Realm name - * @param md5a2 Second MD5 digest used to calculate the digest : MD5(Method + ":" + uri) - */ @Override public Principal authenticate(String username, String clientDigest, String nonce, String nc, String cnonce, String qop, String realmName, String md5a2) { @@ -134,13 +117,6 @@ public class LockOutRealm extends CombinedRealm { } - /** - * Return the Principal associated with the specified username and credentials, if there is one; otherwise return - * <code>null</code>. - * - * @param username Username of the Principal to look up - * @param credentials Password or other credentials to use in authenticating this username - */ @Override public Principal authenticate(String username, String credentials) { Principal authenticatedUser = super.authenticate(username, credentials); @@ -148,13 +124,6 @@ public class LockOutRealm extends CombinedRealm { } - /** - * Return the Principal associated with the specified chain of X509 client certificates. If there is none, return - * <code>null</code>. - * - * @param certs Array of client certificates, with the first one in the array being the certificate of the client - * itself. - */ @Override public Principal authenticate(X509Certificate[] certs) { String username = null; @@ -167,9 +136,6 @@ public class LockOutRealm extends CombinedRealm { } - /** - * {@inheritDoc} - */ @Override public Principal authenticate(GSSContext gssContext, boolean storeCreds) { if (gssContext.isEstablished()) { @@ -193,9 +159,7 @@ public class LockOutRealm extends CombinedRealm { return null; } - /** - * {@inheritDoc} - */ + @Override public Principal authenticate(GSSName gssName, GSSCredential gssCredential) { String username = gssName.toString(); @@ -240,6 +204,7 @@ public class LockOutRealm extends CombinedRealm { registerAuthSuccess(username); } + /* * Checks to see if the current user is locked. If this is associated with a login attempt, then the last access * time will be recorded and any attempt to authenticated a locked user will log a warning. diff --git a/java/org/apache/catalina/realm/MemoryRealm.java b/java/org/apache/catalina/realm/MemoryRealm.java index 1877cf076d..30d3e5f037 100644 --- a/java/org/apache/catalina/realm/MemoryRealm.java +++ b/java/org/apache/catalina/realm/MemoryRealm.java @@ -103,16 +103,6 @@ public class MemoryRealm extends RealmBase { // --------------------------------------------------------- Public Methods - - /** - * Return the Principal associated with the specified username and credentials, if there is one; otherwise return - * <code>null</code>. - * - * @param username Username of the Principal to look up - * @param credentials Password or other credentials to use in authenticating this username - * - * @return the associated principal, or <code>null</code> if there is none. - */ @Override public Principal authenticate(String username, String credentials) { @@ -217,9 +207,6 @@ public class MemoryRealm extends RealmBase { } - /** - * @return the password associated with the given principal's user name. - */ @Override protected String getPassword(String username) { @@ -233,26 +220,14 @@ public class MemoryRealm extends RealmBase { } - /** - * @return the Principal associated with the given user name. - */ @Override protected Principal getPrincipal(String username) { - return principals.get(username); - } // ------------------------------------------------------ Lifecycle Methods - /** - * Prepare for the beginning of active use of the public methods of this component and implement the requirements of - * {@link org.apache.catalina.util.LifecycleBase#startInternal()}. - * - * @exception LifecycleException if this component detects a fatal error that prevents this component from being - * used - */ @Override protected void startInternal() throws LifecycleException { String pathName = getPathname(); diff --git a/java/org/apache/catalina/realm/RealmBase.java b/java/org/apache/catalina/realm/RealmBase.java index 84d40c8143..e81bad10ac 100644 --- a/java/org/apache/catalina/realm/RealmBase.java +++ b/java/org/apache/catalina/realm/RealmBase.java @@ -177,20 +177,12 @@ public abstract class RealmBase extends LifecycleMBeanBase implements org.apache } - /** - * Return the Container with which this Realm has been associated. - */ @Override public Container getContainer() { return container; } - /** - * Set the Container with which this Realm has been associated. - * - * @param container The associated Container - */ @Override public void setContainer(Container container) { @@ -274,25 +266,12 @@ public abstract class RealmBase extends LifecycleMBeanBase implements org.apache // --------------------------------------------------------- Public Methods - - /** - * Add a property change listener to this component. - * - * @param listener The listener to add - */ @Override public void addPropertyChangeListener(PropertyChangeListener listener) { - support.addPropertyChangeListener(listener); - } - /** - * Return the Principal associated with the specified username, if there is one; otherwise return <code>null</code>. - * - * @param username Username of the Principal to look up - */ @Override public Principal authenticate(String username) { @@ -308,15 +287,6 @@ public abstract class RealmBase extends LifecycleMBeanBase implements org.apache } - /** - * Return the Principal associated with the specified username and credentials, if there is one; otherwise return - * <code>null</code>. - * - * @param username Username of the Principal to look up - * @param credentials Password or other credentials to use in authenticating this username - * - * @return the associated principal, or <code>null</code> if there is none. - */ @Override public Principal authenticate(String username, String credentials) { // No user or no credentials @@ -358,22 +328,6 @@ public abstract class RealmBase extends LifecycleMBeanBase implements org.apache } - /** - * Try to authenticate with the specified username, which matches the digest calculated using the given parameters - * using the method described in RFC 2617 (which is a superset of RFC 2069). - * - * @param username Username of the Principal to look up - * @param clientDigest Digest which has been submitted by the client - * @param nonce Unique (or supposedly unique) token which has been used for this request - * @param nc the nonce counter - * @param cnonce the client chosen nonce - * @param qop the "quality of protection" (<code>nc</code> and <code>cnonce</code> will only be used, if - * <code>qop</code> is not <code>null</code>). - * @param realm Realm name - * @param md5a2 Second MD5 digest used to calculate the digest : MD5(Method + ":" + uri) - * - * @return the associated principal, or <code>null</code> if there is none. - */ @Override public Principal authenticate(String username, String clientDigest, String nonce, String nc, String cnonce, String qop, String realm, String md5a2) { @@ -415,13 +369,6 @@ public abstract class RealmBase extends LifecycleMBeanBase implements org.apache } - /** - * Return the Principal associated with the specified chain of X509 client certificates. If there is none, return - * <code>null</code>. - * - * @param certs Array of client certificates, with the first one in the array being the certificate of the client - * itself. - */ @Override public Principal authenticate(X509Certificate certs[]) { @@ -454,9 +401,6 @@ public abstract class RealmBase extends LifecycleMBeanBase implements org.apache } - /** - * {@inheritDoc} - */ @Override public Principal authenticate(GSSContext gssContext, boolean storeCred) { if (gssContext.isEstablished()) { @@ -494,9 +438,6 @@ public abstract class RealmBase extends LifecycleMBeanBase implements org.apache } - /** - * {@inheritDoc} - */ @Override public Principal authenticate(GSSName gssName, GSSCredential gssCredential) { if (gssName == null) { @@ -508,8 +449,9 @@ public abstract class RealmBase extends LifecycleMBeanBase implements org.apache /** - * Execute a periodic task, such as reloading, etc. This method will be invoked inside the classloading context of - * this container. Unexpected throwables will be caught and logged. + * {@inheritDoc} + * <p> + * The default implementation is NO-OP. */ @Override public void backgroundProcess() { @@ -517,13 +459,6 @@ public abstract class RealmBase extends LifecycleMBeanBase implements org.apache } - /** - * Return the SecurityConstraints configured to guard the request URI for this request, or <code>null</code> if - * there is no such constraint. - * - * @param request Request we are processing - * @param context Context the Request is mapped to - */ @Override public SecurityConstraint[] findSecurityConstraints(Request request, Context context) { @@ -768,17 +703,6 @@ public abstract class RealmBase extends LifecycleMBeanBase implements org.apache } - /** - * Perform access control based on the specified authorization constraint. Return <code>true</code> if this - * constraint is satisfied and processing should continue, or <code>false</code> otherwise. - * - * @param request Request we are processing - * @param response Response we are creating - * @param constraints Security constraint we are enforcing - * @param context The Context to which client of this class is attached. - * - * @exception IOException if an input/output error occurs - */ @Override public boolean hasResourcePermission(Request request, Response response, SecurityConstraint[] constraints, Context context) throws IOException { @@ -885,9 +809,11 @@ public abstract class RealmBase extends LifecycleMBeanBase implements org.apache /** - * {@inheritDoc} This method or {@link #hasRoleInternal(Principal, String)} can be overridden by Realm - * implementations, but the default is adequate when an instance of <code>GenericPrincipal</code> is used to - * represent authenticated Principals from this Realm. + * {@inheritDoc} + * <p> + * This method or {@link #hasRoleInternal(Principal, String)} can be overridden by Realm implementations, but the + * default is adequate when an instance of <code>GenericPrincipal</code> is used to represent authenticated + * Principals from this Realm. */ @Override public boolean hasRole(Wrapper wrapper, Principal principal, String role) { @@ -942,17 +868,6 @@ public abstract class RealmBase extends LifecycleMBeanBase implements org.apache } - /** - * Enforce any user data constraint required by the security constraint guarding this request URI. Return - * <code>true</code> if this constraint was not violated and processing should continue, or <code>false</code> if we - * have created a response already. - * - * @param request Request we are processing - * @param response Response we are creating - * @param constraints Security constraint being checked - * - * @exception IOException if an input/output error occurs - */ @Override public boolean hasUserDataPermission(Request request, Response response, SecurityConstraint[] constraints) throws IOException { @@ -1032,16 +947,9 @@ public abstract class RealmBase extends LifecycleMBeanBase implements org.apache } - /** - * Remove a property change listener from this component. - * - * @param listener The listener to remove - */ @Override public void removePropertyChangeListener(PropertyChangeListener listener) { - support.removePropertyChangeListener(listener); - } @@ -1063,6 +971,7 @@ public abstract class RealmBase extends LifecycleMBeanBase implements org.apache x509UsernameRetriever = createUsernameRetriever(x509UsernameRetrieverClassName); } + /** * Prepare for the beginning of active use of the public methods of this component and implement the requirements of * {@link org.apache.catalina.util.LifecycleBase#startInternal()}. @@ -1092,9 +1001,6 @@ public abstract class RealmBase extends LifecycleMBeanBase implements org.apache } - /** - * Return a String representation of this component. - */ @Override public String toString() { StringBuilder sb = new StringBuilder("Realm["); diff --git a/java/org/apache/catalina/realm/UserDatabaseRealm.java b/java/org/apache/catalina/realm/UserDatabaseRealm.java index 43b1072324..35559d579f 100644 --- a/java/org/apache/catalina/realm/UserDatabaseRealm.java +++ b/java/org/apache/catalina/realm/UserDatabaseRealm.java @@ -125,6 +125,9 @@ public class UserDatabaseRealm extends RealmBase { } + /** + * Calls {@link UserDatabase#backgroundProcess()}. + */ @Override public void backgroundProcess() { UserDatabase database = getUserDatabase(); @@ -134,9 +137,6 @@ public class UserDatabaseRealm extends RealmBase { } - /** - * Return the password associated with the given principal's user name. - */ @Override protected String getPassword(String username) { UserDatabase database = getUserDatabase(); @@ -154,9 +154,6 @@ public class UserDatabaseRealm extends RealmBase { } - /** - * Return the Principal associated with the given user name. - */ @Override protected Principal getPrincipal(String username) { UserDatabase database = getUserDatabase(); @@ -221,12 +218,6 @@ public class UserDatabaseRealm extends RealmBase { } - /** - * Gracefully terminate the active use of the public methods of this component and implement the requirements of - * {@link org.apache.catalina.util.LifecycleBase#stopInternal()}. - * - * @exception LifecycleException if this component detects a fatal error that needs to be reported - */ @Override protected void stopInternal() throws LifecycleException { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org