This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 9b4e9ea182 Remove unnecessary Javadoc
9b4e9ea182 is described below

commit 9b4e9ea1825131e9a27d8ba5567694ffc6e6a930
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Mar 9 14:37:46 2023 +0000

    Remove unnecessary Javadoc
---
 java/org/apache/catalina/Realm.java                |  49 +++++----
 java/org/apache/catalina/realm/CombinedRealm.java  |  63 ++----------
 .../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, 57 insertions(+), 353 deletions(-)

diff --git a/java/org/apache/catalina/Realm.java 
b/java/org/apache/catalina/Realm.java
index f624fa6504..8003ba1d2f 100644
--- a/java/org/apache/catalina/Realm.java
+++ b/java/org/apache/catalina/Realm.java
@@ -65,8 +65,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);
 
@@ -78,7 +78,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);
 
@@ -94,12 +95,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,
@@ -108,18 +110,18 @@ 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 a {@link GSSName}
+     * Try to authenticate using a {@link GSSName}.
      *
      * Note that this default method will be turned into an abstract one in
      * Tomcat 10.
@@ -135,11 +137,12 @@ public interface Realm extends Contained {
 
 
     /**
-     * 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[]);
 
@@ -157,9 +160,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);
@@ -172,8 +176,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
      */
@@ -191,9 +196,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);
 
@@ -205,8 +211,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
@@ -236,7 +243,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
      */
     default boolean isAvailable() {
         return true;
diff --git a/java/org/apache/catalina/realm/CombinedRealm.java 
b/java/org/apache/catalina/realm/CombinedRealm.java
index 807e5c7f34..0b942a78e7 100644
--- a/java/org/apache/catalina/realm/CombinedRealm.java
+++ b/java/org/apache/catalina/realm/CombinedRealm.java
@@ -78,6 +78,7 @@ public class CombinedRealm extends RealmBase {
         return result;
     }
 
+
     /**
      * @return the list of Realms contained by this Realm.
      */
@@ -85,16 +86,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) {
@@ -122,11 +114,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;
@@ -153,13 +140,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;
@@ -186,11 +166,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) {
@@ -206,13 +181,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
@@ -240,12 +208,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)
@@ -271,6 +233,7 @@ public class CombinedRealm extends RealmBase {
         super.destroyInternal();
     }
 
+
     /**
      * Delegate the backgroundProcess call to all sub-realms.
      */
@@ -283,13 +246,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;
@@ -319,9 +276,7 @@ public class CombinedRealm extends RealmBase {
         return authenticatedUser;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+
     @Override
     public Principal authenticate(GSSContext gssContext, boolean storeCred) {
         if (gssContext.isEstablished()) {
@@ -359,9 +314,7 @@ public class CombinedRealm extends RealmBase {
         return null;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+
     @Override
     public Principal authenticate(GSSName gssName, GSSCredential 
gssCredential) {
         Principal authenticatedUser = null;
@@ -387,9 +340,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 644ab5dc3f..00ca78ef1c 100644
--- a/java/org/apache/catalina/realm/DataSourceRealm.java
+++ b/java/org/apache/catalina/realm/DataSourceRealm.java
@@ -224,15 +224,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) {
@@ -530,13 +526,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 314a54b92c..023c4d0d98 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 e1bc08cdb3..6fdb36dfad 100644
--- a/java/org/apache/catalina/realm/JAASRealm.java
+++ b/java/org/apache/catalina/realm/JAASRealm.java
@@ -307,36 +307,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) {
@@ -345,12 +321,8 @@ public class JAASRealm extends RealmBase {
     }
 
 
-    // -------------------------------------------------------- Package Methods
-
-
     // ------------------------------------------------------ Protected Methods
 
-
     /**
      * Perform the actual JAAS authentication.
      *
@@ -593,14 +565,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 6ccf5a69d4..d9b238f06b 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -1120,15 +1120,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 7bdee4fab2..ccb833fd0c 100644
--- a/java/org/apache/catalina/realm/LockOutRealm.java
+++ b/java/org/apache/catalina/realm/LockOutRealm.java
@@ -72,13 +72,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 {
         /*
@@ -109,16 +102,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) {
@@ -129,13 +112,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);
@@ -143,13 +119,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;
@@ -162,9 +131,6 @@ public class LockOutRealm extends CombinedRealm {
     }
 
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public Principal authenticate(GSSContext gssContext, boolean storeCreds) {
         if (gssContext.isEstablished()) {
@@ -188,9 +154,7 @@ public class LockOutRealm extends CombinedRealm {
         return null;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+
     @Override
     public Principal authenticate(GSSName gssName, GSSCredential 
gssCredential) {
         String username = gssName.toString();
@@ -235,6 +199,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 9362ff8036..9f12cd4055 100644
--- a/java/org/apache/catalina/realm/MemoryRealm.java
+++ b/java/org/apache/catalina/realm/MemoryRealm.java
@@ -95,16 +95,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) {
 
@@ -202,9 +192,6 @@ public class MemoryRealm extends RealmBase {
     }
 
 
-    /**
-     * @return the password associated with the given principal's user name.
-     */
     @Override
     protected String getPassword(String username) {
 
@@ -218,26 +205,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 0e245f36f5..377929996d 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 Realm {
     }
 
 
-    /**
-     * 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 Realm {
 
     // --------------------------------------------------------- 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 Realm {
     }
 
 
-    /**
-     * 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 Realm {
     }
 
 
-    /**
-     * 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 Realm {
     }
 
 
-    /**
-     * 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 Realm {
     }
 
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public Principal authenticate(GSSContext gssContext, boolean storeCred) {
         if (gssContext.isEstablished()) {
@@ -494,9 +438,6 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements Realm {
     }
 
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public Principal authenticate(GSSName gssName, GSSCredential 
gssCredential) {
         if (gssName == null) {
@@ -508,8 +449,9 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements Realm {
 
 
     /**
-     * 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 Realm {
     }
 
 
-    /**
-     * 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 Realm {
     }
 
 
-    /**
-     * 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 Realm {
 
 
     /**
-     * {@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 Realm {
     }
 
 
-    /**
-     * 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 Realm {
     }
 
 
-    /**
-     * Remove a property change listener from this component.
-     *
-     * @param listener The listener to remove
-     */
     @Override
     public void removePropertyChangeListener(PropertyChangeListener listener) {
-
         support.removePropertyChangeListener(listener);
-
     }
 
 
@@ -1058,6 +966,7 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements Realm {
         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()}.
@@ -1087,9 +996,6 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements Realm {
     }
 
 
-    /**
-     * Return a String representation of this component.
-     */
     @Override
     public String toString() {
         return ToStringUtil.toString(this);
diff --git a/java/org/apache/catalina/realm/UserDatabaseRealm.java 
b/java/org/apache/catalina/realm/UserDatabaseRealm.java
index 588c806143..9589207d48 100644
--- a/java/org/apache/catalina/realm/UserDatabaseRealm.java
+++ b/java/org/apache/catalina/realm/UserDatabaseRealm.java
@@ -132,6 +132,9 @@ public class UserDatabaseRealm extends RealmBase {
 
     // ------------------------------------------------------ Protected Methods
 
+    /**
+     * Calls {@link UserDatabase#backgroundProcess()}.
+     */
     @Override
     public void backgroundProcess() {
         UserDatabase database = getUserDatabase();
@@ -141,9 +144,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();
@@ -181,9 +181,6 @@ public class UserDatabaseRealm extends RealmBase {
     }
 
 
-    /**
-     * Return the Principal associated with the given user name.
-     */
     @Override
     protected Principal getPrincipal(String username) {
         UserDatabase database = getUserDatabase();
@@ -252,12 +249,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


Reply via email to