# HG changeset patch # User juh # Date 1375207459 25200 # Node ID 1d9cb0d080e3f4cdb703b9e7831cd0d37924312c # Parent f2358d18923a898489950c153f2e6d42e6330b8f 8021833: javadoc cleanup in java.net Summary: and converted to {@code }; package.html to package-info.java Reviewed-by: darcy, chegar diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/Authenticator.java --- a/jdk/src/share/classes/java/net/Authenticator.java Mon Jul 29 19:36:54 2013 -0700 +++ b/jdk/src/share/classes/java/net/Authenticator.java Tue Jul 30 11:04:19 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -103,17 +103,17 @@ * Sets the authenticator that will be used by the networking code * when a proxy or an HTTP server asks for authentication. *

- * First, if there is a security manager, its checkPermission + * First, if there is a security manager, its {@code checkPermission} * method is called with a - * NetPermission("setDefaultAuthenticator") permission. + * {@code NetPermission("setDefaultAuthenticator")} permission. * This may result in a java.lang.SecurityException. * - * @param a The authenticator to be set. If a is null then + * @param a The authenticator to be set. If a is {@code null} then * any previously set authenticator is removed. * * @throws SecurityException * if a security manager exists and its - * checkPermission method doesn't allow + * {@code checkPermission} method doesn't allow * setting the default authenticator. * * @see SecurityManager#checkPermission @@ -134,9 +134,9 @@ * Ask the authenticator that has been registered with the system * for a password. *

- * First, if there is a security manager, its checkPermission + * First, if there is a security manager, its {@code checkPermission} * method is called with a - * NetPermission("requestPasswordAuthentication") permission. + * {@code NetPermission("requestPasswordAuthentication")} permission. * This may result in a java.lang.SecurityException. * * @param addr The InetAddress of the site requesting authorization, @@ -151,7 +151,7 @@ * * @throws SecurityException * if a security manager exists and its - * checkPermission method doesn't allow + * {@code checkPermission} method doesn't allow * the password authentication request. * * @see SecurityManager#checkPermission @@ -193,9 +193,9 @@ * because the hostname can be provided in cases where the InetAddress * is not available. *

- * First, if there is a security manager, its checkPermission + * First, if there is a security manager, its {@code checkPermission} * method is called with a - * NetPermission("requestPasswordAuthentication") permission. + * {@code NetPermission("requestPasswordAuthentication")} permission. * This may result in a java.lang.SecurityException. * * @param host The hostname of the site requesting authentication. @@ -211,7 +211,7 @@ * * @throws SecurityException * if a security manager exists and its - * checkPermission method doesn't allow + * {@code checkPermission} method doesn't allow * the password authentication request. * * @see SecurityManager#checkPermission @@ -254,9 +254,9 @@ * Ask the authenticator that has been registered with the system * for a password. *

- * First, if there is a security manager, its checkPermission + * First, if there is a security manager, its {@code checkPermission} * method is called with a - * NetPermission("requestPasswordAuthentication") permission. + * {@code NetPermission("requestPasswordAuthentication")} permission. * This may result in a java.lang.SecurityException. * * @param host The hostname of the site requesting authentication. @@ -275,7 +275,7 @@ * * @throws SecurityException * if a security manager exists and its - * checkPermission method doesn't allow + * {@code checkPermission} method doesn't allow * the password authentication request. * * @see SecurityManager#checkPermission @@ -320,8 +320,8 @@ } /** - * Gets the hostname of the - * site or proxy requesting authentication, or null + * Gets the {@code hostname} of the + * site or proxy requesting authentication, or {@code null} * if not available. * * @return the hostname of the connection requiring authentication, or null @@ -333,8 +333,8 @@ } /** - * Gets the InetAddress of the - * site requesting authorization, or null + * Gets the {@code InetAddress} of the + * site requesting authorization, or {@code null} * if not available. * * @return the InetAddress of the site requesting authorization, or null @@ -346,7 +346,7 @@ /** * Gets the port number for the requested connection. - * @return an int indicating the + * @return an {@code int} indicating the * port for the requested connection. */ protected final int getRequestingPort() { diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/ContentHandler.java --- a/jdk/src/share/classes/java/net/ContentHandler.java Mon Jul 29 19:36:54 2013 -0700 +++ b/jdk/src/share/classes/java/net/ContentHandler.java Tue Jul 30 11:04:19 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,21 +28,21 @@ import java.io.IOException; /** - * The abstract class ContentHandler is the superclass - * of all classes that read an Object from a - * URLConnection. + * The abstract class {@code ContentHandler} is the superclass + * of all classes that read an {@code Object} from a + * {@code URLConnection}. *

* An application does not generally call the - * getContent method in this class directly. Instead, an - * application calls the getContent method in class - * URL or in URLConnection. + * {@code getContent} method in this class directly. Instead, an + * application calls the {@code getContent} method in class + * {@code URL} or in {@code URLConnection}. * The application's content handler factory (an instance of a class that - * implements the interface ContentHandlerFactory set - * up by a call to setContentHandler) is - * called with a String giving the MIME type of the + * implements the interface {@code ContentHandlerFactory} set + * up by a call to {@code setContentHandler}) is + * called with a {@code String} giving the MIME type of the * object being received on the socket. The factory returns an - * instance of a subclass of ContentHandler, and its - * getContent method is called to create the object. + * instance of a subclass of {@code ContentHandler}, and its + * {@code getContent} method is called to create the object. *

