Duplicate words typos in comments/javadoc/strings

Lance Andersen lance.andersen at oracle.com
Mon Jan 28 17:04:44 UTC 2019


The updates look fine
> On Jan 27, 2019, at 5:35 PM, Andrey Turbanov <turbanoff at gmail.com> wrote:
> 
> Hello.
> I noticed that Open JDK source code contains many duplicate words
> typos which could be easily find via simple regexp.
> I checked only java.base module and fixed problems there. Does it
> makes sense to create patches to other modules too?
> 
> Index: src/java.base/share/classes/java/lang/module/Resolver.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/java/lang/module/Resolver.java
> (revision 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/java/lang/module/Resolver.java
> (date 1548627900626)
> @@ -659,7 +659,7 @@
>      * Checks the readability graph to ensure that
>      * <ol>
>      *   <li><p> A module does not read two or more modules with the same name.
> -     *   This includes the case where a module reads another another with the
> +     *   This includes the case where a module reads another with the
>      *   same name as itself. </p></li>
>      *   <li><p> Two or more modules in the configuration don't export the same
>      *   package to a module that reads both. This includes the case where a
> Index: src/java.base/share/classes/sun/security/ssl/TrustStoreManager.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/sun/security/ssl/TrustStoreManager.java
>   (revision 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/sun/security/ssl/TrustStoreManager.java
>   (date 1548627900979)
> @@ -331,7 +331,7 @@
>         }
> 
>         /**
> -         * Load the the KeyStore as described in the specified descriptor.
> +         * Load the KeyStore as described in the specified descriptor.
>          */
>         private static KeyStore loadKeyStore(
>                 TrustStoreDescriptor descriptor) throws Exception {
> Index: src/java.base/share/classes/java/lang/String.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/java/lang/String.java    (revision
> 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/java/lang/String.java    (date 1548627901252)
> @@ -2698,7 +2698,7 @@
>      * <p>
>      * Otherwise, returns a substring of this string beginning with the first
>      * code point that is not a {@link Character#isWhitespace(int) white space}
> -     * up to to and including the last code point of this string.
> +     * up to and including the last code point of this string.
>      * <p>
>      * This method may be used to trim
>      * {@link Character#isWhitespace(int) white space} from
> Index: src/java.base/share/classes/jdk/internal/platform/Metrics.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/jdk/internal/platform/Metrics.java
> (revision 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/jdk/internal/platform/Metrics.java
> (date 1548627900501)
> @@ -322,7 +322,7 @@
>      * Returns the largest amount of physical memory, in bytes, that
>      * have been allocated in the Isolation Group.
>      *
> -     * @return The largest amount of memory in bytes or or 0 if this
> +     * @return The largest amount of memory in bytes or 0 if this
>      *         metric is not available.
>      *
>      */
> @@ -362,7 +362,7 @@
>      * Returns the largest amount of kernel physical memory, in bytes, that
>      * have been allocated in the Isolation Group.
>      *
> -     * @return The largest amount of memory in bytes or or 0 if this
> +     * @return The largest amount of memory in bytes or 0 if this
>      *         metric is not available.
>      *
>      */
> @@ -402,7 +402,7 @@
>      * Returns the largest amount of networking physical memory, in bytes,
>      * that have been allocated in the Isolation Group.
>      *
> -     * @return The largest amount of memory in bytes or or 0 if this
> +     * @return The largest amount of memory in bytes or 0 if this
>      *         metric is not available.
>      *
>      */
> @@ -442,7 +442,7 @@
>      * Returns the largest amount of physical memory and swap space,
>      * in bytes, that have been allocated in the Isolation Group.
>      *
> -     * @return The largest amount of memory in bytes or or 0 if this
> +     * @return The largest amount of memory in bytes or 0 if this
>      *         metric is not available.
>      *
>      */
> Index: src/java.base/share/classes/java/lang/Object.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/java/lang/Object.java    (revision
> 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/java/lang/Object.java    (date 1548627901176)
> @@ -430,7 +430,7 @@
>      * }</pre>
>      *
>      * @param  timeoutMillis the maximum time to wait, in milliseconds
> -     * @param  nanos   additional time, in nanoseconds, in the range
> range 0-999999 inclusive
> +     * @param  nanos   additional time, in nanoseconds, in the range
> 0-999999 inclusive
>      * @throws IllegalArgumentException if {@code timeoutMillis} is negative,
>      *         or if the value of {@code nanos} is out of range
>      * @throws IllegalMonitorStateException if the current thread is not
> Index: src/java.base/share/classes/sun/security/util/ConstraintsParameters.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/sun/security/util/ConstraintsParameters.java
>   (revision 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/sun/security/util/ConstraintsParameters.java
>   (date 1548627901022)
> @@ -37,7 +37,7 @@
>  * This class contains parameters for checking against constraints that extend
>  * past the publicly available parameters in
> java.security.AlgorithmConstraints.
> 
> - * This is currently on passed between  between PKIX, AlgorithmChecker,
> + * This is currently on passed between PKIX, AlgorithmChecker,
>  * and DisabledAlgorithmConstraints.
>  */
> public class ConstraintsParameters {
> Index: src/java.base/share/classes/java/util/SimpleTimeZone.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/java/util/SimpleTimeZone.java
> (revision 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/java/util/SimpleTimeZone.java    (date
> 1548627900673)
> @@ -310,7 +310,7 @@
>      *                        See the class description for the
> special cases of this parameter.
>      * @param endDayOfWeek    The daylight saving time ending day-of-week.
>      *                        See the class description for the
> special cases of this parameter.
> -     * @param endTime         The daylight saving ending time in time time mode
> +     * @param endTime         The daylight saving ending time in time mode
>      *                        specified by <code>endTimeMode</code>.
>      * @param endTimeMode     The mode of the end time specified by endTime
>      * @param dstSavings      The amount of time in milliseconds saved during
> Index: src/java.base/share/classes/sun/security/util/math/SmallValue.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/sun/security/util/math/SmallValue.java
>   (revision 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/sun/security/util/math/SmallValue.java
>   (date 1548627900541)
> @@ -28,7 +28,7 @@
> /**
>  * A "small" value that can be used with the field arithmetic library. This
>  * interface enables optimizations based on the fact that certain values are
> - * known to be small, where the definition of small is specific to the the
> + * known to be small, where the definition of small is specific to the
>  * arithmetic implementation.
>  */
> 
> Index: src/java.base/share/classes/java/lang/invoke/MethodHandle.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/java/lang/invoke/MethodHandle.java
> (revision 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/java/lang/invoke/MethodHandle.java
> (date 1548627901076)
> @@ -1083,7 +1083,7 @@
>       * else if (makeVarargs)
>       *   return asVarargsCollector(type().lastParameterType());
>       * else
> -      *   return return asFixedArity();
> +      *   return asFixedArity();
>       * }</pre></blockquote>
>       * @param makeVarargs true if the return method handle should
> have variable arity behavior
>       * @return a method handle of the same type, with possibly
> adjusted variable arity behavior
> Index: src/java.base/share/classes/sun/security/ssl/RenegoInfoExtension.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/sun/security/ssl/RenegoInfoExtension.java
>   (revision 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/sun/security/ssl/RenegoInfoExtension.java
>   (date 1548627900928)
> @@ -145,7 +145,7 @@
>             if (!chc.conContext.isNegotiated) {
>                 if (chc.activeCipherSuites.contains(
>                         CipherSuite.TLS_EMPTY_RENEGOTIATION_INFO_SCSV)) {
> -                    // Using the the TLS_EMPTY_RENEGOTIATION_INFO_SCSV instead.
> +                    // Using the TLS_EMPTY_RENEGOTIATION_INFO_SCSV instead.
>                     return null;
>                 }
> 
> Index: src/java.base/share/classes/sun/security/ssl/HandshakeHash.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/sun/security/ssl/HandshakeHash.java
> (revision 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/sun/security/ssl/HandshakeHash.java
> (date 1548627901128)
> @@ -246,7 +246,7 @@
>             try {
>                 baos.writeTo(result.baos);
>             } catch (IOException ex) {
> -                throw new RuntimeException("unable to to clone hash state");
> +                throw new RuntimeException("unable to clone hash state");
>             }
>             return result;
>         }
> Index: src/java.base/share/classes/sun/security/ssl/SSLTransport.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/sun/security/ssl/SSLTransport.java
> (revision 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/sun/security/ssl/SSLTransport.java
> (date 1548627900586)
> @@ -71,7 +71,7 @@
>      * destination application data buffers.
>      *
>      * For SSL/TLS connections, if no source data, the network data may be
> -     * received from the underlying underlying SSL/TLS input stream.
> +     * received from the underlying SSL/TLS input stream.
>      *
>      * @param context      the transportation context
>      * @param srcs         an array of {@code ByteBuffers} containing the
> Index: src/java.base/share/classes/java/util/stream/WhileOps.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/java/util/stream/WhileOps.java
> (revision 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/java/util/stream/WhileOps.java
> (date 1548627900792)
> @@ -658,7 +658,7 @@
>         // True if no splitting should be performed, if true then
>         // this spliterator may be used for an underlying spliterator whose
>         // covered elements have an encounter order
> -        // See use in stream take/dropWhile default default methods
> +        // See use in stream take/dropWhile default methods
>         final boolean noSplitting;
>         // True when operations are cancelled for all related spliterators
>         // For taking, spliterators cannot split or traversed
> Index: src/java.base/share/classes/java/lang/invoke/VarHandle.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/java/lang/invoke/VarHandle.java
> (revision 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/java/lang/invoke/VarHandle.java
> (date 1548627900836)
> @@ -2160,7 +2160,7 @@
>          * Construct a {@linkplain VarHandleDesc} given a kind, name,
> and declaring
>          * class.
>          *
> -         * @param kind the kind of of the var handle
> +         * @param kind the kind of the var handle
>          * @param name the unqualified name of the field, for field
> var handles; otherwise ignored
>          * @param declaringClass a {@link ClassDesc} describing the
> declaring class,
>          *                       for field var handles
> @@ -2217,7 +2217,7 @@
> 
>         /**
>          * Returns a {@linkplain VarHandleDesc} corresponding to a
> {@link VarHandle}
> -         * for for an array type.
> +         * for an array type.
>          *
>          * @param arrayClass a {@link ClassDesc} describing the type
> of the array
>          * @return the {@linkplain VarHandleDesc}
> Index: src/java.base/share/classes/javax/security/auth/callback/ConfirmationCallback.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/javax/security/auth/callback/ConfirmationCallback.java
>   (revision 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/javax/security/auth/callback/ConfirmationCallback.java
>   (date 1548627900895)
> @@ -58,7 +58,7 @@
>     public static final int YES_NO_OPTION               = 0;
> 
>     /**
> -     * YES/NO/CANCEL confirmation confirmation option.
> +     * YES/NO/CANCEL confirmation option.
>      *
>      * <p> An underlying security service specifies this as the
>      * {@code optionType} to a {@code ConfirmationCallback}
> @@ -68,7 +68,7 @@
>     public static final int YES_NO_CANCEL_OPTION        = 1;
> 
>     /**
> -     * OK/CANCEL confirmation confirmation option.
> +     * OK/CANCEL confirmation option.
>      *
>      * <p> An underlying security service specifies this as the
>      * {@code optionType} to a {@code ConfirmationCallback}
> Index: src/java.base/share/classes/jdk/internal/access/SharedSecrets.java
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- src/java.base/share/classes/jdk/internal/access/SharedSecrets.java
>   (revision 2fd909c73e16044cf2b92fa93ab996cd226edd9e)
> +++ src/java.base/share/classes/jdk/internal/access/SharedSecrets.java
>   (date 1548627901204)
> @@ -77,7 +77,7 @@
> 
>     public static JavaUtilJarAccess javaUtilJarAccess() {
>         if (javaUtilJarAccess == null) {
> -            // Ensure JarFile is initialized; we know that that class
> +            // Ensure JarFile is initialized; we know that this class
>             // provides the shared secret
>             unsafe.ensureClassInitialized(JarFile.class);
>         }
> 
> 
> Andrey Turbanov.

 <http://oracle.com/us/design/oracle-email-sig-198324.gif>
 <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
 <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>





More information about the core-libs-dev mailing list