Remove unused variables identified by Eclipse
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 15 Jan 2009 14:55:46 +0000 (14:55 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 15 Jan 2009 14:55:46 +0000 (14:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@734728 13f79535-47bb-0310-9956-ffa450edef68

21 files changed:
java/org/apache/catalina/ha/session/SimpleTcpReplicationManager.java
java/org/apache/catalina/startup/ConnectorCreateRule.java
java/org/apache/catalina/startup/WebRuleSet.java
java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java
java/org/apache/coyote/ajp/AjpAprProcessor.java
java/org/apache/coyote/ajp/AjpProcessor.java
java/org/apache/coyote/http11/Http11AprProcessor.java
java/org/apache/coyote/http11/Http11NioProcessor.java
java/org/apache/coyote/http11/Http11Processor.java
java/org/apache/jasper/runtime/JspRuntimeLibrary.java
java/org/apache/jasper/xmlparser/ParserUtils.java
java/org/apache/jk/common/ChannelJni.java
java/org/apache/jk/common/ChannelUn.java
java/org/apache/jk/config/NSConfig.java
java/org/apache/naming/factory/ResourceLinkFactory.java
java/org/apache/tomcat/util/IntrospectionUtils.java
java/org/apache/tomcat/util/buf/HexUtils.java
java/org/apache/tomcat/util/digester/NodeCreateRule.java
java/org/apache/tomcat/util/http/mapper/Mapper.java
java/org/apache/tomcat/util/modeler/Registry.java
java/org/apache/tomcat/util/modeler/modules/MbeansSource.java

index 07cc3fc..d659abe 100644 (file)
@@ -604,7 +604,7 @@ public class SimpleTcpReplicationManager extends StandardManager implements Clus
                     for ( int i=0; i<size; i++) {
                         String id = oin.readUTF();
                         byte[] data = (byte[])oin.readObject();
-                        Session session = readSession(data,id);
+                        readSession(data,id);
                     }//for
                     stateTransferred=true;
                     break;
index 58f971c..936ee46 100644 (file)
@@ -84,7 +84,7 @@ public class ConnectorCreateRule extends Rule {
      *   the element name otherwise
      */
     public void end(String namespace, String name) throws Exception {
-        Object top = digester.pop();
+        digester.pop();
     }
 
 
index 7323bcd..16c1423 100644 (file)
@@ -808,8 +808,8 @@ final class CallMethodMultiRule extends CallMethodRule {
         
         if (multiParams == null) {
             paramValues[multiParamIndex] = null;
-            Object result = IntrospectionUtils.callMethodN(target, methodName,
-                    paramValues, paramTypes);   
+            IntrospectionUtils.callMethodN(target, methodName, paramValues,
+                    paramTypes);   
             return;
         }
         
@@ -822,8 +822,8 @@ final class CallMethodMultiRule extends CallMethodRule {
             } else {
                 paramValues[multiParamIndex] = param;
             }
-            Object result = IntrospectionUtils.callMethodN(target, methodName,
-                    paramValues, paramTypes);   
+            IntrospectionUtils.callMethodN(target, methodName, paramValues,
+                    paramTypes);   
         }
         
     }
index 2515d59..3dd4129 100644 (file)
@@ -92,7 +92,7 @@ public class GzipInterceptor extends ChannelInterceptorBase {
         byte[] data = new byte[1024];
         Arrays.fill(data,(byte)1);
         byte[] compress = compress(data);
-        byte[] decompress = decompress(compress);
+        decompress(compress);
         System.out.println("Debug test");
         
     }
index baff663..5e97712 100644 (file)
@@ -96,7 +96,7 @@ public class AjpAprProcessor implements ActionHook {
         outputBuffer = ByteBuffer.allocateDirect(packetSize * 2);
 
         // Cause loading of HexUtils
-        int foo = HexUtils.DEC[0];
+        HexUtils.load();
 
         // Cause loading of HttpMessages
         HttpMessages.getMessage(200);
@@ -1142,7 +1142,6 @@ public class AjpAprProcessor implements ActionHook {
             boolean useAvailableData)
         throws IOException {
 
-        byte[] buf = message.getBuffer();
         int headerLength = message.getHeaderLength();
 
         if (first) {
index ae07711..32346b4 100644 (file)
@@ -91,7 +91,7 @@ public class AjpProcessor implements ActionHook {
         bodyMessage = new AjpMessage(packetSize);
         
         // Cause loading of HexUtils
-        int foo = HexUtils.DEC[0];
+        HexUtils.load();
 
         // Cause loading of HttpMessages
         HttpMessages.getMessage(200);
index 3a57fae..626367b 100644 (file)
@@ -101,7 +101,7 @@ public class Http11AprProcessor implements ActionHook {
         initializeFilters();
 
         // Cause loading of HexUtils
-        int foo = HexUtils.DEC[0];
+        HexUtils.load();
 
         // Cause loading of FastHttpDateFormat
         FastHttpDateFormat.getCurrentDate();
index 38523b9..3de3453 100644 (file)
@@ -103,7 +103,7 @@ public class Http11NioProcessor implements ActionHook {
         initializeFilters();
 
         // Cause loading of HexUtils
-        int foo = HexUtils.DEC[0];
+        HexUtils.load();
 
         // Cause loading of FastHttpDateFormat
         FastHttpDateFormat.getCurrentDate();
index d593d55..5abe42e 100644 (file)
@@ -96,7 +96,7 @@ public class Http11Processor implements ActionHook {
         initializeFilters();
 
         // Cause loading of HexUtils
-        int foo = HexUtils.DEC[0];
+        HexUtils.load();
 
     }
 
index 09b1ae7..e7e45be 100644 (file)
@@ -346,7 +346,6 @@ public class JspRuntimeLibrary {
                     if(t.equals(String.class)) {
                         method.invoke(bean, new Object[] { values });
                     } else {
-                        Object tmpval = null;
                         createTypedArray (prop, bean, method, values, t,
                                           propertyEditorClass); 
                     }
@@ -573,7 +572,6 @@ public class JspRuntimeLibrary {
     //allocate the buffer - use byte[] to avoid calls to new.
         byte holdbuffer[] = new byte[encoded.length()];
 
-        char holdchar;
         int bufcount = 0;
 
         for (int count = 0; count < encoded.length(); count++) {
index e73f9e4..7f9a71f 100644 (file)
@@ -176,7 +176,7 @@ public class ParserUtils {
                             treeNode.setBody(body);
                     }
                 } else {
-                    TreeNode treeChild = convert(treeNode, child);
+                    convert(treeNode, child);
                 }
             }
         }
index 673643a..6a323fe 100644 (file)
@@ -147,7 +147,6 @@ public class ChannelJni extends JniHandler implements JkChannel {
         if( apr==null ) return -1;
         
         long xEnv=ep.getJniEnv();
-        long cEndpointP=ep.getJniContext();
 
         int type=ep.getType();
         if( log.isDebugEnabled() ) log.debug("ChannelJni.invoke: "  + ep + " " + type);
index d9f2899..ceab769 100644 (file)
@@ -305,7 +305,7 @@ public class ChannelUn extends JniHandler implements JkChannel {
                 }
                 ep.setType(0);
                 log.debug( "Process msg ");
-                int status=next.invoke( recv, ep );
+                next.invoke( recv, ep );
             }
             if( log.isDebugEnabled() )
                 log.debug( "Closing un channel");
index 6b9105d..f1203ef 100644 (file)
@@ -246,7 +246,6 @@ public class NSConfig  extends BaseJkConfig {
     protected void generateStupidMappings(Context context, PrintWriter objfile )
     {
         String ctxPath  = context.getPath();
-       String nPath=("".equals(ctxPath)) ? "/" : ctxPath;
 
         if( noRoot &&  "".equals(ctxPath) ) {
             log.debug("Ignoring root context in forward-all mode  ");
index 9e23716..b0c4a10 100644 (file)
@@ -86,8 +86,6 @@ public class ResourceLinkFactory
         // Can we process this request?
         Reference ref = (Reference) obj;
 
-        String type = ref.getClassName();
-
         // Read the global ref addr
         String globalName = null;
         RefAddr refAddr = ref.get(ResourceLinkRef.GLOBALNAME);
index 2a46bcb..83bdfdf 100644 (file)
@@ -451,7 +451,6 @@ public final class IntrospectionUtils {
         String setter = "set" + capitalize(name);
         try {
             Method methods[] = findMethods(o.getClass());
-            Method setPropertyMethod = null;
             // find setFoo() method
             for (int i = 0; i < methods.length; i++) {
                 Class<?> paramT[] = methods[i].getParameterTypes();
@@ -644,7 +643,6 @@ public final class IntrospectionUtils {
     public static void addJarsFromClassPath(Vector<URL> jars, String cp)
             throws IOException, MalformedURLException {
         String sep = System.getProperty("path.separator");
-        String token;
         StringTokenizer st;
         if (cp != null) {
             st = new StringTokenizer(cp, sep);
index 0049961..991578a 100644 (file)
@@ -175,6 +175,13 @@ public final class HexUtils {
 
 
     /**
+     * Provide a mechanism for ensuring this class is loaded. 
+     */
+    public static void load() {
+        // Nothing to do
+    }
+
+    /**
      * [Private] Convert the specified value (0 .. 15) to the corresponding
      * hexadecimal digit.
      *
@@ -191,4 +198,4 @@ public final class HexUtils {
     }
 
 
-}
+}
\ No newline at end of file
index 293a51e..4465576 100644 (file)
@@ -427,7 +427,7 @@ public class NodeCreateRule extends Rule {
      */
     public void end(String namespace, String name) throws Exception {
 
-        Object top = digester.pop();
+        digester.pop();
 
     }
 
index f5316b2..1d34bbb 100644 (file)
@@ -867,7 +867,6 @@ public final class Mapper {
          MappingData mappingData) {
 
         int pathEnd = path.getEnd();
-        int pathOffset = path.getOffset();
 
         int lastSlash = -1;
         int length = -1;
index 75697f1..584640d 100644 (file)
@@ -491,7 +491,6 @@ public class Registry implements RegistryMBean, MBeanRegistration  {
      */ 
     public MBeanOperationInfo getMethodInfo( ObjectName oname, String opName )
     {
-        String type=null;
         MBeanInfo info=null;
         try {
             info=server.getMBeanInfo(oname);
index c95e52d..cd3701d 100644 (file)
@@ -355,7 +355,7 @@ public class MbeansSource extends ModelerSource implements MbeansSourceMBean
         for (Node argN = firstArgN; argN != null;
              argN = DomUtil.getNext( argN ))
         {
-            String type=DomUtil.getAttribute(argN, "type");
+            DomUtil.getAttribute(argN, "type");
             String value=DomUtil.getAttribute(argN, "value");
             if( value==null ) {
                 // The value may be specified as CDATA