8132478: [tidy] three new warnings from java docs (java.net, javax.annotation)
authoravstepan
Tue, 18 Aug 2015 18:04:17 +0300
changeset 32227 34721a47bc92
parent 32226 786769ae25c0
child 32228 30af699625fc
8132478: [tidy] three new warnings from java docs (java.net, javax.annotation) Summary: minor docs cleanup (jdk part) Reviewed-by: lancea
jdk/src/java.base/share/classes/java/lang/Shutdown.java
jdk/src/java.base/share/classes/java/net/ContentHandler.java
jdk/src/java.base/share/classes/java/nio/Buffer.java
jdk/src/java.base/share/classes/sun/net/www/protocol/http/NegotiateAuthentication.java
jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java
jdk/src/java.base/share/classes/sun/util/CoreResourceBundleControl-XLocales.java.template
jdk/src/java.base/share/classes/sun/util/resources/LocaleData.java
jdk/src/java.management/share/classes/javax/management/InstanceOfQueryExp.java
jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapCtx.java
jdk/src/java.naming/share/classes/com/sun/jndi/ldap/ServiceLocator.java
jdk/src/java.naming/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java
jdk/src/java.prefs/share/classes/java/util/prefs/Base64.java
--- a/jdk/src/java.base/share/classes/java/lang/Shutdown.java	Tue Aug 18 15:46:01 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/Shutdown.java	Tue Aug 18 18:04:17 2015 +0300
@@ -86,10 +86,10 @@
      *               to be registered even if the shutdown is in progress.
      * @params hook  the hook to be registered
      *
-     * @throw IllegalStateException
-     *        if registerShutdownInProgress is false and shutdown is in progress; or
-     *        if registerShutdownInProgress is true and the shutdown process
-     *           already passes the given slot
+     * @throws IllegalStateException
+     *         if registerShutdownInProgress is false and shutdown is in progress; or
+     *         if registerShutdownInProgress is true and the shutdown process
+     *         already passes the given slot
      */
     static void add(int slot, boolean registerShutdownInProgress, Runnable hook) {
         synchronized (lock) {
--- a/jdk/src/java.base/share/classes/java/net/ContentHandler.java	Tue Aug 18 15:46:01 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/net/ContentHandler.java	Tue Aug 18 18:04:17 2015 +0300
@@ -47,7 +47,7 @@
  * If no content handler could be {@linkplain URLConnection#getContent() found},
  * URLConnection will look for a content handler in a user-definable set of places.
  * Users can define a vertical-bar delimited set of class prefixes
- * to search through by defining the <i>{@value java.net.URLConnection#contentPathProp}</i>
+ * to search through by defining the <i>{@link java.net.URLConnection#contentPathProp}</i>
  * property. The class name must be of the form:
  * <blockquote>
  *     <i>{package-prefix}.{major}.{minor}</i>
--- a/jdk/src/java.base/share/classes/java/nio/Buffer.java	Tue Aug 18 15:46:01 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/nio/Buffer.java	Tue Aug 18 18:04:17 2015 +0300
@@ -215,8 +215,8 @@
      * {@code put(src)} when the parameter is the {@code Buffer} on which the
      * method is being invoked.
      *
-     * @returns  IllegalArgumentException
-     *           With a message indicating equal source and target buffers
+     * @return  IllegalArgumentException
+     *          With a message indicating equal source and target buffers
      */
     static IllegalArgumentException createSameBufferException() {
         return new IllegalArgumentException("The source buffer is this buffer");
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/NegotiateAuthentication.java	Tue Aug 18 15:46:01 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/NegotiateAuthentication.java	Tue Aug 18 18:04:17 2015 +0300
@@ -191,7 +191,7 @@
 
     /**
      * return the first token.
-     * @returns the token
+     * @return the token
      * @throws IOException if <code>Negotiator.getNegotiator()</code> or
      *                     <code>Negotiator.firstToken()</code> failed.
      */
@@ -219,7 +219,7 @@
     /**
      * return more tokens
      * @param token the token to be fed into <code>negotiator.nextToken()</code>
-     * @returns the token
+     * @return the token
      * @throws IOException if <code>negotiator.nextToken()</code> throws Exception.
      *  May happen if the input token is invalid.
      */
--- a/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Tue Aug 18 15:46:01 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Tue Aug 18 18:04:17 2015 +0300
@@ -98,8 +98,8 @@
      * Sole constructor.
      *
      * @param annotationClass the class object for the annotation type
-     * @throw IllegalArgumentException if the specified class object for
-     *     does not represent a valid annotation type
+     * @throws IllegalArgumentException if the specified class object for
+     *         does not represent a valid annotation type
      */
     private AnnotationType(final Class<? extends Annotation> annotationClass) {
         if (!annotationClass.isAnnotation())
--- a/jdk/src/java.base/share/classes/sun/util/CoreResourceBundleControl-XLocales.java.template	Tue Aug 18 15:46:01 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/util/CoreResourceBundleControl-XLocales.java.template	Tue Aug 18 18:04:17 2015 +0300
@@ -92,7 +92,7 @@
     }
 
     /**
-     * @returns a list of candidate locales to search from.
+     * @return a list of candidate locales to search from.
      * @exception NullPointerException if baseName or locale is null.
      */
     @Override
--- a/jdk/src/java.base/share/classes/sun/util/resources/LocaleData.java	Tue Aug 18 15:46:01 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/util/resources/LocaleData.java	Tue Aug 18 18:04:17 2015 +0300
@@ -201,7 +201,7 @@
          *
          * @param baseName the resource bundle base name.
          *        locale   the requested locale for the resource bundle.
-         * @returns a list of candidate locales to search from.
+         * @return a list of candidate locales to search from.
          * @exception NullPointerException if baseName or locale is null.
          */
         @Override
--- a/jdk/src/java.management/share/classes/javax/management/InstanceOfQueryExp.java	Tue Aug 18 15:46:01 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/InstanceOfQueryExp.java	Tue Aug 18 18:04:17 2015 +0300
@@ -65,7 +65,7 @@
 
     /**
      * Returns the class name.
-     * @returns The {@link StringValueExp} returning the name of
+     * @return The {@link StringValueExp} returning the name of
      *        the class of which selected MBeans should be instances.
      */
     public StringValueExp getClassNameValue()  {
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapCtx.java	Tue Aug 18 15:46:01 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapCtx.java	Tue Aug 18 18:04:17 2015 +0300
@@ -909,7 +909,7 @@
      * @param dn The non-null DN of the entry to add
      * @param attrs The non-null attributes of entry to add
      * @param directUpdate Whether attrs can be updated directly
-     * @returns Non-null attributes with attributes from the RDN added
+     * @return Non-null attributes with attributes from the RDN added
      */
     private static Attributes addRdnAttributes(String dn, Attributes attrs,
         boolean directUpdate) throws NamingException {
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/ServiceLocator.java	Tue Aug 18 15:46:01 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/ServiceLocator.java	Tue Aug 18 18:04:17 2015 +0300
@@ -62,7 +62,7 @@
      *
      * @param dn A string distinguished name (RFC 2253).
      * @return A domain name or null if none can be derived.
-     * @throw InvalidNameException If the distinguished name is invalid.
+     * @throws InvalidNameException If the distinguished name is invalid.
      */
     static String mapDnToDomainName(String dn) throws InvalidNameException {
         if (dn == null) {
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java	Tue Aug 18 15:46:01 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java	Tue Aug 18 18:04:17 2015 +0300
@@ -297,7 +297,7 @@
      * Returns the default SSL socket factory.
      *
      * @return The default SSL socket factory.
-     * @throw IOException If TLS is not supported.
+     * @throws IOException If TLS is not supported.
      */
     private SSLSocketFactory getDefaultFactory() throws IOException {
 
@@ -314,7 +314,7 @@
      *
      * @param factory The SSL socket factory to use.
      * @return The SSL socket.
-     * @throw IOException If an exception occurred while performing the
+     * @throws IOException If an exception occurred while performing the
      * TLS handshake.
      */
     private SSLSocket startHandshake(SSLSocketFactory factory)
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/Base64.java	Tue Aug 18 15:46:01 2015 +0200
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/Base64.java	Tue Aug 18 18:04:17 2015 +0300
@@ -124,8 +124,8 @@
      * Translates the specified Base64 string (as per Preferences.get(byte[]))
      * into a byte array.
      *
-     * @throw IllegalArgumentException if {@code s} is not a valid Base64
-     *        string.
+     * @throws IllegalArgumentException if {@code s} is not a valid Base64
+     *         string.
      */
     static byte[] base64ToByteArray(String s) {
         return base64ToByteArray(s, false);
@@ -135,9 +135,9 @@
      * Translates the specified "alternate representation" Base64 string
      * into a byte array.
      *
-     * @throw IllegalArgumentException or ArrayOutOfBoundsException
-     *        if {@code s} is not a valid alternate representation
-     *        Base64 string.
+     * @throws IllegalArgumentException or ArrayOutOfBoundsException
+     *         if {@code s} is not a valid alternate representation
+     *         Base64 string.
      */
     static byte[] altBase64ToByteArray(String s) {
         return base64ToByteArray(s, true);
@@ -194,8 +194,8 @@
      * Translates the specified character, which is assumed to be in the
      * "Base 64 Alphabet" into its equivalent 6-bit positive integer.
      *
-     * @throw IllegalArgumentException or ArrayOutOfBoundsException if
-     *        c is not in the Base64 Alphabet.
+     * @throws IllegalArgumentException or ArrayOutOfBoundsException if
+     *         c is not in the Base64 Alphabet.
      */
     private static int base64toInt(char c, byte[] alphaToInt) {
         int result = alphaToInt[c];