Index: luni/src/main/java/java/net/URL.java =================================================================== --- luni/src/main/java/java/net/URL.java (revision 501740) +++ luni/src/main/java/java/net/URL.java (working copy) @@ -593,14 +593,14 @@ strmHandler = (URLStreamHandler) Class.forName(className, true, ClassLoader.getSystemClassLoader()) .newInstance(); + if (strmHandler != null) { + streamHandlers.put(protocol, strmHandler); + } + return; } catch (IllegalAccessException e) { } catch (InstantiationException e) { } catch (ClassNotFoundException e) { } - if (strmHandler != null) { - streamHandlers.put(protocol, strmHandler); - } - return; } }