Merge remote-tracking branch 'origin/jetty-7' into jetty-8
This commit is contained in:
commit
d269015c7d
|
@ -47,7 +47,6 @@ public class Loader
|
|||
{
|
||||
/* ------------------------------------------------------------ */
|
||||
public static URL getResource(Class<?> loadClass,String name, boolean checkParents)
|
||||
throws ClassNotFoundException
|
||||
{
|
||||
URL url =null;
|
||||
ClassLoader loader=Thread.currentThread().getContextClassLoader();
|
||||
|
|
|
@ -91,7 +91,7 @@ public class Log
|
|||
* configuration of the Log class in situations where access to the System.properties are
|
||||
* either too late or just impossible.
|
||||
*/
|
||||
URL testProps = Log.class.getClassLoader().getResource("jetty-logging.properties");
|
||||
URL testProps = Loader.getResource(Log.class,"jetty-logging.properties",true);
|
||||
if (testProps != null)
|
||||
{
|
||||
InputStream in = null;
|
||||
|
@ -234,7 +234,7 @@ public class Log
|
|||
public static void setLogToParent(String name)
|
||||
{
|
||||
ClassLoader loader = Log.class.getClassLoader();
|
||||
if (loader.getParent()!=null)
|
||||
if (loader!=null && loader.getParent()!=null)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
@ -298,16 +298,7 @@ public abstract class Resource implements ResourceFactory
|
|||
URL url=Resource.class.getResource(name);
|
||||
|
||||
if (url==null)
|
||||
{
|
||||
try
|
||||
{
|
||||
url=Loader.getResource(Resource.class,name,checkParents);
|
||||
}
|
||||
catch(ClassNotFoundException e)
|
||||
{
|
||||
url=ClassLoader.getSystemResource(name);
|
||||
}
|
||||
}
|
||||
url=Loader.getResource(Resource.class,name,checkParents);
|
||||
if (url==null)
|
||||
return null;
|
||||
return newResource(url,useCaches);
|
||||
|
|
|
@ -117,30 +117,23 @@ public class XmlConfiguration
|
|||
private synchronized static XmlParser initParser()
|
||||
{
|
||||
XmlParser parser = new XmlParser();
|
||||
try
|
||||
{
|
||||
URL config60 = Loader.getResource(XmlConfiguration.class,"org/eclipse/jetty/xml/configure_6_0.dtd",true);
|
||||
URL config76 = Loader.getResource(XmlConfiguration.class,"org/eclipse/jetty/xml/configure_7_6.dtd",true);
|
||||
parser.redirectEntity("configure.dtd",config76);
|
||||
parser.redirectEntity("configure_1_0.dtd",config60);
|
||||
parser.redirectEntity("configure_1_1.dtd",config60);
|
||||
parser.redirectEntity("configure_1_2.dtd",config60);
|
||||
parser.redirectEntity("configure_1_3.dtd",config60);
|
||||
parser.redirectEntity("configure_6_0.dtd",config60);
|
||||
parser.redirectEntity("configure_7_6.dtd",config76);
|
||||
URL config60 = Loader.getResource(XmlConfiguration.class,"org/eclipse/jetty/xml/configure_6_0.dtd",true);
|
||||
URL config76 = Loader.getResource(XmlConfiguration.class,"org/eclipse/jetty/xml/configure_7_6.dtd",true);
|
||||
parser.redirectEntity("configure.dtd",config76);
|
||||
parser.redirectEntity("configure_1_0.dtd",config60);
|
||||
parser.redirectEntity("configure_1_1.dtd",config60);
|
||||
parser.redirectEntity("configure_1_2.dtd",config60);
|
||||
parser.redirectEntity("configure_1_3.dtd",config60);
|
||||
parser.redirectEntity("configure_6_0.dtd",config60);
|
||||
parser.redirectEntity("configure_7_6.dtd",config76);
|
||||
|
||||
parser.redirectEntity("http://jetty.mortbay.org/configure.dtd",config76);
|
||||
parser.redirectEntity("http://jetty.eclipse.org/configure.dtd",config76);
|
||||
parser.redirectEntity("http://www.eclipse.org/jetty/configure.dtd",config76);
|
||||
parser.redirectEntity("http://jetty.mortbay.org/configure.dtd",config76);
|
||||
parser.redirectEntity("http://jetty.eclipse.org/configure.dtd",config76);
|
||||
parser.redirectEntity("http://www.eclipse.org/jetty/configure.dtd",config76);
|
||||
|
||||
parser.redirectEntity("-//Mort Bay Consulting//DTD Configure//EN",config76);
|
||||
parser.redirectEntity("-//Jetty//Configure//EN",config76);
|
||||
|
||||
parser.redirectEntity("-//Mort Bay Consulting//DTD Configure//EN",config76);
|
||||
parser.redirectEntity("-//Jetty//Configure//EN",config76);
|
||||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
LOG.warn(e.toString());
|
||||
LOG.debug(e);
|
||||
}
|
||||
return parser;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue