Skip to content

Commit

Permalink
Fix the use of deprecated method .toURL in File objects. Fixes issue s…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorge Barreiro committed Jul 3, 2012
1 parent c7752d2 commit 9114e3c
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -143,7 +143,7 @@ private Element loadSitemeshXML()
is = config.getServletContext().getResourceAsStream(configFileName); is = config.getServletContext().getResourceAsStream(configFileName);
} }
else if (configFile.exists() && configFile.canRead()) { else if (configFile.exists() && configFile.canRead()) {
is = configFile.toURL().openStream(); is = configFile.toURI().toURL().openStream();
} }


if (is == null){ // load the default sitemesh configuration if (is == null){ // load the default sitemesh configuration
Expand Down Expand Up @@ -181,7 +181,7 @@ private void loadExcludes()
is = config.getServletContext().getResourceAsStream(excludesFileName); is = config.getServletContext().getResourceAsStream(excludesFileName);
} }
else if (excludesFile.exists() && excludesFile.canRead()) { else if (excludesFile.exists() && excludesFile.canRead()) {
is = excludesFile.toURL().openStream(); is = excludesFile.toURI().toURL().openStream();
} }


if (is == null){ if (is == null){
Expand Down Expand Up @@ -308,4 +308,4 @@ private String replaceProperties(String str) {
} }
return str; return str;
} }
} }

0 comments on commit 9114e3c

Please sign in to comment.