tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1095677 - in /tomcat/trunk/java/org/apache: catalina/users/MemoryUserDatabase.java tomcat/util/digester/AbstractObjectCreationFactory.java tomcat/util/digester/AbstractRulesImpl.java
Date Thu, 21 Apr 2011 12:25:31 GMT
Author: markt
Date: Thu Apr 21 12:25:31 2011
New Revision: 1095677

URL: http://svn.apache.org/viewvc?rev=1095677&view=rev
Log:
Fix some unused code warnings

Removed:
    tomcat/trunk/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java
Modified:
    tomcat/trunk/java/org/apache/catalina/users/MemoryUserDatabase.java
    tomcat/trunk/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java

Modified: tomcat/trunk/java/org/apache/catalina/users/MemoryUserDatabase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/users/MemoryUserDatabase.java?rev=1095677&r1=1095676&r2=1095677&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/users/MemoryUserDatabase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/users/MemoryUserDatabase.java Thu Apr 21 12:25:31
2011
@@ -36,8 +36,8 @@ import org.apache.catalina.UserDatabase;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.ExceptionUtils;
+import org.apache.tomcat.util.digester.AbstractObjectCreationFactory;
 import org.apache.tomcat.util.digester.Digester;
-import org.apache.tomcat.util.digester.ObjectCreationFactory;
 import org.apache.tomcat.util.res.StringManager;
 import org.xml.sax.Attributes;
 
@@ -683,7 +683,7 @@ public class MemoryUserDatabase implemen
 /**
  * Digester object creation factory for group instances.
  */
-class MemoryGroupCreationFactory implements ObjectCreationFactory {
+class MemoryGroupCreationFactory extends AbstractObjectCreationFactory {
 
     public MemoryGroupCreationFactory(MemoryUserDatabase database) {
         this.database = database;
@@ -722,26 +722,13 @@ class MemoryGroupCreationFactory impleme
     }
 
     private MemoryUserDatabase database = null;
-
-    private Digester digester = null;
-
-    @Override
-    public Digester getDigester() {
-        return (this.digester);
-    }
-
-    @Override
-    public void setDigester(Digester digester) {
-        this.digester = digester;
-    }
-
 }
 
 
 /**
  * Digester object creation factory for role instances.
  */
-class MemoryRoleCreationFactory implements ObjectCreationFactory {
+class MemoryRoleCreationFactory extends AbstractObjectCreationFactory {
 
     public MemoryRoleCreationFactory(MemoryUserDatabase database) {
         this.database = database;
@@ -759,26 +746,13 @@ class MemoryRoleCreationFactory implemen
     }
 
     private MemoryUserDatabase database = null;
-
-    private Digester digester = null;
-
-    @Override
-    public Digester getDigester() {
-        return (this.digester);
-    }
-
-    @Override
-    public void setDigester(Digester digester) {
-        this.digester = digester;
-    }
-
 }
 
 
 /**
  * Digester object creation factory for user instances.
  */
-class MemoryUserCreationFactory implements ObjectCreationFactory {
+class MemoryUserCreationFactory extends AbstractObjectCreationFactory {
 
     public MemoryUserCreationFactory(MemoryUserDatabase database) {
         this.database = database;
@@ -842,17 +816,4 @@ class MemoryUserCreationFactory implemen
     }
 
     private MemoryUserDatabase database = null;
-
-    private Digester digester = null;
-
-    @Override
-    public Digester getDigester() {
-        return (this.digester);
-    }
-
-    @Override
-    public void setDigester(Digester digester) {
-        this.digester = digester;
-    }
-
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java?rev=1095677&r1=1095676&r2=1095677&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java Thu
Apr 21 12:25:31 2011
@@ -24,7 +24,8 @@ import org.xml.sax.Attributes;
  * <p>Abstract base class for <code>ObjectCreationFactory</code>
  * implementations.</p>
  */
-public abstract class AbstractObjectCreationFactory implements ObjectCreationFactory {
+public abstract class AbstractObjectCreationFactory
+        implements ObjectCreationFactory {
 
 
     // ----------------------------------------------------- Instance Variables
@@ -34,7 +35,7 @@ public abstract class AbstractObjectCrea
      * The associated <code>Digester</code> instance that was set up by
      * {@link FactoryCreateRule} upon initialization.
      */
-    protected Digester digester = null;
+    private Digester digester = null;
 
 
     // --------------------------------------------------------- Public Methods
@@ -48,6 +49,7 @@ public abstract class AbstractObjectCrea
      *
      * @throws Exception any exception thrown will be propagated upwards
      */
+    @Override
     public abstract Object createObject(Attributes attributes) throws Exception;
 
 
@@ -55,6 +57,7 @@ public abstract class AbstractObjectCrea
      * <p>Returns the {@link Digester} that was set by the
      * {@link FactoryCreateRule} upon initialization.
      */
+    @Override
     public Digester getDigester() {
 
         return (this.digester);
@@ -68,6 +71,7 @@ public abstract class AbstractObjectCrea
      *
      * @param digester parent Digester object
      */
+    @Override
     public void setDigester(Digester digester) {
 
         this.digester = digester;



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


Mime
View raw message