Merge remote branch 'oss/master' into jdk7

This commit is contained in:
Joel Dice
2012-02-27 18:19:22 -07:00
9 changed files with 50 additions and 10 deletions

View File

@ -81,7 +81,9 @@ public final class URL {
private static URLStreamHandler findHandler(String protocol)
throws MalformedURLException
{
if ("resource".equals(protocol)) {
if ("http".equals(protocol) || "https".equals(protocol)) {
return new avian.http.Handler();
} else if ("resource".equals(protocol)) {
return new avian.resource.Handler();
} else if ("file".equals(protocol)) {
return new avian.file.Handler();

View File

@ -38,7 +38,7 @@ public abstract class URLStreamHandler {
host = s.substring(0, slash);
} else {
host = s.substring(0, colon);
port = Integer.parseInt(s.substring(colon + 1), slash);
port = Integer.parseInt(s.substring(colon + 1, slash));
}
s = s.substring(slash);
}