diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java b/jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java index a9630e6019c..f80e5ab5f54 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java @@ -218,8 +218,7 @@ public abstract class Resource implements ResourceFactory { URL url=null; // Try to format as a URL? - ClassLoader - loader=Thread.currentThread().getContextClassLoader(); + ClassLoader loader=Thread.currentThread().getContextClassLoader(); if (loader!=null) { try @@ -251,7 +250,7 @@ public abstract class Resource implements ResourceFactory { url=ClassLoader.getSystemResource(resource); if (url==null && resource.startsWith("/")) - url=loader.getResource(resource.substring(1)); + url=ClassLoader.getSystemResource(resource.substring(1)); } if (url==null)