Use inheritance as it makes merging easier
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 6 Nov 2009 23:35:46 +0000 (23:35 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 6 Nov 2009 23:35:46 +0000 (23:35 +0000)
Fix a handful of Eclipse warnings

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

20 files changed:
java/org/apache/catalina/deploy/ApplicationParameter.java
java/org/apache/catalina/deploy/ContextEjb.java
java/org/apache/catalina/deploy/ContextEnvironment.java
java/org/apache/catalina/deploy/ContextHandler.java
java/org/apache/catalina/deploy/ContextLocalEjb.java
java/org/apache/catalina/deploy/ContextResource.java
java/org/apache/catalina/deploy/ContextResourceEnvRef.java
java/org/apache/catalina/deploy/ContextResourceLink.java
java/org/apache/catalina/deploy/ContextService.java
java/org/apache/catalina/deploy/ContextTransaction.java
java/org/apache/catalina/deploy/ErrorPage.java
java/org/apache/catalina/deploy/FilterDef.java
java/org/apache/catalina/deploy/InjectionTarget.java
java/org/apache/catalina/deploy/MessageDestination.java
java/org/apache/catalina/deploy/MessageDestinationRef.java
java/org/apache/catalina/deploy/NamingResources.java
java/org/apache/catalina/deploy/ResourceBase.java
java/org/apache/catalina/deploy/SecurityCollection.java
java/org/apache/catalina/deploy/SecurityConstraint.java
java/org/apache/catalina/deploy/ServletDef.java

index b4fd15e..884c983 100644 (file)
@@ -34,6 +34,7 @@ import java.io.Serializable;
 
 public class ApplicationParameter implements Serializable {
 
+    private static final long serialVersionUID = 1L;
 
     // ------------------------------------------------------------- Properties
 
index 0d15088..808dab0 100644 (file)
@@ -18,8 +18,6 @@
 
 package org.apache.catalina.deploy;
 
-import java.io.Serializable;
-
 
 /**
  * Representation of an EJB resource reference for a web application, as
@@ -31,8 +29,9 @@ import java.io.Serializable;
  * @version $Revision$ $Date$
  */
 
-public class ContextEjb extends ResourceBase implements Serializable {
+public class ContextEjb extends ResourceBase {
 
+    private static final long serialVersionUID = 1L;
 
     // ------------------------------------------------------------- Properties
 
index 1cad127..74b08ec 100644 (file)
@@ -33,6 +33,7 @@ import java.util.List;
 
 public class ContextEnvironment implements Serializable, Injectable {
 
+    private static final long serialVersionUID = 1L;
 
     // ------------------------------------------------------------- Properties
 
index 8c1472e..5fbf14a 100644 (file)
@@ -18,7 +18,6 @@
 
 package org.apache.catalina.deploy;
 
-import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.HashMap;
@@ -31,8 +30,9 @@ import java.util.HashMap;
  * @author Fabien Carrion
  */
 
-public class ContextHandler extends ResourceBase implements Serializable {
+public class ContextHandler extends ResourceBase {
 
+    private static final long serialVersionUID = 1L;
 
     // ------------------------------------------------------------- Properties
 
index 8673952..20b50ad 100644 (file)
@@ -18,8 +18,6 @@
 
 package org.apache.catalina.deploy;
 
-import java.io.Serializable;
-
 
 /**
  * Representation of a local EJB resource reference for a web application, as
@@ -31,8 +29,9 @@ import java.io.Serializable;
  * @version $Revision$ $Date$
  */
 
-public class ContextLocalEjb extends ResourceBase implements Serializable {
+public class ContextLocalEjb extends ResourceBase {
 
+    private static final long serialVersionUID = 1L;
 
     // ------------------------------------------------------------- Properties
 
index e7d913b..fae943e 100644 (file)
@@ -18,7 +18,6 @@
 
 package org.apache.catalina.deploy;
 
-import java.io.Serializable;
 
 /**
  * Representation of a resource reference for a web application, as
@@ -30,8 +29,9 @@ import java.io.Serializable;
  * @version $Revision$ $Date$
  */
 
-public class ContextResource extends ResourceBase implements Serializable {
+public class ContextResource extends ResourceBase {
 
+    private static final long serialVersionUID = 1L;
 
     // ------------------------------------------------------------- Properties
 
index da0d5ad..3e96e8d 100644 (file)
@@ -18,8 +18,6 @@
 
 package org.apache.catalina.deploy;
 
-import java.io.Serializable;
-
 
 /**
  * Representation of an application resource reference, as represented in
@@ -30,8 +28,9 @@ import java.io.Serializable;
  * @version $Revision$ $Date$
  */
 
-public class ContextResourceEnvRef extends ResourceBase implements Serializable {
+public class ContextResourceEnvRef extends ResourceBase {
 
+    private static final long serialVersionUID = 1L;
 
     // ------------------------------------------------------------- Properties
 
index 8829d8f..76dd54b 100644 (file)
@@ -18,8 +18,6 @@
 
 package org.apache.catalina.deploy;
 
-import java.io.Serializable;
-
 
 /**
  * Representation of a resource link for a web application, as
@@ -31,8 +29,9 @@ import java.io.Serializable;
  * @version $Revision$ $Date$
  */
 
-public class ContextResourceLink extends ResourceBase implements Serializable {
+public class ContextResourceLink extends ResourceBase {
 
+    private static final long serialVersionUID = 1L;
 
     // ------------------------------------------------------------- Properties
 
index f75dcc9..90c5efe 100644 (file)
@@ -18,7 +18,6 @@
 
 package org.apache.catalina.deploy;
 
-import java.io.Serializable;
 import java.util.Iterator;
 import java.util.HashMap;
 
@@ -31,8 +30,9 @@ import java.util.HashMap;
  * @version $Revision$ $Date$
  */
 
-public class ContextService extends ResourceBase implements Serializable {
+public class ContextService extends ResourceBase {
 
+    private static final long serialVersionUID = 1L;
 
     // ------------------------------------------------------------- Properties
 
index 889366e..2968bf9 100644 (file)
@@ -33,6 +33,7 @@ import java.util.Iterator;
 
 public class ContextTransaction implements Serializable {
 
+    private static final long serialVersionUID = 1L;
 
     // ------------------------------------------------------------- Properties
 
index 21b88c6..f83ad2c 100644 (file)
@@ -34,6 +34,7 @@ import java.io.Serializable;
 
 public class ErrorPage implements Serializable {
 
+    private static final long serialVersionUID = 1L;
 
     // ----------------------------------------------------- Instance Variables
 
index 35c71bf..a3ddd40 100644 (file)
@@ -34,6 +34,7 @@ import java.io.Serializable;
 
 public class FilterDef implements Serializable {
 
+    private static final long serialVersionUID = 1L;
 
     // ------------------------------------------------------------- Properties
 
index 7bce05c..d5fb045 100644 (file)
@@ -29,6 +29,7 @@ public class InjectionTarget {
 
 
     public InjectionTarget() {
+        // NOOP
     }
 
     public InjectionTarget(String targetClass, String targetName) {
index 46445b6..f10cb92 100644 (file)
@@ -29,27 +29,14 @@ package org.apache.catalina.deploy;
  * @since Tomcat 5.0
  */
 
-public class MessageDestination {
+public class MessageDestination extends ResourceBase {
 
+    private static final long serialVersionUID = 1L;
 
     // ------------------------------------------------------------- Properties
 
 
     /**
-     * The description of this destination.
-     */
-    private String description = null;
-
-    public String getDescription() {
-        return (this.description);
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-
-    /**
      * The display name of this destination.
      */
     private String displayName = null;
@@ -78,20 +65,6 @@ public class MessageDestination {
 
 
     /**
-     * The name of this destination.
-     */
-    private String name = null;
-
-    public String getName() {
-        return (this.name);
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-
-    /**
      * The small icon of this destination.
      */
     private String smallIcon = null;
@@ -116,7 +89,7 @@ public class MessageDestination {
 
         StringBuilder sb = new StringBuilder("MessageDestination[");
         sb.append("name=");
-        sb.append(name);
+        sb.append(getName());
         if (displayName != null) {
             sb.append(", displayName=");
             sb.append(displayName);
@@ -129,9 +102,9 @@ public class MessageDestination {
             sb.append(", smallIcon=");
             sb.append(smallIcon);
         }
-        if (description != null) {
+        if (getDescription() != null) {
             sb.append(", description=");
-            sb.append(description);
+            sb.append(getDescription());
         }
         sb.append("]");
         return (sb.toString());
index 9b17db8..51fdfdf 100644 (file)
 
 package org.apache.catalina.deploy;
 
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
 
 /**
  * <p>Representation of a message destination reference for a web application,
@@ -33,27 +29,14 @@ import java.util.List;
  * @since Tomcat 5.0
  */
 
-public class MessageDestinationRef implements Serializable, Injectable {
-
+public class MessageDestinationRef extends ResourceBase {
 
+    private static final long serialVersionUID = 1L;
+    
     // ------------------------------------------------------------- Properties
 
 
     /**
-     * The description of this destination ref.
-     */
-    private String description = null;
-
-    public String getDescription() {
-        return (this.description);
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-
-    /**
      * The link of this destination ref.
      */
     private String link = null;
@@ -68,34 +51,6 @@ public class MessageDestinationRef implements Serializable, Injectable {
 
 
     /**
-     * The name of this destination ref.
-     */
-    private String name = null;
-
-    public String getName() {
-        return (this.name);
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-
-    /**
-     * The type of this destination ref.
-     */
-    private String type = null;
-
-    public String getType() {
-        return (this.type);
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-
-    /**
      * The usage of this destination ref.
      */
     private String usage = null;
@@ -108,17 +63,6 @@ public class MessageDestinationRef implements Serializable, Injectable {
         this.usage = usage;
     }
 
-    private List<InjectionTarget> injectionTargets = new ArrayList<InjectionTarget>();
-
-    public void addInjectionTarget(String injectionTargetName, String jndiName) {
-        InjectionTarget target = new InjectionTarget(injectionTargetName, jndiName);
-        injectionTargets.add(target);
-    }
-
-    public List<InjectionTarget> getInjectionTargets() {
-        return injectionTargets;
-    }
-
     // --------------------------------------------------------- Public Methods
 
 
@@ -130,22 +74,22 @@ public class MessageDestinationRef implements Serializable, Injectable {
 
         StringBuilder sb = new StringBuilder("MessageDestination[");
         sb.append("name=");
-        sb.append(name);
+        sb.append(getName());
         if (link != null) {
             sb.append(", link=");
             sb.append(link);
         }
-        if (type != null) {
+        if (getType() != null) {
             sb.append(", type=");
-            sb.append(type);
+            sb.append(getType());
         }
         if (usage != null) {
             sb.append(", usage=");
             sb.append(usage);
         }
-        if (description != null) {
+        if (getDescription() != null) {
             sb.append(", description=");
-            sb.append(description);
+            sb.append(getDescription());
         }
         sb.append("]");
         return (sb.toString());
@@ -153,21 +97,4 @@ public class MessageDestinationRef implements Serializable, Injectable {
     }
 
 
-    // -------------------------------------------------------- Package Methods
-
-
-    /**
-     * The NamingResources with which we are associated (if any).
-     */
-    protected NamingResources resources = null;
-
-    public NamingResources getNamingResources() {
-        return (this.resources);
-    }
-
-    void setNamingResources(NamingResources resources) {
-        this.resources = resources;
-    }
-
-
 }
index 885d481..b7e3280 100644 (file)
@@ -40,6 +40,7 @@ import org.apache.catalina.Server;
 
 public class NamingResources implements Serializable {
 
+    private static final long serialVersionUID = 1L;
 
     // ----------------------------------------------------------- Constructors
 
@@ -48,6 +49,7 @@ public class NamingResources implements Serializable {
      * Create a new NamingResources instance.
      */
     public NamingResources() {
+        // NOOP
     }
 
 
index 79541bf..4602b29 100644 (file)
@@ -34,6 +34,7 @@ import java.util.ArrayList;
 
 public class ResourceBase implements Serializable, Injectable {
 
+    private static final long serialVersionUID = 1L;
 
     // ------------------------------------------------------------- Properties
 
index 8080f55..d039316 100644 (file)
@@ -41,6 +41,8 @@ import java.io.Serializable;
 
 public class SecurityCollection implements Serializable {
 
+    private static final long serialVersionUID = 1L;
+
     // ----------------------------------------------------------- Constructors
 
 
index ade3d08..36958a4 100644 (file)
@@ -38,6 +38,7 @@ import java.io.Serializable;
 
 public class SecurityConstraint implements Serializable {
 
+    private static final long serialVersionUID = 1L;
 
     // ----------------------------------------------------------- Constructors
 
index 4a42b11..cad08bb 100644 (file)
@@ -33,6 +33,7 @@ import java.io.Serializable;
 
 public class ServletDef implements Serializable {
 
+    private static final long serialVersionUID = 1L;
 
     // ------------------------------------------------------------- Properties