Permalink
Browse files

Fix the use of deprecated method .toURL in File objects. Fixes issue #18

.
  • Loading branch information...
Jorge Barreiro
Jorge Barreiro committed Jul 3, 2012
1 parent c7752d2 commit 9114e3c6c9113270e3b9149953437a5b273fae3a
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/java/com/opensymphony/module/sitemesh/factory/DefaultFactory.java
@@ -143,7 +143,7 @@ private Element loadSitemeshXML()
is = config.getServletContext().getResourceAsStream(configFileName);
}
else if (configFile.exists() && configFile.canRead()) {
- is = configFile.toURL().openStream();
+ is = configFile.toURI().toURL().openStream();
}
if (is == null){ // load the default sitemesh configuration
@@ -181,7 +181,7 @@ private void loadExcludes()
is = config.getServletContext().getResourceAsStream(excludesFileName);
}
else if (excludesFile.exists() && excludesFile.canRead()) {
- is = excludesFile.toURL().openStream();
+ is = excludesFile.toURI().toURL().openStream();
}
if (is == null){
@@ -308,4 +308,4 @@ private String replaceProperties(String str) {
}
return str;
}
-}
+}

0 comments on commit 9114e3c

Please sign in to comment.