Allow ShibResources to be relative file paths.
authorcantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 14 Jun 2005 01:36:37 +0000 (01:36 +0000)
committercantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 14 Jun 2005 01:36:37 +0000 (01:36 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1617 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/common/ShibResource.java

index c0af702..2dc7d89 100755 (executable)
@@ -39,12 +39,14 @@ public class ShibResource {
        public ShibResource(String name, Class requester) throws ResourceNotAvailableException {
 
                try {
-                       resource = new URL(name);
+                       resource = new URL(new URL("file:"), name);
                } catch (MalformedURLException e) {
                        resource = requester.getResource(name);
                }
-               if (resource == null) { throw new ResourceNotAvailableException(
-                               "ShibResource could not be found at the specified location: " + name); }
+               if (resource == null) {
+                       throw new ResourceNotAvailableException(
+                               "ShibResource could not be found at the specified location: " + name);
+               }
        }
 
        /**