You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2010/10/24 15:08:27 UTC

svn commit: r1026786 - /tomcat/trunk/java/org/apache/catalina/realm/

Author: markt
Date: Sun Oct 24 13:08:26 2010
New Revision: 1026786

URL: http://svn.apache.org/viewvc?rev=1026786&view=rev
Log:
Allow Checkstyle's unused imports test to be used with the o.a.catalina.realm package
Fix some Eclipse warnings

Modified:
    tomcat/trunk/java/org/apache/catalina/realm/CombinedRealm.java
    tomcat/trunk/java/org/apache/catalina/realm/DataSourceRealm.java
    tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java
    tomcat/trunk/java/org/apache/catalina/realm/JAASCallbackHandler.java
    tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
    tomcat/trunk/java/org/apache/catalina/realm/JAASRealm.java
    tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java
    tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java
    tomcat/trunk/java/org/apache/catalina/realm/LockOutRealm.java
    tomcat/trunk/java/org/apache/catalina/realm/MemoryRealm.java
    tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
    tomcat/trunk/java/org/apache/catalina/realm/UserDatabaseRealm.java

Modified: tomcat/trunk/java/org/apache/catalina/realm/CombinedRealm.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/CombinedRealm.java?rev=1026786&r1=1026785&r2=1026786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/CombinedRealm.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/CombinedRealm.java Sun Oct 24 13:08:26 2010
@@ -29,7 +29,6 @@ import org.apache.catalina.Container;
 import org.apache.catalina.Lifecycle;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.Realm;
-import org.apache.catalina.util.LifecycleBase;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
@@ -182,7 +181,7 @@ public class CombinedRealm extends Realm
     /**
      * Prepare for the beginning of active use of the public methods of this
      * component and implement the requirements of
-     * {@link LifecycleBase#startInternal()}.
+     * {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
      *
      * @exception LifecycleException if this component detects a fatal error
      *  that prevents this component from being used
@@ -212,7 +211,7 @@ public class CombinedRealm extends Realm
     /**
      * Gracefully terminate the active use of the public methods of this
      * component and implement the requirements of
-     * {@link LifecycleBase#stopInternal()}.
+     * {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
      *
      * @exception LifecycleException if this component detects a fatal error
      *  that needs to be reported

Modified: tomcat/trunk/java/org/apache/catalina/realm/DataSourceRealm.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/DataSourceRealm.java?rev=1026786&r1=1026785&r2=1026786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/DataSourceRealm.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/DataSourceRealm.java Sun Oct 24 13:08:26 2010
@@ -31,7 +31,6 @@ import javax.sql.DataSource;
 
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.core.StandardServer;
-import org.apache.catalina.util.LifecycleBase;
 import org.apache.naming.ContextBindings;
 
 /**
@@ -612,7 +611,7 @@ public class DataSourceRealm
     /**
      * Prepare for the beginning of active use of the public methods of this
      * component and implement the requirements of
-     * {@link LifecycleBase#startInternal()}.
+     * {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
      *
      * @exception LifecycleException if this component detects a fatal error
      *  that prevents this component from being used

Modified: tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java?rev=1026786&r1=1026785&r2=1026786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/GenericPrincipal.java Sun Oct 24 13:08:26 2010
@@ -120,6 +120,7 @@ public class GenericPrincipal implements
      */
     protected String name = null;
 
+    @Override
     public String getName() {
         return (this.name);
     }

Modified: tomcat/trunk/java/org/apache/catalina/realm/JAASCallbackHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/JAASCallbackHandler.java?rev=1026786&r1=1026785&r2=1026786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/JAASCallbackHandler.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/JAASCallbackHandler.java Sun Oct 24 13:08:26 2010
@@ -182,6 +182,7 @@ public class JAASCallbackHandler impleme
      * @exception UnsupportedCallbackException if the login method requests
      *  an unsupported callback type
      */
+    @Override
     public void handle(Callback callbacks[])
         throws IOException, UnsupportedCallbackException {
 

Modified: tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java?rev=1026786&r1=1026785&r2=1026786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java Sun Oct 24 13:08:26 2010
@@ -140,6 +140,7 @@ public class JAASMemoryLoginModule exten
      *
      * @exception LoginException if the abort fails
      */
+    @Override
     public boolean abort() throws LoginException {
 
         // If our authentication was not successful, just return false
@@ -170,6 +171,7 @@ public class JAASMemoryLoginModule exten
      *
      * @exception LoginException if the commit fails
      */
+    @Override
     public boolean commit() throws LoginException {
         log.debug("commit " + principal);
 
@@ -210,6 +212,7 @@ public class JAASMemoryLoginModule exten
      * @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) {
         log.debug("Init");
@@ -239,6 +242,7 @@ public class JAASMemoryLoginModule exten
      *
      * @exception LoginException if the authentication fails
      */
+    @Override
     public boolean login() throws LoginException {
 
         // Set up our CallbackHandler requests
@@ -318,6 +322,7 @@ public class JAASMemoryLoginModule exten
      *
      * @exception LoginException if logging out failed
      */
+    @Override
     public boolean logout() throws LoginException {
 
         subject.getPrincipals().remove(principal);

Modified: tomcat/trunk/java/org/apache/catalina/realm/JAASRealm.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/JAASRealm.java?rev=1026786&r1=1026785&r2=1026786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/JAASRealm.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/JAASRealm.java Sun Oct 24 13:08:26 2010
@@ -35,7 +35,6 @@ import javax.security.auth.login.LoginEx
 import org.apache.catalina.Container;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.authenticator.Constants;
-import org.apache.catalina.util.LifecycleBase;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.ExceptionUtils;
@@ -590,7 +589,7 @@ public class JAASRealm
      /**
       * Prepare for the beginning of active use of the public methods of this
       * component and implement the requirements of
-      * {@link LifecycleBase#startInternal()}.
+      * {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
       *
       * @exception LifecycleException if this component detects a fatal error
       *  that prevents this component from being used

Modified: tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java?rev=1026786&r1=1026785&r2=1026786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/JDBCRealm.java Sun Oct 24 13:08:26 2010
@@ -29,7 +29,6 @@ import java.util.ArrayList;
 import java.util.Properties;
 
 import org.apache.catalina.LifecycleException;
-import org.apache.catalina.util.LifecycleBase;
 import org.apache.tomcat.util.ExceptionUtils;
 
 
@@ -769,7 +768,7 @@ public class JDBCRealm
     /**
      * Prepare for the beginning of active use of the public methods of this
      * component and implement the requirements of
-     * {@link LifecycleBase#startInternal()}.
+     * {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
      *
      * @exception LifecycleException if this component detects a fatal error
      *  that prevents this component from being used
@@ -792,7 +791,7 @@ public class JDBCRealm
     /**
      * Gracefully terminate the active use of the public methods of this
      * component and implement the requirements of
-     * {@link LifecycleBase#stopInternal()}.
+     * {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
      *
      * @exception LifecycleException if this component detects a fatal error
      *  that needs to be reported

Modified: tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java?rev=1026786&r1=1026785&r2=1026786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/JNDIRealm.java Sun Oct 24 13:08:26 2010
@@ -54,7 +54,6 @@ import javax.naming.directory.SearchResu
 
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.util.Base64;
-import org.apache.catalina.util.LifecycleBase;
 import org.apache.tomcat.util.buf.ByteChunk;
 import org.apache.tomcat.util.buf.CharChunk;
 
@@ -2034,7 +2033,7 @@ public class JNDIRealm extends RealmBase
     /**
      * Prepare for the beginning of active use of the public methods of this
      * component and implement the requirements of
-     * {@link LifecycleBase#startInternal()}.
+     * {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
      *
      * @exception LifecycleException if this component detects a fatal error
      *  that prevents this component from being used
@@ -2056,7 +2055,7 @@ public class JNDIRealm extends RealmBase
     /**
      * Gracefully terminate the active use of the public methods of this
      * component and implement the requirements of
-     * {@link LifecycleBase#stopInternal()}.
+     * {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
      *
      * @exception LifecycleException if this component detects a fatal error
      *  that needs to be reported

Modified: tomcat/trunk/java/org/apache/catalina/realm/LockOutRealm.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/LockOutRealm.java?rev=1026786&r1=1026785&r2=1026786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/LockOutRealm.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/LockOutRealm.java Sun Oct 24 13:08:26 2010
@@ -24,7 +24,6 @@ import java.util.Map;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.catalina.LifecycleException;
-import org.apache.catalina.util.LifecycleBase;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
@@ -85,7 +84,7 @@ public class LockOutRealm extends Combin
     /**
      * Prepare for the beginning of active use of the public methods of this
      * component and implement the requirements of
-     * {@link LifecycleBase#startInternal()}.
+     * {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
      *
      * @exception LifecycleException if this component detects a fatal error
      *  that prevents this component from being used

Modified: tomcat/trunk/java/org/apache/catalina/realm/MemoryRealm.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/MemoryRealm.java?rev=1026786&r1=1026785&r2=1026786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/MemoryRealm.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/MemoryRealm.java Sun Oct 24 13:08:26 2010
@@ -27,7 +27,6 @@ import java.util.Map;
 
 import org.apache.catalina.Globals;
 import org.apache.catalina.LifecycleException;
-import org.apache.catalina.util.LifecycleBase;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.digester.Digester;
@@ -279,7 +278,7 @@ public class MemoryRealm  extends RealmB
     /**
      * Prepare for the beginning of active use of the public methods of this
      * component and implement the requirements of
-     * {@link LifecycleBase#startInternal()}.
+     * {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
      *
      * @exception LifecycleException if this component detects a fatal error
      *  that prevents this component from being used

Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=1026786&r1=1026785&r2=1026786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Sun Oct 24 13:08:26 2010
@@ -49,7 +49,6 @@ import org.apache.catalina.deploy.Securi
 import org.apache.catalina.deploy.SecurityConstraint;
 import org.apache.catalina.mbeans.MBeanUtils;
 import org.apache.catalina.util.HexUtils;
-import org.apache.catalina.util.LifecycleBase;
 import org.apache.catalina.util.LifecycleMBeanBase;
 import org.apache.catalina.util.MD5Encoder;
 import org.apache.juli.logging.Log;
@@ -154,6 +153,7 @@ public abstract class RealmBase extends 
     /**
      * Return the Container with which this Realm has been associated.
      */
+    @Override
     public Container getContainer() {
 
         return (container);
@@ -166,6 +166,7 @@ public abstract class RealmBase extends 
      *
      * @param container The associated Container
      */
+    @Override
     public void setContainer(Container container) {
 
         Container oldContainer = this.container;
@@ -237,6 +238,7 @@ public abstract class RealmBase extends 
      * the corresponding version number, in the format
      * <code>&lt;description&gt;/&lt;version&gt;</code>.
      */
+    @Override
     public String getInfo() {
 
         return info;
@@ -274,6 +276,7 @@ public abstract class RealmBase extends 
      *
      * @param listener The listener to add
      */
+    @Override
     public void addPropertyChangeListener(PropertyChangeListener listener) {
 
         support.addPropertyChangeListener(listener);
@@ -289,6 +292,7 @@ public abstract class RealmBase extends 
      * @param credentials Password or other credentials to use in
      *  authenticating this username
      */
+    @Override
     public Principal authenticate(String username, String credentials) {
 
         String serverCredentials = getPassword(username);
@@ -330,6 +334,7 @@ public abstract class RealmBase extends 
      * @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 realm,
@@ -382,6 +387,7 @@ public abstract class RealmBase extends 
      * @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[]) {
 
         if ((certs == null) || (certs.length < 1))
@@ -416,6 +422,7 @@ public abstract class RealmBase extends 
      * invoked inside the classloading context of this container. Unexpected
      * throwables will be caught and logged.
      */
+    @Override
     public void backgroundProcess() {
         // NOOP in base class
     }
@@ -428,6 +435,7 @@ public abstract class RealmBase extends 
      * @param request Request we are processing
      * @param context Context the Request is mapped to
      */
+    @Override
     public SecurityConstraint [] findSecurityConstraints(Request request,
                                                          Context context) {
 
@@ -692,6 +700,7 @@ public abstract class RealmBase extends 
      *
      * @exception IOException if an input/output error occurs
      */
+    @Override
     public boolean hasResourcePermission(Request request,
                                          Response response,
                                          SecurityConstraint []constraints,
@@ -869,6 +878,7 @@ public abstract class RealmBase extends 
      *
      * @exception IOException if an input/output error occurs
      */
+    @Override
     public boolean hasUserDataPermission(Request request,
                                          Response response,
                                          SecurityConstraint []constraints)
@@ -953,6 +963,7 @@ public abstract class RealmBase extends 
      *
      * @param listener The listener to remove
      */
+    @Override
     public void removePropertyChangeListener(PropertyChangeListener listener) {
 
         support.removePropertyChangeListener(listener);
@@ -974,7 +985,7 @@ public abstract class RealmBase extends 
     /**
      * Prepare for the beginning of active use of the public methods of this
      * component and implement the requirements of
-     * {@link LifecycleBase#startInternal()}.
+     * {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
      *
      * @exception LifecycleException if this component detects a fatal error
      *  that prevents this component from being used
@@ -999,7 +1010,7 @@ public abstract class RealmBase extends 
     /**
      * Gracefully terminate the active use of the public methods of this
      * component and implement the requirements of
-     * {@link LifecycleBase#stopInternal()}.
+     * {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
      *
      * @exception LifecycleException if this component detects a fatal error
      *  that needs to be reported

Modified: tomcat/trunk/java/org/apache/catalina/realm/UserDatabaseRealm.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/UserDatabaseRealm.java?rev=1026786&r1=1026785&r2=1026786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/UserDatabaseRealm.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/UserDatabaseRealm.java Sun Oct 24 13:08:26 2010
@@ -33,7 +33,6 @@ import org.apache.catalina.User;
 import org.apache.catalina.UserDatabase;
 import org.apache.catalina.Wrapper;
 import org.apache.catalina.core.StandardServer;
-import org.apache.catalina.util.LifecycleBase;
 import org.apache.tomcat.util.ExceptionUtils;
 
 
@@ -244,7 +243,7 @@ public class UserDatabaseRealm
     /**
      * Prepare for the beginning of active use of the public methods of this
      * component and implement the requirements of
-     * {@link LifecycleBase#startInternal()}.
+     * {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
      *
      * @exception LifecycleException if this component detects a fatal error
      *  that prevents this component from being used
@@ -275,7 +274,7 @@ public class UserDatabaseRealm
     /**
      * Gracefully terminate the active use of the public methods of this
      * component and implement the requirements of
-     * {@link LifecycleBase#stopInternal()}.
+     * {@link org.apache.catalina.util.LifecycleBase#stopInternal()}.
      *
      * @exception LifecycleException if this component detects a fatal error
      *  that needs to be reported



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org