Allow Checkstyle's unused imports test to be used with the o.a.catalina.realm package
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 24 Oct 2010 13:08:26 +0000 (13:08 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 24 Oct 2010 13:08:26 +0000 (13:08 +0000)
Fix some Eclipse warnings

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1026786 13f79535-47bb-0310-9956-ffa450edef68

12 files changed:
java/org/apache/catalina/realm/CombinedRealm.java
java/org/apache/catalina/realm/DataSourceRealm.java
java/org/apache/catalina/realm/GenericPrincipal.java
java/org/apache/catalina/realm/JAASCallbackHandler.java
java/org/apache/catalina/realm/JAASMemoryLoginModule.java
java/org/apache/catalina/realm/JAASRealm.java
java/org/apache/catalina/realm/JDBCRealm.java
java/org/apache/catalina/realm/JNDIRealm.java
java/org/apache/catalina/realm/LockOutRealm.java
java/org/apache/catalina/realm/MemoryRealm.java
java/org/apache/catalina/realm/RealmBase.java
java/org/apache/catalina/realm/UserDatabaseRealm.java

index 95dec00..c3858bc 100644 (file)
@@ -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 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
@@ -212,7 +211,7 @@ public class CombinedRealm 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
index 2e2c359..e013bce 100644 (file)
@@ -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
index 82824cc..22f7536 100644 (file)
@@ -120,6 +120,7 @@ public class GenericPrincipal implements Principal {
      */
     protected String name = null;
 
+    @Override
     public String getName() {
         return (this.name);
     }
index f7c74e4..1b8786a 100644 (file)
@@ -182,6 +182,7 @@ public class JAASCallbackHandler implements CallbackHandler {
      * @exception UnsupportedCallbackException if the login method requests
      *  an unsupported callback type
      */
+    @Override
     public void handle(Callback callbacks[])
         throws IOException, UnsupportedCallbackException {
 
index 3fb1d8f..868214c 100644 (file)
@@ -140,6 +140,7 @@ public class JAASMemoryLoginModule extends MemoryRealm implements LoginModule {
      *
      * @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 extends MemoryRealm implements LoginModule {
      *
      * @exception LoginException if the commit fails
      */
+    @Override
     public boolean commit() throws LoginException {
         log.debug("commit " + principal);
 
@@ -210,6 +212,7 @@ public class JAASMemoryLoginModule extends MemoryRealm implements LoginModule {
      * @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 extends MemoryRealm implements LoginModule {
      *
      * @exception LoginException if the authentication fails
      */
+    @Override
     public boolean login() throws LoginException {
 
         // Set up our CallbackHandler requests
@@ -318,6 +322,7 @@ public class JAASMemoryLoginModule extends MemoryRealm implements LoginModule {
      *
      * @exception LoginException if logging out failed
      */
+    @Override
     public boolean logout() throws LoginException {
 
         subject.getPrincipals().remove(principal);
index 19c4000..c676f94 100644 (file)
@@ -35,7 +35,6 @@ import javax.security.auth.login.LoginException;
 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
index d88a93f..639596d 100644 (file)
@@ -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
index 4301802..ab9e73b 100644 (file)
@@ -54,7 +54,6 @@ import javax.naming.directory.SearchResult;
 
 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
index 5edb34d..957c06b 100644 (file)
@@ -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 CombinedRealm {
     /**
      * 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
index 5d69224..e5bb8f6 100644 (file)
@@ -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 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
index 797cb7f..d9bd807 100644 (file)
@@ -49,7 +49,6 @@ import org.apache.catalina.deploy.SecurityCollection;
 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 LifecycleMBeanBase implements Realm {
     /**
      * 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 LifecycleMBeanBase implements Realm {
      *
      * @param container The associated Container
      */
+    @Override
     public void setContainer(Container container) {
 
         Container oldContainer = this.container;
@@ -237,6 +238,7 @@ public abstract class RealmBase extends LifecycleMBeanBase implements Realm {
      * 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 LifecycleMBeanBase implements Realm {
      *
      * @param listener The listener to add
      */
+    @Override
     public void addPropertyChangeListener(PropertyChangeListener listener) {
 
         support.addPropertyChangeListener(listener);
@@ -289,6 +292,7 @@ public abstract class RealmBase extends LifecycleMBeanBase implements Realm {
      * @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 LifecycleMBeanBase implements Realm {
      * @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 LifecycleMBeanBase implements Realm {
      * @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 LifecycleMBeanBase implements Realm {
      * 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 LifecycleMBeanBase implements Realm {
      * @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 LifecycleMBeanBase implements Realm {
      *
      * @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 LifecycleMBeanBase implements Realm {
      *
      * @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 LifecycleMBeanBase implements Realm {
      *
      * @param listener The listener to remove
      */
+    @Override
     public void removePropertyChangeListener(PropertyChangeListener listener) {
 
         support.removePropertyChangeListener(listener);
@@ -974,7 +985,7 @@ public abstract class RealmBase extends LifecycleMBeanBase implements 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
@@ -999,7 +1010,7 @@ public abstract class RealmBase extends LifecycleMBeanBase implements 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
index a0e8296..2f8af43 100644 (file)
@@ -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