From 9a50c1c1791a590ed8b756bf82be227e5a52783e Mon Sep 17 00:00:00 2001 From: markt Date: Thu, 20 May 2010 11:06:33 +0000 Subject: [PATCH] Remove unused code identified by Eclipse git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@946591 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/jasper/compiler/Parser.java | 1 - .../apache/jasper/compiler/ParserController.java | 16 --------- java/org/apache/jasper/compiler/SmapUtil.java | 38 ---------------------- .../apache/jasper/compiler/TagFileProcessor.java | 2 -- .../apache/jasper/compiler/TagLibraryInfoImpl.java | 3 -- 5 files changed, 60 deletions(-) diff --git a/java/org/apache/jasper/compiler/Parser.java b/java/org/apache/jasper/compiler/Parser.java index c33d76f92..612fb5512 100644 --- a/java/org/apache/jasper/compiler/Parser.java +++ b/java/org/apache/jasper/compiler/Parser.java @@ -18,7 +18,6 @@ package org.apache.jasper.compiler; import java.io.CharArrayWriter; import java.io.FileNotFoundException; -import java.net.URL; import java.util.Iterator; import java.util.List; diff --git a/java/org/apache/jasper/compiler/ParserController.java b/java/org/apache/jasper/compiler/ParserController.java index 53a16bf17..a1d8f5504 100644 --- a/java/org/apache/jasper/compiler/ParserController.java +++ b/java/org/apache/jasper/compiler/ParserController.java @@ -20,8 +20,6 @@ package org.apache.jasper.compiler; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; -import java.net.JarURLConnection; -import java.net.URL; import java.util.Stack; import java.util.jar.JarFile; @@ -606,18 +604,4 @@ class ParserController implements TagConstants { return false; } - - private JarFile getJarFile(URL jarFileUrl) throws IOException { - JarFile jarFile = null; - - if (jarFileUrl != null) { - JarURLConnection conn = (JarURLConnection) jarFileUrl.openConnection(); - conn.setUseCaches(false); - conn.connect(); - jarFile = conn.getJarFile(); - } - - return jarFile; - } - } diff --git a/java/org/apache/jasper/compiler/SmapUtil.java b/java/org/apache/jasper/compiler/SmapUtil.java index ebaf02c2b..d7a933039 100644 --- a/java/org/apache/jasper/compiler/SmapUtil.java +++ b/java/org/apache/jasper/compiler/SmapUtil.java @@ -192,39 +192,6 @@ public class SmapUtil { int sdeIndex; - public static void main(String[] args) throws IOException { - if (args.length == 2) { - install(new File(args[0]), new File(args[1])); - } else if (args.length == 3) { - install( - new File(args[0]), - new File(args[1]), - new File(args[2])); - } else { - System.err.println( - "Usage: " - + " \n" - + " "); - } - } - - static void install(File inClassFile, File attrFile, File outClassFile) - throws IOException { - new SDEInstaller(inClassFile, attrFile, outClassFile); - } - - static void install(File inOutClassFile, File attrFile) - throws IOException { - File tmpFile = new File(inOutClassFile.getPath() + "tmp"); - new SDEInstaller(inOutClassFile, attrFile, tmpFile); - if (!inOutClassFile.delete()) { - throw new IOException("inOutClassFile.delete() failed"); - } - if (!tmpFile.renameTo(inOutClassFile)) { - throw new IOException("tmpFile.renameTo(inOutClassFile) failed"); - } - } - static void install(File classFile, byte[] smap) throws IOException { File tmpFile = new File(classFile.getPath() + "tmp"); new SDEInstaller(classFile, smap, tmpFile); @@ -256,11 +223,6 @@ public class SmapUtil { outStream.close(); } - SDEInstaller(File inClassFile, File attrFile, File outClassFile) - throws IOException { - this(inClassFile, readWhole(attrFile), outClassFile); - } - static byte[] readWhole(File input) throws IOException { FileInputStream inStream = new FileInputStream(input); int len = (int)input.length(); diff --git a/java/org/apache/jasper/compiler/TagFileProcessor.java b/java/org/apache/jasper/compiler/TagFileProcessor.java index cbd7e137d..9b7262492 100644 --- a/java/org/apache/jasper/compiler/TagFileProcessor.java +++ b/java/org/apache/jasper/compiler/TagFileProcessor.java @@ -19,8 +19,6 @@ package org.apache.jasper.compiler; import java.io.FileNotFoundException; import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; import java.util.Iterator; import java.util.Vector; import java.util.HashMap; diff --git a/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java b/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java index d0ab1db23..126caca0d 100644 --- a/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java +++ b/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java @@ -23,7 +23,6 @@ import java.io.FileNotFoundException; import java.io.InputStream; import java.io.PrintWriter; import java.io.StringWriter; -import java.net.JarURLConnection; import java.net.URL; import java.util.Collection; import java.util.Enumeration; @@ -31,8 +30,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Map; import java.util.Vector; -import java.util.jar.JarFile; -import java.util.zip.ZipEntry; import javax.servlet.jsp.tagext.FunctionInfo; import javax.servlet.jsp.tagext.PageData; -- 2.11.0