You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/11/14 17:28:14 UTC

svn commit: r1541960 - in /tomcat/trunk/java/org/apache/jasper: JspCompilationContext.java compiler/Parser.java compiler/TagLibraryInfoImpl.java

Author: markt
Date: Thu Nov 14 16:28:14 2013
New Revision: 1541960

URL: http://svn.apache.org/r1541960
Log:
Remove unused code

Modified:
    tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java
    tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
    tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java

Modified: tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java?rev=1541960&r1=1541959&r2=1541960&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java (original)
+++ tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java Thu Nov 14 16:28:14 2013
@@ -24,8 +24,6 @@ import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.net.URLConnection;
-import java.util.HashMap;
-import java.util.Map;
 import java.util.Set;
 
 import javax.servlet.ServletContext;
@@ -61,8 +59,6 @@ public class JspCompilationContext {
 
     private final Log log = LogFactory.getLog(JspCompilationContext.class); // must not be static
 
-    private final Map<String, Jar> tagFileJars;
-
     private String className;
     private final String jspUri;
     private String basePackageName;
@@ -131,7 +127,6 @@ public class JspCompilationContext {
         this.baseURI = baseURI;
 
         this.rctxt = rctxt;
-        this.tagFileJars = new HashMap<>();
         this.basePackageName = Constants.JSP_PACKAGE_NAME;
 
         this.tagInfo = tagInfo;
@@ -285,24 +280,7 @@ public class JspCompilationContext {
 
 
     public URL getResource(String res) throws MalformedURLException {
-        URL result = null;
-
-        if (res.startsWith("/META-INF/")) {
-            // This is a tag file packaged in a jar that is being compiled
-            Jar jar = tagFileJars.get(res);
-            if (jar == null) {
-                jar = tagJar;
-            }
-            if (jar != null) {
-                result = new URL(jar.getURL(res.substring(1)));
-            } else {
-                // May not be in a JAR in some IDE environments
-                result = context.getResource(canonicalURI(res));
-            }
-        } else {
-            result = context.getResource(canonicalURI(res));
-        }
-        return result;
+        return context.getResource(canonicalURI(res));
     }
 
 
@@ -322,22 +300,6 @@ public class JspCompilationContext {
     }
 
     /**
-     * Returns the tag-file-name-to-JAR-file map of this compilation unit,
-     * which maps tag file names to the JAR files in which the tag files are
-     * packaged.
-     *
-     * The map is populated when parsing the tag-file elements of the TLDs
-     * of any imported taglibs.
-     */
-    public Jar getTagFileJar(String tagFile) {
-        return this.tagFileJars.get(tagFile);
-    }
-
-    public void setTagFileJarResource(String tagFile, Jar jar) {
-        this.tagFileJars.put(tagFile, jar);
-    }
-
-    /**
      * Returns the JAR file in which the tag file for which this
      * JspCompilationContext was created is packaged, or null if this
      * JspCompilationContext does not correspond to a tag file, or if the

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Parser.java?rev=1541960&r1=1541959&r2=1541960&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Thu Nov 14 16:28:14 2013
@@ -413,13 +413,6 @@ class Parser implements TagConstants {
                         if (ctxt.getOptions().isCaching()) {
                             ctxt.getOptions().getCache().put(uri, impl);
                         }
-                    } else {
-                        // Current compilation context needs location of cached
-                        // tag files
-                        for (TagFileInfo info : impl.getTagFiles()) {
-                            ctxt.setTagFileJarResource(info.getPath(),
-                                    ctxt.getTagFileJar());
-                        }
                     }
                     pageInfo.addTaglib(uri, impl);
                 }

Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java?rev=1541960&r1=1541959&r2=1541960&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java Thu Nov 14 16:28:14 2013
@@ -285,12 +285,6 @@ class TagLibraryInfoImpl extends TagLibr
         if (path == null) {
             // path is required
             err.jspError("jsp.error.tagfile.missingPath");
-        } else if (path.startsWith("/META-INF/tags")) {
-            // Tag file packaged in JAR
-            // See https://issues.apache.org/bugzilla/show_bug.cgi?id=46471
-            // This needs to be removed once all the broken code that depends on
-            // it has been removed
-            ctxt.setTagFileJarResource(path, jar);
         } else if (!path.startsWith("/WEB-INF/tags")) {
             err.jspError("jsp.error.tagfile.illegalPath", path);
         }



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