283344 - Startup on windows is broken
* Catch bad escaping condition with URLClassLoader.newResource() with Windows paths like "C:\dev" (note, that "\d" is the digit escaping sequence) git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@554 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
ce97a37180
commit
f62c12800d
|
@ -210,9 +210,19 @@ public abstract class Resource implements Serializable
|
|||
loader=Thread.currentThread().getContextClassLoader();
|
||||
if (loader!=null)
|
||||
{
|
||||
url=loader.getResource(resource);
|
||||
if (url==null && resource.startsWith("/"))
|
||||
url=loader.getResource(resource.substring(1));
|
||||
try
|
||||
{
|
||||
url = loader.getResource(resource);
|
||||
if (url == null && resource.startsWith("/"))
|
||||
url = loader.getResource(resource.substring(1));
|
||||
}
|
||||
catch (IllegalArgumentException e)
|
||||
{
|
||||
// Catches scenario where a bad Windows path like "C:\dev" is
|
||||
// improperly escaped, which various downstream classloaders
|
||||
// tend to have a problem with
|
||||
url = null;
|
||||
}
|
||||
}
|
||||
if (url==null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue