Skip to content
Snippets Groups Projects
Commit cff50b78 authored by charlesr's avatar charlesr
Browse files

fix: - Spaces in URL throws exception under Windows. You should use 'new...

fix: - Spaces in URL throws exception under Windows. You should use 'new File(url.toURI())' for a correct conversion.

SVN: 4563
parent e38f64a7
No related branches found
No related tags found
No related merge requests found
...@@ -29,6 +29,7 @@ import java.io.InputStream; ...@@ -29,6 +29,7 @@ import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.StringWriter; import java.io.StringWriter;
import java.net.URISyntaxException;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
...@@ -263,7 +264,13 @@ public final class FileUtilities ...@@ -263,7 +264,13 @@ public final class FileUtilities
{ {
return null; return null;
} }
return new BufferedReader(new FileReader(new File(url.getFile()))); try
{
return new BufferedReader(new FileReader(new File(url.toURI())));
} catch (URISyntaxException ex)
{
throw new CheckedExceptionTunnel(ex);
}
} }
private static String readString(BufferedReader reader) throws IOException private static String readString(BufferedReader reader) throws IOException
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment