diff --git a/jdk/src/share/classes/java/net/ContentHandler.java b/jdk/src/share/classes/java/net/ContentHandler.java index c658585c530..ef5b74c3675 100644 --- a/jdk/src/share/classes/java/net/ContentHandler.java +++ b/jdk/src/share/classes/java/net/ContentHandler.java @@ -46,15 +46,28 @@ import java.io.IOException; *

* If no content handler could be found, URLConnection will * look for a content handler in a user-defineable set of places. - * By default it looks in sun.net.www.content, but users can define a - * vertical-bar delimited set of class prefixes to search through in - * addition by defining the java.content.handler.pkgs property. - * The class name must be of the form: - *

- *     {package-prefix}.{major}.{minor}
- * e.g.
+ * Users can define a vertical-bar delimited set of class prefixes
+ * to search through by defining the java.content.handler.pkgs
+ * property. The class name must be of the form:
+ * 
+ * {package-prefix}.{major}.{minor} + *

+ * where {major}.{minor} is formed by taking the + * content-type string, replacing all slash characters with a + * {@code period} ('.'), and all other non-alphanumeric characters + * with the underscore character '{@code _}'. The alphanumeric + * characters are specifically the 26 uppercase ASCII letters + * '{@code A}' through '{@code Z}', the 26 lowercase ASCII + * letters '{@code a}' through '{@code z}', and the 10 ASCII + * digits '{@code 0}' through '{@code 9}'. + *

+ * e.g. * YoyoDyne.experimental.text.plain - *

+ * + * If no user-defined content handler is found, then the system + * tries to load a specific content-type handler from one + * of the built-in handlers, if one exists. + *

* If the loading of the content handler class would be performed by * a classloader that is outside of the delegation chain of the caller, * the JVM will need the RuntimePermission "getClassLoader". diff --git a/jdk/src/share/classes/java/net/URL.java b/jdk/src/share/classes/java/net/URL.java index d2042094bc6..cb89e21ef5e 100644 --- a/jdk/src/share/classes/java/net/URL.java +++ b/jdk/src/share/classes/java/net/URL.java @@ -266,10 +266,7 @@ public final class URL implements java.io.Serializable { * a subclass of {@code URLStreamHandler}, then the next package * in the list is tried. *

  • If the previous step fails to find a protocol handler, then the - * constructor tries to load from a system default package. - *
    -     *         <system default package>.<protocol>.Handler
    -     *     
    + * constructor tries to load a built-in protocol handler. * If this class does not exist, or if the class exists but it is not a * subclass of {@code URLStreamHandler}, then a * {@code MalformedURLException} is thrown. diff --git a/jdk/src/share/classes/java/net/URLConnection.java b/jdk/src/share/classes/java/net/URLConnection.java index eb98672e826..4abf5a4840b 100644 --- a/jdk/src/share/classes/java/net/URLConnection.java +++ b/jdk/src/share/classes/java/net/URLConnection.java @@ -704,21 +704,10 @@ public abstract class URLConnection { * handler for that content type. *
  • If no content handler factory has yet been set up, or if the * factory's {@code createContentHandler} method returns - * {@code null}, then the application loads the class named: - *
    -     *         sun.net.www.content.<contentType>
    -     *     
    - * where <contentType> is formed by taking the - * content-type string, replacing all slash characters with a - * {@code period} ('.'), and all other non-alphanumeric characters - * with the underscore character '{@code _}'. The alphanumeric - * characters are specifically the 26 uppercase ASCII letters - * '{@code A}' through '{@code Z}', the 26 lowercase ASCII - * letters '{@code a}' through '{@code z}', and the 10 ASCII - * digits '{@code 0}' through '{@code 9}'. If the specified - * class does not exist, or is not a subclass of - * {@code ContentHandler}, then an - * {@code UnknownServiceException} is thrown. + * {@code null}, then this method tries to load a content handler + * class as defined by {@link java.net.ContentHandler ContentHandler}. + * If the class does not exist, or is not a subclass of {@code + * ContentHandler}, then an {@code UnknownServiceException} is thrown. * * * @return the object fetched. The {@code instanceof} operator