Lines 34-39
Link Here
|
34 |
import java.io.StringReader; |
34 |
import java.io.StringReader; |
35 |
import java.io.Writer; |
35 |
import java.io.Writer; |
36 |
import java.net.MalformedURLException; |
36 |
import java.net.MalformedURLException; |
|
|
37 |
import java.net.URISyntaxException; |
37 |
import java.net.URL; |
38 |
import java.net.URL; |
38 |
import java.util.ArrayList; |
39 |
import java.util.ArrayList; |
39 |
import java.util.Arrays; |
40 |
import java.util.Arrays; |
Lines 1387-1398
Link Here
|
1387 |
List<String> ret = new LinkedList<String>(); |
1388 |
List<String> ret = new LinkedList<String>(); |
1388 |
if (urls != null) { |
1389 |
if (urls != null) { |
1389 |
for (int i = 0; i < urls.length; i++) { |
1390 |
for (int i = 0; i < urls.length; i++) { |
1390 |
ret.add(urls[i].getPath()); |
1391 |
ret.add(toPathString(urls[i])); |
1391 |
} |
1392 |
} |
1392 |
} |
1393 |
} |
1393 |
return ret; |
1394 |
return ret; |
1394 |
} |
1395 |
} |
1395 |
|
1396 |
|
|
|
1397 |
private static String toPathString(URL url) { |
1398 |
try { |
1399 |
return url.toURI().getPath(); |
1400 |
} catch (URISyntaxException e) { |
1401 |
System.err.println("Warning!! Malformed URL may cause problems: "+url); // TODO: Better way to report this? |
1402 |
//In this case it was likely not using |
1403 |
//properly escaped characters so we just use the 'bad' method that doesn't decode |
1404 |
//special chars. |
1405 |
return url.getPath(); |
1406 |
} |
1407 |
} |
1408 |
|
1396 |
/** |
1409 |
/** |
1397 |
* A pipe when run reads from an input stream to an output stream, optionally sleeping between reads. |
1410 |
* A pipe when run reads from an input stream to an output stream, optionally sleeping between reads. |
1398 |
* |
1411 |
* |