Author: markt
Date: Tue Sep  5 19:02:37 2006
New Revision: 440566

URL: http://svn.apache.org/viewvc?view=rev&rev=440566
Log:
Remove unused code identified by Eclipse before starting work on bug 30762.

Modified:
    
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java?view=diff&rev=440566&r1=440565&r2=440566
==============================================================================
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java
 Tue Sep  5 19:02:37 2006
@@ -19,12 +19,9 @@
 
 import java.io.BufferedReader;
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.ObjectOutputStream;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -97,7 +94,6 @@
 import org.apache.naming.resources.FileDirContext;
 import org.apache.naming.resources.ProxyDirContext;
 import org.apache.naming.resources.WARDirContext;
-import org.apache.tomcat.util.compat.JdkCompat;
 
 /**
  * Standard implementation of the <b>Context</b> interface.  Each
@@ -142,12 +138,6 @@
 
 
     /**
-     * JDK compatibility support
-     */
-    private static final JdkCompat jdkCompat = JdkCompat.getJdkCompat();
-
-
-    /**
      * Array containing the safe characters set.
      */
     protected static URLEncoder urlEncoder;
@@ -4316,23 +4306,6 @@
        }
      }
     
-    private void cacheContext() {
-        try {
-            File workDir=new File( getWorkPath() );
-            
-            File ctxSer=new File( workDir, "_tomcat_context.ser");
-            FileOutputStream fos=new FileOutputStream( ctxSer );
-            ObjectOutputStream oos=new ObjectOutputStream( fos );
-            oos.writeObject(this);
-            oos.close();
-            fos.close();
-        } catch( Throwable t ) {
-            if(log.isInfoEnabled())
-                log.info("Error saving context.ser ", t);
-        }
-    }
-
-    
     /**
      * Stop this Context component.
      *
@@ -4664,24 +4637,6 @@
 
 
     /**
-     * Get app base.
-     */
-    private String getAppBase() {
-        String appBase = null;
-        Container container = this;
-        while (container != null) {
-            if (container instanceof Host)
-                break;
-            container = container.getParent();
-        }
-        if (container != null) {
-            appBase = ((Host) container).getAppBase();
-        }
-        return appBase;
-    }
-
-
-    /**
      * Get config base.
      */
     public File getConfigBase() {
@@ -4729,46 +4684,6 @@
 
 
     /**
-     * Copy a file.
-     */
-    private boolean copy(File src, File dest) {
-        FileInputStream is = null;
-        FileOutputStream os = null;
-        try {
-            is = new FileInputStream(src);
-            os = new FileOutputStream(dest);
-            byte[] buf = new byte[4096];
-            while (true) {
-                int len = is.read(buf);
-                if (len < 0)
-                    break;
-                os.write(buf, 0, len);
-            }
-            is.close();
-            os.close();
-        } catch (IOException e) {
-            return false;
-        } finally {
-            try {
-                if (is != null) {
-                    is.close();
-                }
-            } catch (Exception e) {
-                // Ignore
-            }
-            try {
-                if (os != null) {
-                    os.close();
-                }
-            } catch (Exception e) {
-                // Ignore
-            }
-        }
-        return true;
-    }
-
-
-    /**
      * Get naming context full name.
      */
     private String getNamingContextName() {
@@ -4800,18 +4715,6 @@
     public boolean getPaused() {
 
         return (this.paused);
-
-    }
-
-
-    /**
-     * Post a copy of our web application resources as a servlet context
-     * attribute.
-     */
-    private void postResources() {
-
-        getServletContext().setAttribute
-            (Globals.RESOURCES_ATTR, getResources());
 
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to