Index: C:/harmony/trunk_0427/modules/luni/src/main/java/java/net/URL.java =================================================================== --- C:/harmony/trunk_0427/modules/luni/src/main/java/java/net/URL.java (revision 422613) +++ C:/harmony/trunk_0427/modules/luni/src/main/java/java/net/URL.java (working copy) @@ -252,6 +252,9 @@ } catch (NullPointerException e) { throw new MalformedURLException(e.toString()); } + if (index == 0) { + throw new MalformedURLException("no protocol: " + spec); + } int startIPv6Addr = spec.indexOf('['); if (index >= 0) { if ((startIPv6Addr == -1) || (index < startIPv6Addr)) {