https://bz.apache.org/bugzilla/show_bug.cgi?id=58086
Lukasz Jader <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Status|RESOLVED |REOPENED --- Comment #2 from Lukasz Jader <[email protected]> --- @Violeta Georgieva I'm searching a little bit more about this and I found out, that this is much more complicated issue - sorry for misleading you. Previous implementation worked for all kind of local filesystem files, because when: a) war="C:/Users/john/app.war" was loaded using FileInputStream b) war="file:/C:/Users/john/app.war" was loaded using URL and URLConnection (effectively FileURLConnection) But it does not worked other protocols (ex. "http", "https"), since it tried to load them using "FileInputStream". Current implementation (AFTER FIX) does NOT WORK for any of local filesystem files, because when: a) war="C:/Users/john/app.war" was loaded using URL and URLConnection - and the exception is thrown java.net.MalformedURLException: no protocol b) war="file:/C:/Users/john/app.war" was is loaded using FileInputStream, which in constructor uses java.io.File, which incorrectly handles files URIs in different situations: https://weblogs.java.net/blog/kohsuke/archive/2007/04/how_to_convert.html http://bugs.java.com/view_bug.do?bug_id=5086147 https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/FileUtils.html#toFile%28java.net.URL%29 I don't see any quick solution to this fix :(. I think the best way would be reverting previous commit and figuring out how to implement this. For my own needs I've dirty fixed this problem to: if (war.startsWith("file:") || war.startsWith("http:") || war.startsWith("https:")) { //execute the URL code } else { //execute the File code as fallback } -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
