diff --git a/classpath/avian/http/Handler.java b/classpath/avian/http/Handler.java new file mode 100644 index 0000000000..70e7cea519 --- /dev/null +++ b/classpath/avian/http/Handler.java @@ -0,0 +1,26 @@ +/* Copyright (c) 2012, Avian Contributors + + Permission to use, copy, modify, and/or distribute this software + for any purpose with or without fee is hereby granted, provided + that the above copyright notice and this permission notice appear + in all copies. + + There is NO WARRANTY for this software. See license.txt for + details. */ + +package avian.http; + +import java.net.URL; +import java.net.URLStreamHandler; +import java.net.URLConnection; +import java.io.IOException; +import java.io.FileNotFoundException; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; + +public class Handler extends URLStreamHandler { + protected URLConnection openConnection(URL url) { + throw new UnsupportedOperationException(); + } +} diff --git a/classpath/java/net/URL.java b/classpath/java/net/URL.java index 6cd8e92095..d1c97450ec 100644 --- a/classpath/java/net/URL.java +++ b/classpath/java/net/URL.java @@ -81,10 +81,8 @@ public final class URL { private static URLStreamHandler findHandler(String protocol) throws MalformedURLException { - if ("http".equals(protocol)) { - return new avian.file.Handler(); - } else if ("https".equals(protocol)) { - return new avian.file.Handler(); + 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)) { diff --git a/makefile b/makefile index f72b091054..147bb6f3de 100755 --- a/makefile +++ b/makefile @@ -1,4 +1,4 @@ -#MAKEFLAGS = -s +MAKEFLAGS = -s name = avian version = 0.5