Re: Duplicate words typos in comments/javadoc/strings
Hi, Andrey. On 27/01/2019 14:35, Andrey Turbanov wrote: I checked only java.base module and fixed problems there. Does it makes sense to create patches to other modules too? You are welcome to make the similar changes in java.desktop module, please use these email alias awt-dev/2d-dev/swing-dev. -- Best regards, Sergey.
Re: Duplicate words typos in comments/javadoc/strings
No attachment received. David On 30/01/2019 8:02 am, Andrey Turbanov wrote: Could you please re-generate your patch? The reason I'm asking is that the current patch contains extra line breaks. Hm. There wasn't any extra line breaks in sent email. Regenerated patch attached. Andre Turbanov
Re: Duplicate words typos in comments/javadoc/strings
>Could you please re-generate your patch? The reason I'm asking is that the >current patch contains extra line breaks. Hm. There wasn't any extra line breaks in sent email. Regenerated patch attached. Andre Turbanov
Re: Duplicate words typos in comments/javadoc/strings
fyi, mailers have a bad habit of wrapping patches at the wrong point. Attaching it as a text (.txt) file works too. On 01/29/2019 08:42 AM, Pavel Rappo wrote: On 28 Jan 2019, at 22:23, Andrey Turbanov wrote: Thanks to review. Patch updated. I'm not really sure what to do next. I should find someone who can create issue and commit my patch to repository, right? Andrey, Could you please re-generate your patch? The reason I'm asking is that the current patch contains extra line breaks. Please paste the exact diff output into your message. Do not apply any additional formatting on top of it. Thank you.
Re: Duplicate words typos in comments/javadoc/strings
> On 28 Jan 2019, at 22:23, Andrey Turbanov wrote: > > Thanks to review. Patch updated. I'm not really sure what to do next. > I should find someone who can create issue and commit my patch to > repository, right? Andrey, Could you please re-generate your patch? The reason I'm asking is that the current patch contains extra line breaks. Please paste the exact diff output into your message. Do not apply any additional formatting on top of it. Thank you.
Re: Duplicate words typos in comments/javadoc/strings
On 29/01/2019 10:16 pm, Pavel Rappo wrote: On 29 Jan 2019, at 08:50, David Holmes wrote: Hi Pavel, I don't think this kind of trivial change needs the OCA to be signed. "A Participant may post messages to a list, submit simple patches, and make other kinds of small contributions." [1] Hi David, That is true. However, I'm not sure how to distinguish between a trivial patch and a not so trivial. True for code changes, but duplicate word removal seems about as trivial as you can get! David
Re: Duplicate words typos in comments/javadoc/strings
> On 29 Jan 2019, at 08:50, David Holmes wrote: > > Hi Pavel, > > I don't think this kind of trivial change needs the OCA to be signed. > > "A Participant may post messages to a list, submit simple patches, and make > other kinds of small contributions." [1] Hi David, That is true. However, I'm not sure how to distinguish between a trivial patch and a not so trivial.
Re: Duplicate words typos in comments/javadoc/strings
Hi Pavel, On 29/01/2019 11:54 am, Pavel Rappo wrote: On 28 Jan 2019, at 22:23, Andrey Turbanov wrote: Thanks to review. Patch updated. I'm not really sure what to do next. I should find someone who can create issue and commit my patch to repository, right? Have you signed the OCA [1]? The full process is described here [2]. If you have signed the OCA, I can sponsor that change for you. I don't think this kind of trivial change needs the OCA to be signed. "A Participant may post messages to a list, submit simple patches, and make other kinds of small contributions." [1] Cheers, David - [1] http://openjdk.java.net/bylaws#participant P.S. While we are here. I had a script once that was looking for the same pattern of typos, namely repeated words. Usually it happens just after the line break. As if people loose a visual context after hitting the Enter key. Would you mind accepting additional typos into your patch? [1] https://www.oracle.com/technetwork/oca-405177.pdf [2] https://openjdk.java.net/contribute/
Re: Duplicate words typos in comments/javadoc/strings
> On 28 Jan 2019, at 22:23, Andrey Turbanov wrote: > > Thanks to review. Patch updated. I'm not really sure what to do next. > I should find someone who can create issue and commit my patch to > repository, right? Have you signed the OCA [1]? The full process is described here [2]. If you have signed the OCA, I can sponsor that change for you. P.S. While we are here. I had a script once that was looking for the same pattern of typos, namely repeated words. Usually it happens just after the line break. As if people loose a visual context after hitting the Enter key. Would you mind accepting additional typos into your patch? [1] https://www.oracle.com/technetwork/oca-405177.pdf [2] https://openjdk.java.net/contribute/
Re: Duplicate words typos in comments/javadoc/strings
> On 28/01/2019 17:04, Lance Andersen wrote: > > The updates look fine > >> - * This includes the case where a module reads another another with > >> the > >> + * This includes the case where a module reads another with the > >> > This one is typo, it should say "another module". > > -Alan Thanks to review. Patch updated. I'm not really sure what to do next. I should find someone who can create issue and commit my patch to repository, right? diff -r fcfeed9fef45 src/java.base/share/classes/java/lang/Object.java --- a/src/java.base/share/classes/java/lang/Object.javaMon Jan 28 21:44:57 2019 +0100 +++ b/src/java.base/share/classes/java/lang/Object.javaTue Jan 29 01:21:13 2019 +0300 @@ -430,7 +430,7 @@ * } * * @param timeoutMillis the maximum time to wait, in milliseconds - * @param nanos additional time, in nanoseconds, in the range range 0-99 inclusive + * @param nanos additional time, in nanoseconds, in the range 0-99 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 diff -r fcfeed9fef45 src/java.base/share/classes/java/lang/String.java --- a/src/java.base/share/classes/java/lang/String.javaMon Jan 28 21:44:57 2019 +0100 +++ b/src/java.base/share/classes/java/lang/String.javaTue Jan 29 01:21:13 2019 +0300 @@ -2698,7 +2698,7 @@ * * 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. * * This method may be used to trim * {@link Character#isWhitespace(int) white space} from diff -r fcfeed9fef45 src/java.base/share/classes/java/lang/invoke/MethodHandle.java --- a/src/java.base/share/classes/java/lang/invoke/MethodHandle.java Mon Jan 28 21:44:57 2019 +0100 +++ b/src/java.base/share/classes/java/lang/invoke/MethodHandle.java Tue Jan 29 01:21:13 2019 +0300 @@ -1083,7 +1083,7 @@ * else if (makeVarargs) * return asVarargsCollector(type().lastParameterType()); * else - * return return asFixedArity(); + * return asFixedArity(); * } * @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 diff -r fcfeed9fef45 src/java.base/share/classes/java/lang/invoke/VarHandle.java --- a/src/java.base/share/classes/java/lang/invoke/VarHandle.java Mon Jan 28 21:44:57 2019 +0100 +++ b/src/java.base/share/classes/java/lang/invoke/VarHandle.java Tue Jan 29 01:21:13 2019 +0300 @@ -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} diff -r fcfeed9fef45 src/java.base/share/classes/java/lang/module/Resolver.java --- a/src/java.base/share/classes/java/lang/module/Resolver.java Mon Jan 28 21:44:57 2019 +0100 +++ b/src/java.base/share/classes/java/lang/module/Resolver.java Tue Jan 29 01:21:13 2019 +0300 @@ -659,7 +659,7 @@ * Checks the readability graph to ensure that * *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 module with the * same name as itself. *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 diff -r fcfeed9fef45 src/java.base/share/classes/java/util/SimpleTimeZone.java --- a/src/java.base/share/classes/java/util/SimpleTimeZone.javaMon Jan 28 21:44:57 2019 +0100 +++ b/src/java.base/share/classes/java/util/SimpleTimeZone.javaTue Jan 29 01:21:13 2019 +0300 @@ -310,7 +310,7 @@ *See the class description for the special cases of this parameter. * @param endDayOfWeekThe daylight saving time ending day-of-week. *See the class description for
Re: Duplicate words typos in comments/javadoc/strings
On 28/01/2019 17:04, Lance Andersen wrote: The updates look fine - * This includes the case where a module reads another another with the + * This includes the case where a module reads another with the This one is typo, it should say "another module". -Alan
Re: Duplicate words typos in comments/javadoc/strings
The updates look fine > On Jan 27, 2019, at 5:35 PM, Andrey Turbanov 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 > * > *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. > *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 @@ > * > * 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. > * > * 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: