diff src/org/eclipse/jetty/util/resource/Resource.java @ 830:7c737c376bc3

remove Loader
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 15 Sep 2016 18:30:38 -0600
parents f89abbfb3a8f
children 6939226e0ac4
line wrap: on
line diff
--- a/src/org/eclipse/jetty/util/resource/Resource.java	Thu Sep 15 18:16:25 2016 -0600
+++ b/src/org/eclipse/jetty/util/resource/Resource.java	Thu Sep 15 18:30:38 2016 -0600
@@ -32,7 +32,6 @@
 import java.util.Date;
 
 import org.eclipse.jetty.util.IO;
-import org.eclipse.jetty.util.Loader;
 import org.eclipse.jetty.util.StringUtil;
 import org.eclipse.jetty.util.URIUtil;
 import org.slf4j.Logger;
@@ -258,37 +257,6 @@
 	}
 
 	/* ------------------------------------------------------------ */
-	/** Find a classpath resource.
-	 */
-	public static Resource newClassPathResource(String resource)
-	{
-		return newClassPathResource(resource,true,false);
-	}
-
-	/* ------------------------------------------------------------ */
-	/** Find a classpath resource.
-	 * The {@link java.lang.Class#getResource(String)} method is used to lookup the resource. If it is not
-	 * found, then the {@link Loader#getResource(Class, String, boolean)} method is used.
-	 * If it is still not found, then {@link ClassLoader#getSystemResource(String)} is used.
-	 * Unlike {@link ClassLoader#getSystemResource(String)} this method does not check for normal resources.
-	 * @param name The relative name of the resource
-	 * @param useCaches True if URL caches are to be used.
-	 * @param checkParents True if forced searching of parent Classloaders is performed to work around 
-	 * loaders with inverted priorities
-	 * @return Resource or null
-	 */
-	public static Resource newClassPathResource(String name,boolean useCaches,boolean checkParents)
-	{
-		URL url=Resource.class.getResource(name);
-		
-		if (url==null)
-			url=Loader.getResource(Resource.class,name,checkParents);
-		if (url==null)
-			return null;
-		return newResource(url,useCaches);
-	}
-	
-	/* ------------------------------------------------------------ */
 	public static boolean isContainedIn (Resource r, Resource containingResource) throws MalformedURLException
 	{
 		return r.isContainedIn(containingResource);