1.1 --- a/rt/emul/mini/src/main/java/java/net/URL.java Mon Oct 14 16:44:55 2013 +0200
1.2 +++ b/rt/emul/mini/src/main/java/java/net/URL.java Fri Oct 18 12:29:14 2013 +0200
1.3 @@ -1044,11 +1044,15 @@
1.4 public final Object getContent(Class[] classes)
1.5 throws java.io.IOException {
1.6 for (Class<?> c : classes) {
1.7 - if (c == String.class) {
1.8 - return loadText(toExternalForm());
1.9 - }
1.10 - if (c == byte[].class) {
1.11 - return loadBytes(toExternalForm(), new byte[0]);
1.12 + try {
1.13 + if (c == String.class) {
1.14 + return loadText(toExternalForm());
1.15 + }
1.16 + if (c == byte[].class) {
1.17 + return loadBytes(toExternalForm(), new byte[0]);
1.18 + }
1.19 + } catch (Throwable t) {
1.20 + throw new IOException(t);
1.21 }
1.22 }
1.23 return null;