* If no content handler could be found, URLConnection will * look for a content handler in a user-defineable set of places. @@ -75,7 +75,7 @@ * creates an object from it. * * @param urlc a URL connection. - * @return the object read by the ContentHandler. + * @return the object read by the {@code ContentHandler}. * @exception IOException if an I/O error occurs while reading the object. */ abstract public Object getContent(URLConnection urlc) throws IOException; @@ -90,7 +90,7 @@ * * @param urlc a URL connection. * @param classes an array of types requested - * @return the object read by the ContentHandler that is + * @return the object read by the {@code ContentHandler} that is * the first match of the suggested types. * null if none of the requested are supported. * @exception IOException if an I/O error occurs while reading the object. diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/ContentHandlerFactory.java --- a/jdk/src/share/classes/java/net/ContentHandlerFactory.java Mon Jul 29 19:36:54 2013 -0700 +++ b/jdk/src/share/classes/java/net/ContentHandlerFactory.java Tue Jul 30 11:04:19 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 1997, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,10 +28,10 @@ /** * This interface defines a factory for content handlers. An * implementation of this interface should map a MIME type into an - * instance of ContentHandler. + * instance of {@code ContentHandler}. *

- * This interface is used by the URLStreamHandler class - * to create a ContentHandler for a MIME type. + * This interface is used by the {@code URLStreamHandler} class + * to create a {@code ContentHandler} for a MIME type. * * @author James Gosling * @see java.net.ContentHandler @@ -40,13 +40,13 @@ */ public interface ContentHandlerFactory { /** - * Creates a new ContentHandler to read an object from - * a URLStreamHandler. + * Creates a new {@code ContentHandler} to read an object from + * a {@code URLStreamHandler}. * * @param mimetype the MIME type for which a content handler is desired. - * @return a new ContentHandler to read an object from a - * URLStreamHandler. + * @return a new {@code ContentHandler} to read an object from a + * {@code URLStreamHandler}. * @see java.net.ContentHandler * @see java.net.URLStreamHandler */ diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/CookieHandler.java --- a/jdk/src/share/classes/java/net/CookieHandler.java Mon Jul 29 19:36:54 2013 -0700 +++ b/jdk/src/share/classes/java/net/CookieHandler.java Tue Jul 30 11:04:19 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -66,7 +66,7 @@ * there is no system-wide cookie handler currently set. * @throws SecurityException * If a security manager has been installed and it denies - * {@link NetPermission}("getCookieHandler") + * {@link NetPermission}{@code ("getCookieHandler")} * @see #setDefault(CookieHandler) */ public synchronized static CookieHandler getDefault() { @@ -83,10 +83,10 @@ * Note: non-standard http protocol handlers may ignore this setting. * * @param cHandler The HTTP cookie handler, or - * null to unset. + * {@code null} to unset. * @throws SecurityException * If a security manager has been installed and it denies - * {@link NetPermission}("setCookieHandler") + * {@link NetPermission}{@code ("setCookieHandler")} * @see #getDefault() */ public synchronized static void setDefault(CookieHandler cHandler) { @@ -114,7 +114,7 @@ * called after all request headers related to choosing cookies * are added, and before the request is sent.

* - * @param uri a URI representing the intended use for the + * @param uri a {@code URI} representing the intended use for the * cookies * @param requestHeaders - a Map from request header * field names to lists of field values representing @@ -136,7 +136,7 @@ * fields that are named Set-Cookie2, present in the response * headers into a cookie cache. * - * @param uri a URI where the cookies come from + * @param uri a {@code URI} where the cookies come from * @param responseHeaders an immutable map from field names to * lists of field values representing the response * header fields returned diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/CookieManager.java --- a/jdk/src/share/classes/java/net/CookieManager.java Mon Jul 29 19:36:54 2013 -0700 +++ b/jdk/src/share/classes/java/net/CookieManager.java Tue Jul 30 11:04:19 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -131,7 +131,7 @@ * *

This constructor will create new cookie manager with default * cookie store and accept policy. The effect is same as - * CookieManager(null, null). + * {@code CookieManager(null, null)}. */ public CookieManager() { this(null, null); @@ -141,12 +141,12 @@ /** * Create a new cookie manager with specified cookie store and cookie policy. * - * @param store a CookieStore to be used by cookie manager. - * if null, cookie manager will use a default one, + * @param store a {@code CookieStore} to be used by cookie manager. + * if {@code null}, cookie manager will use a default one, * which is an in-memory CookieStore implmentation. - * @param cookiePolicy a CookiePolicy instance + * @param cookiePolicy a {@code CookiePolicy} instance * to be used by cookie manager as policy callback. - * if null, ACCEPT_ORIGINAL_SERVER will + * if {@code null}, ACCEPT_ORIGINAL_SERVER will * be used. */ public CookieManager(CookieStore store, @@ -170,11 +170,11 @@ /** * To set the cookie policy of this cookie manager. * - *

A instance of CookieManager will have + *

A instance of {@code CookieManager} will have * cookie policy ACCEPT_ORIGINAL_SERVER by default. Users always * can call this method to set another cookie policy. * - * @param cookiePolicy the cookie policy. Can be null, which + * @param cookiePolicy the cookie policy. Can be {@code null}, which * has no effects on current cookie policy. */ public void setCookiePolicy(CookiePolicy cookiePolicy) { diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/CookiePolicy.java --- a/jdk/src/share/classes/java/net/CookiePolicy.java Mon Jul 29 19:36:54 2013 -0700 +++ b/jdk/src/share/classes/java/net/CookiePolicy.java Tue Jul 30 11:04:19 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -71,8 +71,8 @@ * * @param uri the URI to consult accept policy with * @param cookie the HttpCookie object in question - * @return true if this cookie should be accepted; - * otherwise, false + * @return {@code true} if this cookie should be accepted; + * otherwise, {@code false} */ public boolean shouldAccept(URI uri, HttpCookie cookie); } diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/CookieStore.java --- a/jdk/src/share/classes/java/net/CookieStore.java Mon Jul 29 19:36:54 2013 -0700 +++ b/jdk/src/share/classes/java/net/CookieStore.java Tue Jul 30 11:04:19 2013 -0700 @@ -32,8 +32,8 @@ * A CookieStore object represents a storage for cookie. Can store and retrieve * cookies. * - *

{@link CookieManager} will call CookieStore.add to save cookies - * for every incoming HTTP response, and call CookieStore.get to + *

{@link CookieManager} will call {@code CookieStore.add} to save cookies + * for every incoming HTTP response, and call {@code CookieStore.get} to * retrieve cookie for every outgoing HTTP request. A CookieStore * is responsible for removing HttpCookie instances which have expired. * @@ -55,11 +55,11 @@ * then it is replaced with the new one. * * @param uri the uri this cookie associated with. - * if null, this cookie will not be associated + * if {@code null}, this cookie will not be associated * with an URI * @param cookie the cookie to store * - * @throws NullPointerException if cookie is null + * @throws NullPointerException if {@code cookie} is {@code null} * * @see #get * @@ -77,7 +77,7 @@ * * @param uri the uri associated with the cookies to be returned * - * @throws NullPointerException if uri is null + * @throws NullPointerException if {@code uri} is {@code null} * * @see #add * @@ -108,14 +108,14 @@ * Remove a cookie from store. * * @param uri the uri this cookie associated with. - * if null, the cookie to be removed is not associated - * with an URI when added; if not null, the cookie + * if {@code null}, the cookie to be removed is not associated + * with an URI when added; if not {@code null}, the cookie * to be removed is associated with the given URI when added. * @param cookie the cookie to remove * - * @return true if this store contained the specified cookie + * @return {@code true} if this store contained the specified cookie * - * @throws NullPointerException if cookie is null + * @throws NullPointerException if {@code cookie} is {@code null} */ public boolean remove(URI uri, HttpCookie cookie); @@ -123,7 +123,7 @@ /** * Remove all cookies in this cookie store. * - * @return true if this store changed as a result of the call + * @return {@code true} if this store changed as a result of the call */ public boolean removeAll(); } diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/DatagramPacket.java --- a/jdk/src/share/classes/java/net/DatagramPacket.java Mon Jul 29 19:36:54 2013 -0700 +++ b/jdk/src/share/classes/java/net/DatagramPacket.java Tue Jul 30 11:04:19 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -68,11 +68,11 @@ int port; /** - * Constructs a DatagramPacket for receiving packets of - * length length, specifying an offset into the buffer. + * Constructs a {@code DatagramPacket} for receiving packets of + * length {@code length}, specifying an offset into the buffer. *

- * The length argument must be less than or equal to - * buf.length. + * The {@code length} argument must be less than or equal to + * {@code buf.length}. * * @param buf buffer for holding the incoming datagram. * @param offset the offset for the buffer @@ -87,11 +87,11 @@ } /** - * Constructs a DatagramPacket for receiving packets of - * length length. + * Constructs a {@code DatagramPacket} for receiving packets of + * length {@code length}. *

- * The length argument must be less than or equal to - * buf.length. + * The {@code length} argument must be less than or equal to + * {@code buf.length}. * * @param buf buffer for holding the incoming datagram. * @param length the number of bytes to read. @@ -102,10 +102,10 @@ /** * Constructs a datagram packet for sending packets of length - * length with offset ioffsetto the + * {@code length} with offset {@code ioffset}to the * specified port number on the specified host. The - * length argument must be less than or equal to - * buf.length. + * {@code length} argument must be less than or equal to + * {@code buf.length}. * * @param buf the packet data. * @param offset the packet data offset. @@ -125,10 +125,10 @@ /** * Constructs a datagram packet for sending packets of length - * length with offset ioffsetto the + * {@code length} with offset {@code ioffset}to the * specified port number on the specified host. The - * length argument must be less than or equal to - * buf.length. + * {@code length} argument must be less than or equal to + * {@code buf.length}. * * @param buf the packet data. * @param offset the packet data offset. @@ -147,9 +147,9 @@ /** * Constructs a datagram packet for sending packets of length - * length to the specified port number on the specified - * host. The length argument must be less than or equal - * to buf.length. + * {@code length} to the specified port number on the specified + * host. The {@code length} argument must be less than or equal + * to {@code buf.length}. * * @param buf the packet data. * @param length the packet length. @@ -164,9 +164,9 @@ /** * Constructs a datagram packet for sending packets of length - * length to the specified port number on the specified - * host. The length argument must be less than or equal - * to buf.length. + * {@code length} to the specified port number on the specified + * host. The {@code length} argument must be less than or equal + * to {@code buf.length}. * * @param buf the packet data. * @param length the packet length. @@ -207,8 +207,8 @@ /** * Returns the data buffer. The data received or the data to be sent - * starts from the offset in the buffer, - * and runs for length long. + * starts from the {@code offset} in the buffer, + * and runs for {@code length} long. * * @return the buffer used to receive or send data * @see #setData(byte[], int, int) @@ -277,7 +277,7 @@ /** * Sets the IP address of the machine to which this datagram * is being sent. - * @param iaddr the InetAddress + * @param iaddr the {@code InetAddress} * @since JDK1.1 * @see #getAddress() */ @@ -303,7 +303,7 @@ * Sets the SocketAddress (usually IP address + port number) of the remote * host to which this datagram is being sent. * - * @param address the SocketAddress + * @param address the {@code SocketAddress} * @throws IllegalArgumentException if address is null or is a * SocketAddress subclass not supported by this socket * @@ -324,7 +324,7 @@ * Gets the SocketAddress (usually IP address + port number) of the remote * host that this packet is being sent to or is coming from. * - * @return the SocketAddress + * @return the {@code SocketAddress} * @since 1.4 * @see #setSocketAddress */ @@ -335,7 +335,7 @@ /** * Set the data buffer for this packet. With the offset of * this DatagramPacket set to 0, and the length set to - * the length of buf. + * the length of {@code buf}. * * @param buf the buffer to set for this packet. * diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/DatagramSocket.java --- a/jdk/src/share/classes/java/net/DatagramSocket.java Mon Jul 29 19:36:54 2013 -0700 +++ b/jdk/src/share/classes/java/net/DatagramSocket.java Tue Jul 30 11:04:19 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,14 +47,14 @@ * a DatagramSocket is bound to a more specific address. *

* Example: - * + * {@code * DatagramSocket s = new DatagramSocket(null); * s.bind(new InetSocketAddress(8888)); - * + * } * Which is equivalent to: - * + * {@code * DatagramSocket s = new DatagramSocket(8888); - * + * } * Both cases will create a DatagramSocket able to receive broadcasts on * UDP port 8888. * @@ -161,14 +161,14 @@ * an IP address chosen by the kernel. * *

If there is a security manager, - * its checkListen method is first called + * its {@code checkListen} method is first called * with 0 as its argument to ensure the operation is allowed. * This could result in a SecurityException. * * @exception SocketException if the socket could not be opened, * or the socket could not bind to the specified local port. * @exception SecurityException if a security manager exists and its - * checkListen method doesn't allow the operation. + * {@code checkListen} method doesn't allow the operation. * * @see SecurityManager#checkListen */ @@ -195,21 +195,21 @@ * Creates a datagram socket, bound to the specified local * socket address. *

- * If, if the address is null, creates an unbound socket. + * If, if the address is {@code null}, creates an unbound socket. *

*

If there is a security manager, - * its checkListen method is first called + * its {@code checkListen} method is first called * with the port from the socket address * as its argument to ensure the operation is allowed. * This could result in a SecurityException. * - * @param bindaddr local socket address to bind, or null + * @param bindaddr local socket address to bind, or {@code null} * for an unbound socket. * * @exception SocketException if the socket could not be opened, * or the socket could not bind to the specified local port. * @exception SecurityException if a security manager exists and its - * checkListen method doesn't allow the operation. + * {@code checkListen} method doesn't allow the operation. * * @see SecurityManager#checkListen * @since 1.4 @@ -234,8 +234,8 @@ * an IP address chosen by the kernel. * *

If there is a security manager, - * its checkListen method is first called - * with the port argument + * its {@code checkListen} method is first called + * with the {@code port} argument * as its argument to ensure the operation is allowed. * This could result in a SecurityException. * @@ -243,7 +243,7 @@ * @exception SocketException if the socket could not be opened, * or the socket could not bind to the specified local port. * @exception SecurityException if a security manager exists and its - * checkListen method doesn't allow the operation. + * {@code checkListen} method doesn't allow the operation. * * @see SecurityManager#checkListen */ @@ -259,8 +259,8 @@ * an IP address chosen by the kernel. * *

If there is a security manager, - * its checkListen method is first called - * with the port argument + * its {@code checkListen} method is first called + * with the {@code port} argument * as its argument to ensure the operation is allowed. * This could result in a SecurityException. * @@ -270,7 +270,7 @@ * @exception SocketException if the socket could not be opened, * or the socket could not bind to the specified local port. * @exception SecurityException if a security manager exists and its - * checkListen method doesn't allow the operation. + * {@code checkListen} method doesn't allow the operation. * * @see SecurityManager#checkListen * @since JDK1.1 @@ -319,10 +319,10 @@ } /** - * Get the DatagramSocketImpl attached to this socket, + * Get the {@code DatagramSocketImpl} attached to this socket, * creating it if necessary. * - * @return the DatagramSocketImpl attached to that + * @return the {@code DatagramSocketImpl} attached to that * DatagramSocket * @throws SocketException if creation fails. * @since 1.4 @@ -336,14 +336,14 @@ /** * Binds this DatagramSocket to a specific address and port. *

- * If the address is null, then the system will pick up + * If the address is {@code null}, then the system will pick up * an ephemeral port and a valid local address to bind the socket. *

* @param addr The address and port to bind to. * @throws SocketException if any error happens during the bind, or if the * socket is already bound. * @throws SecurityException if a security manager exists and its - * checkListen method doesn't allow the operation. + * {@code checkListen} method doesn't allow the operation. * @throws IllegalArgumentException if addr is a SocketAddress subclass * not supported by this socket. * @since 1.4 @@ -496,7 +496,7 @@ * Returns the binding state of the socket. *

* If the socket was bound prior to being {@link #close closed}, - * then this method will continue to return true + * then this method will continue to return {@code true} * after the socket is closed. * * @return true if the socket successfully bound to an address @@ -510,7 +510,7 @@ * Returns the connection state of the socket. *

* If the socket was connected prior to being {@link #close closed}, - * then this method will continue to return true + * then this method will continue to return {@code true} * after the socket is closed. * * @return true if the socket successfully connected to a server @@ -522,7 +522,7 @@ /** * Returns the address to which this socket is connected. Returns - * null if the socket is not connected. + * {@code null} if the socket is not connected. *

* If the socket was connected prior to being {@link #close closed}, * then this method will continue to return the connected address @@ -536,7 +536,7 @@ /** * Returns the port number to which this socket is connected. - * Returns -1 if the socket is not connected. + * Returns {@code -1} if the socket is not connected. *

* If the socket was connected prior to being {@link #close closed}, * then this method will continue to return the connected port number @@ -550,14 +550,14 @@ /** * Returns the address of the endpoint this socket is connected to, or - * null if it is unconnected. + * {@code null} if it is unconnected. *

* If the socket was connected prior to being {@link #close closed}, * then this method will continue to return the connected address * after the socket is closed. * - * @return a SocketAddress representing the remote - * endpoint of this socket, or null if it is + * @return a {@code SocketAddress} representing the remote + * endpoint of this socket, or {@code null} if it is * not connected yet. * @see #getInetAddress() * @see #getPort() @@ -573,8 +573,8 @@ /** * Returns the address of the endpoint this socket is bound to. * - * @return a SocketAddress representing the local endpoint of this - * socket, or null if it is closed or not bound yet. + * @return a {@code SocketAddress} representing the local endpoint of this + * socket, or {@code null} if it is closed or not bound yet. * @see #getLocalAddress() * @see #getLocalPort() * @see #bind(SocketAddress) @@ -591,28 +591,28 @@ /** * Sends a datagram packet from this socket. The - * DatagramPacket includes information indicating the + * {@code DatagramPacket} includes information indicating the * data to be sent, its length, the IP address of the remote host, * and the port number on the remote host. * *

If there is a security manager, and the socket is not currently * connected to a remote address, this method first performs some - * security checks. First, if p.getAddress().isMulticastAddress() + * security checks. First, if {@code p.getAddress().isMulticastAddress()} * is true, this method calls the - * security manager's checkMulticast method - * with p.getAddress() as its argument. + * security manager's {@code checkMulticast} method + * with {@code p.getAddress()} as its argument. * If the evaluation of that expression is false, * this method instead calls the security manager's - * checkConnect method with arguments - * p.getAddress().getHostAddress() and - * p.getPort(). Each call to a security manager method + * {@code checkConnect} method with arguments + * {@code p.getAddress().getHostAddress()} and + * {@code p.getPort()}. Each call to a security manager method * could result in a SecurityException if the operation is not allowed. * - * @param p the DatagramPacket to be sent. + * @param p the {@code DatagramPacket} to be sent. * * @exception IOException if an I/O error occurs. * @exception SecurityException if a security manager exists and its - * checkMulticast or checkConnect + * {@code checkMulticast} or {@code checkConnect} * method doesn't allow the send. * @exception PortUnreachableException may be thrown if the socket is connected * to a currently unreachable destination. Note, there is no @@ -674,20 +674,20 @@ /** * Receives a datagram packet from this socket. When this method - * returns, the DatagramPacket's buffer is filled with + * returns, the {@code DatagramPacket}'s buffer is filled with * the data received. The datagram packet also contains the sender's * IP address, and the port number on the sender's machine. *

* This method blocks until a datagram is received. The - * length field of the datagram packet object contains + * {@code length} field of the datagram packet object contains * the length of the received message. If the message is longer than * the packet's length, the message is truncated. *

* If there is a security manager, a packet cannot be received if the - * security manager's checkAccept method + * security manager's {@code checkAccept} method * does not allow it. * - * @param p the DatagramPacket into which to place + * @param p the {@code DatagramPacket} into which to place * the incoming data. * @exception IOException if an I/O error occurs. * @exception SocketTimeoutException if setSoTimeout was previously called @@ -786,17 +786,17 @@ * Gets the local address to which the socket is bound. * *

If there is a security manager, its - * checkConnect method is first called - * with the host address and -1 + * {@code checkConnect} method is first called + * with the host address and {@code -1} * as its arguments to see if the operation is allowed. * * @see SecurityManager#checkConnect * @return the local address to which the socket is bound, - * null if the socket is closed, or - * an InetAddress representing + * {@code null} if the socket is closed, or + * an {@code InetAddress} representing * {@link InetAddress#isAnyLocalAddress wildcard} * address if either the socket is not bound, or - * the security manager checkConnect + * the security manager {@code checkConnect} * method does not allow the operation * @since 1.1 */ @@ -824,8 +824,8 @@ * is bound. * * @return the port number on the local host to which this socket is bound, - -1 if the socket is closed, or - 0 if it is not bound yet. + {@code -1} if the socket is closed, or + {@code 0} if it is not bound yet. */ public int getLocalPort() { if (isClosed()) @@ -883,7 +883,7 @@ /** * Sets the SO_SNDBUF option to the specified value for this - * DatagramSocket. The SO_SNDBUF option is used by the + * {@code DatagramSocket}. The SO_SNDBUF option is used by the * network implementation as a hint to size the underlying * network I/O buffers. The SO_SNDBUF setting may also be used * by the network implementation to determine the maximum size @@ -897,7 +897,7 @@ * is high. *

* Note: If {@link #send(DatagramPacket)} is used to send a - * DatagramPacket that is larger than the setting + * {@code DatagramPacket} that is larger than the setting * of SO_SNDBUF then it is implementation specific if the * packet is sent or discarded. * @@ -921,10 +921,10 @@ } /** - * Get value of the SO_SNDBUF option for this DatagramSocket, that is the - * buffer size used by the platform for output on this DatagramSocket. + * Get value of the SO_SNDBUF option for this {@code DatagramSocket}, that is the + * buffer size used by the platform for output on this {@code DatagramSocket}. * - * @return the value of the SO_SNDBUF option for this DatagramSocket + * @return the value of the SO_SNDBUF option for this {@code DatagramSocket} * @exception SocketException if there is an error in * the underlying protocol, such as an UDP error. * @see #setSendBufferSize @@ -942,7 +942,7 @@ /** * Sets the SO_RCVBUF option to the specified value for this - * DatagramSocket. The SO_RCVBUF option is used by the + * {@code DatagramSocket}. The SO_RCVBUF option is used by the * the network implementation as a hint to size the underlying * network I/O buffers. The SO_RCVBUF setting may also be used * by the network implementation to determine the maximum size @@ -979,10 +979,10 @@ } /** - * Get value of the SO_RCVBUF option for this DatagramSocket, that is the - * buffer size used by the platform for input on this DatagramSocket. + * Get value of the SO_RCVBUF option for this {@code DatagramSocket}, that is the + * buffer size used by the platform for input on this {@code DatagramSocket}. * - * @return the value of the SO_RCVBUF option for this DatagramSocket + * @return the value of the SO_RCVBUF option for this {@code DatagramSocket} * @exception SocketException if there is an error in the underlying protocol, such as an UDP error. * @see #setReceiveBufferSize(int) */ @@ -1005,26 +1005,26 @@ * socket to the same socket address. This is typically for the * purpose of receiving multicast packets * (See {@link java.net.MulticastSocket}). The - * SO_REUSEADDR socket option allows multiple + * {@code SO_REUSEADDR} socket option allows multiple * sockets to be bound to the same socket address if the - * SO_REUSEADDR socket option is enabled prior + * {@code SO_REUSEADDR} socket option is enabled prior * to binding the socket using {@link #bind(SocketAddress)}. *

* Note: This functionality is not supported by all existing platforms, * so it is implementation specific whether this option will be ignored * or not. However, if it is not supported then - * {@link #getReuseAddress()} will always return false. + * {@link #getReuseAddress()} will always return {@code false}. *

- * When a DatagramSocket is created the initial setting - * of SO_REUSEADDR is disabled. + * When a {@code DatagramSocket} is created the initial setting + * of {@code SO_REUSEADDR} is disabled. *

- * The behaviour when SO_REUSEADDR is enabled or + * The behaviour when {@code SO_REUSEADDR} is enabled or * disabled after a socket is bound (See {@link #isBound()}) * is not defined. * * @param on whether to enable or disable the * @exception SocketException if an error occurs enabling or - * disabling the SO_RESUEADDR socket option, + * disabling the {@code SO_RESUEADDR} socket option, * or the socket is closed. * @since 1.4 * @see #getReuseAddress() @@ -1045,7 +1045,7 @@ /** * Tests if SO_REUSEADDR is enabled. * - * @return a boolean indicating whether or not SO_REUSEADDR is enabled. + * @return a {@code boolean} indicating whether or not SO_REUSEADDR is enabled. * @exception SocketException if there is an error * in the underlying protocol, such as an UDP error. * @since 1.4 @@ -1083,7 +1083,7 @@ /** * Tests if SO_BROADCAST is enabled. - * @return a boolean indicating whether or not SO_BROADCAST is enabled. + * @return a {@code boolean} indicating whether or not SO_BROADCAST is enabled. * @exception SocketException if there is an error * in the underlying protocol, such as an UDP error. * @since 1.4 @@ -1105,7 +1105,7 @@ * 255} or an IllegalArgumentException will be thrown. *

Notes: *

For Internet Protocol v4 the value consists of an - * integer, the least significant 8 bits of which + * {@code integer}, the least significant 8 bits of which * represent the value of the TOS octet in IP packets sent by * the socket. * RFC 1349 defines the TOS values as follows: @@ -1123,10 +1123,10 @@ * SocketException indicating that the operation is not * permitted. *

- * for Internet Protocol v6 tc is the value that + * for Internet Protocol v6 {@code tc} is the value that * would be placed into the sin6_flowinfo field of the IP header. * - * @param tc an int value for the bitset. + * @param tc an {@code int} value for the bitset. * @throws SocketException if there is an error setting the * traffic class or type-of-service * @since 1.4 @@ -1205,7 +1205,7 @@ * DatagramChannel.open} method. * * @return the datagram channel associated with this datagram socket, - * or null if this socket was not created for a channel + * or {@code null} if this socket was not created for a channel * * @since 1.4 * @spec JSR-51 @@ -1224,14 +1224,14 @@ * application. The factory can be specified only once. *

* When an application creates a new datagram socket, the socket - * implementation factory's createDatagramSocketImpl method is + * implementation factory's {@code createDatagramSocketImpl} method is * called to create the actual datagram socket implementation. *

- * Passing null to the method is a no-op unless the factory + * Passing {@code null} to the method is a no-op unless the factory * was already set. * *

If there is a security manager, this method first calls - * the security manager's checkSetFactory method + * the security manager's {@code checkSetFactory} method * to ensure the operation is allowed. * This could result in a SecurityException. * @@ -1240,7 +1240,7 @@ * datagram socket factory. * @exception SocketException if the factory is already defined. * @exception SecurityException if a security manager exists and its - * checkSetFactory method doesn't allow the + * {@code checkSetFactory} method doesn't allow the operation. * @see java.net.DatagramSocketImplFactory#createDatagramSocketImpl() diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/DatagramSocketImpl.java --- a/jdk/src/share/classes/java/net/DatagramSocketImpl.java Mon Jul 29 19:36:54 2013 -0700 +++ b/jdk/src/share/classes/java/net/DatagramSocketImpl.java Tue Jul 30 11:04:19 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -101,7 +101,7 @@ protected void disconnect() {} /** - * Peek at the packet to see who it is from. Updates the specified InetAddress + * Peek at the packet to see who it is from. Updates the specified {@code InetAddress} * to the address which the packet came from. * @param i an InetAddress object * @return the port number which the packet came from. @@ -114,7 +114,7 @@ /** * Peek at the packet to see who it is from. The data is copied into the specified - * DatagramPacket. The data is returned, + * {@code DatagramPacket}. The data is returned, * but not consumed, so that a subsequent peekData/receive operation * will see the same data. * @param p the Packet Received. @@ -163,7 +163,7 @@ /** * Set the TTL (time-to-live) option. - * @param ttl an int specifying the time-to-live value + * @param ttl an {@code int} specifying the time-to-live value * @exception IOException if an I/O exception occurs * while setting the time-to-live option. * @see #getTimeToLive() @@ -174,7 +174,7 @@ * Retrieve the TTL (time-to-live) option. * @exception IOException if an I/O exception occurs * while retrieving the time-to-live option - * @return an int representing the time-to-live value + * @return an {@code int} representing the time-to-live value * @see #setTimeToLive(int) */ protected abstract int getTimeToLive() throws IOException; @@ -227,7 +227,7 @@ /** * Gets the local port. - * @return an int representing the local port value + * @return an {@code int} representing the local port value */ protected int getLocalPort() { return localPort; @@ -235,7 +235,7 @@ /** * Gets the datagram socket file descriptor. - * @return a FileDescriptor object representing the datagram socket + * @return a {@code FileDescriptor} object representing the datagram socket * file descriptor */ protected FileDescriptor getFileDescriptor() { diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/DatagramSocketImplFactory.java --- a/jdk/src/share/classes/java/net/DatagramSocketImplFactory.java Mon Jul 29 19:36:54 2013 -0700 +++ b/jdk/src/share/classes/java/net/DatagramSocketImplFactory.java Tue Jul 30 11:04:19 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,7 @@ /** * This interface defines a factory for datagram socket implementations. It - * is used by the classes DatagramSocket to create actual socket + * is used by the classes {@code DatagramSocket} to create actual socket * implementations. * * @author Yingxian Wang @@ -37,9 +37,9 @@ public interface DatagramSocketImplFactory { /** - * Creates a new DatagramSocketImpl instance. + * Creates a new {@code DatagramSocketImpl} instance. * - * @return a new instance of DatagramSocketImpl. + * @return a new instance of {@code DatagramSocketImpl}. * @see java.net.DatagramSocketImpl */ DatagramSocketImpl createDatagramSocketImpl(); diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/FileNameMap.java --- a/jdk/src/share/classes/java/net/FileNameMap.java Mon Jul 29 19:36:54 2013 -0700 +++ b/jdk/src/share/classes/java/net/FileNameMap.java Tue Jul 30 11:04:19 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,7 @@ /** * Gets the MIME type for the specified file name. * @param fileName the specified file name - * @return a String indicating the MIME + * @return a {@code String} indicating the MIME * type for the specified file name. */ public String getContentTypeFor(String fileName); diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/HttpCookie.java --- a/jdk/src/share/classes/java/net/HttpCookie.java Mon Jul 29 19:36:54 2013 -0700 +++ b/jdk/src/share/classes/java/net/HttpCookie.java Tue Jul 30 11:04:19 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -470,7 +470,7 @@ * protocol. * * @return {@code false} if the cookie can be sent over any standard - * protocol; otherwise, true + * protocol; otherwise, {@code true} * * @see #setSecure */ diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/HttpRetryException.java --- a/jdk/src/share/classes/java/net/HttpRetryException.java Mon Jul 29 19:36:54 2013 -0700 +++ b/jdk/src/share/classes/java/net/HttpRetryException.java Tue Jul 30 11:04:19 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,7 +43,7 @@ private String location; /** - * Constructs a new HttpRetryException from the + * Constructs a new {@code HttpRetryException} from the * specified response code and exception detail message * * @param detail the detail message. @@ -55,7 +55,7 @@ } /** - * Constructs a new HttpRetryException with detail message + * Constructs a new {@code HttpRetryException} with detail message * responseCode and the contents of the Location response header field. * * @param detail the detail message. diff -r f2358d18923a -r 1d9cb0d080e3 jdk/src/share/classes/java/net/HttpURLConnection.java --- a/jdk/src/share/classes/java/net/HttpURLConnection.java Mon Jul 29 19:36:54 2013 -0700 +++ b/jdk/src/share/classes/java/net/HttpURLConnection.java Tue Jul 30 11:04:19 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -76,14 +76,14 @@ /** * The chunk-length when using chunked encoding streaming mode for output. - * A value of -1 means chunked encoding is disabled for output. + * A value of {@code -1} means chunked encoding is disabled for output. * @since 1.5 */ protected int chunkLength = -1; /** * The fixed content-length when using fixed-length streaming mode. - * A value of -1 means fixed-length streaming mode is disabled + * A value of {@code -1} means fixed-length streaming mode is disabled * for output. * *

NOTE: {@link #fixedContentLengthLong} is recommended instead @@ -103,15 +103,15 @@ protected long fixedContentLengthLong = -1; /** - * Returns the key for the nth header field. - * Some implementations may treat the 0th + * Returns the key for the {@code n}th header field. + * Some implementations may treat the {@code 0}th * header field as special, i.e. as the status line returned by the HTTP * server. In this case, {@link #getHeaderField(int) getHeaderField(0)} returns the status - * line, but getHeaderFieldKey(0) returns null. + * line, but {@code getHeaderFieldKey(0)} returns null. * * @param n an index, where {@code n >=0}. - * @return the key for the nth header field, - * or null if the key does not exist. + * @return the key for the {@code n}th header field, + * or {@code null} if the key does not exist. */ public String getHeaderFieldKey (int n) { return null; @@ -251,8 +251,8 @@ } /** - * Returns the value for the nth header field. - * Some implementations may treat the 0th + * Returns the value for the {@code n}th header field. + * Some implementations may treat the {@code 0}th * header field as special, i.e. as the status line returned by the HTTP * server. *

@@ -261,8 +261,8 @@ * the headers in the message. * * @param n an index, where {@code n>=0}. - * @return the value of the nth header field, - * or null if the value does not exist. + * @return the value of the {@code n}th header field, + * or {@code null} if the value does not exist. * @see java.net.HttpURLConnection#getHeaderFieldKey(int) */ public String getHeaderField(int n) { @@ -270,7 +270,7 @@ } /** - * An int representing the three digit HTTP Status-Code. + * An {@code int} representing the three digit HTTP Status-Code. *