You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2022/10/29 06:20:42 UTC

[groovy] branch GROOVY_4_0_X updated (662210ed30 -> 1e7573ef14)

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a change to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


    from 662210ed30 GROOVY-10786: Cannot call modulo operator (%) on BigDecimal types
     new 1288928c67 Polish org.codehaus.groovy.classgen package documentation
     new 627480dcd1 Fix minor typos in tests documentation
     new b12219a563 Polish groovy.lang package documentation
     new ef114c9172 Polish project documentation
     new 39d21c1258 Polish groovy package documentation
     new 8289ffdd93 Fix minor typos in subprojects spec documentations
     new ac423cd240 minor tweak to doco
     new 456a79a7b8 Polish org.codehaus.groovy.ast package documentation
     new 1e7573ef14 Ignore Vscode & Fleet folders

The 9 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                                         |  3 ++
 CONTRIBUTING.md                                    |  4 +--
 README.adoc                                        | 10 +++----
 .../groovy/cli/internal/CliBuilderInternal.groovy  |  2 +-
 src/main/java/groovy/cli/Option.java               |  4 +--
 .../groovy/grape/GrabAnnotationTransformation.java |  2 +-
 src/main/java/groovy/lang/Binding.java             |  2 +-
 src/main/java/groovy/lang/Closure.java             |  4 +--
 src/main/java/groovy/lang/ExpandoMetaClass.java    | 18 ++++++------
 src/main/java/groovy/lang/GString.java             |  2 +-
 src/main/java/groovy/lang/Grab.java                |  2 +-
 src/main/java/groovy/lang/GroovyClassLoader.java   | 10 +++----
 src/main/java/groovy/lang/MetaClass.java           | 10 +++----
 src/main/java/groovy/lang/MetaClassImpl.java       | 24 +++++++--------
 src/main/java/groovy/lang/MetaClassRegistry.java   | 30 +++++++++----------
 .../groovy/lang/MetaClassRegistryChangeEvent.java  |  2 +-
 .../lang/MetaClassRegistryChangeEventListener.java |  2 +-
 src/main/java/groovy/lang/MetaMethod.java          | 18 ++++++------
 src/main/java/groovy/lang/MetaObjectProtocol.java  |  4 +--
 src/main/java/groovy/lang/Writable.java            | 14 ++++-----
 src/main/java/groovy/transform/AutoFinal.java      |  2 +-
 .../java/groovy/transform/InheritConstructors.java |  4 +--
 src/main/java/groovy/transform/Synchronized.java   |  2 +-
 .../options/LegacyHashMapPropertyHandler.java      |  2 +-
 .../groovy/transform/stc/PickAnyArgumentHint.java  |  2 +-
 src/main/java/groovy/ui/GroovyMain.java            |  2 +-
 src/main/java/groovy/util/CharsetToolkit.java      | 22 +++++++-------
 src/main/java/groovy/util/ConfigObject.java        |  2 +-
 .../java/groovy/util/FactoryBuilderSupport.java    | 12 ++++----
 src/main/java/groovy/util/Node.java                |  2 +-
 .../java/groovy/util/PermutationGenerator.java     |  4 +--
 src/main/java/org/codehaus/groovy/ast/ASTNode.java |  2 +-
 .../java/org/codehaus/groovy/ast/ClassHelper.java  |  2 +-
 .../java/org/codehaus/groovy/ast/ClassNode.java    |  8 ++---
 .../java/org/codehaus/groovy/ast/CompileUnit.java  |  2 +-
 .../codehaus/groovy/ast/NodeMetaDataHandler.java   | 34 +++++++++++-----------
 .../org/codehaus/groovy/ast/VariableScope.java     |  2 +-
 .../groovy/ast/decompiled/AsmDecompiler.java       |  2 +-
 .../groovy/ast/decompiled/DecompiledClassNode.java |  2 +-
 .../groovy/ast/expr/GStringExpression.java         |  4 +--
 .../groovy/ast/expr/VariableExpression.java        |  4 +--
 .../codehaus/groovy/ast/tools/GeneralUtils.java    |  2 +-
 .../codehaus/groovy/ast/tools/GenericsUtils.java   |  2 +-
 .../groovy/ast/tools/WideningCategories.java       |  8 ++---
 .../groovy/classgen/ClassCompletionVerifier.java   |  2 +-
 .../groovy/classgen/FinalVariableAnalyzer.java     |  2 +-
 .../org/codehaus/groovy/classgen/Verifier.java     |  4 +--
 .../classgen/asm/BinaryExpressionHelper.java       |  2 +-
 .../asm/BinaryExpressionMultiTypeDispatcher.java   |  2 +-
 .../classgen/asm/BinaryIntExpressionHelper.java    | 16 +++++-----
 .../classgen/asm/BinaryLongExpressionHelper.java   |  6 ++--
 .../groovy/classgen/asm/BytecodeDumper.java        |  2 +-
 .../groovy/classgen/asm/BytecodeHelper.java        |  2 +-
 .../groovy/classgen/asm/CallSiteWriter.java        |  2 +-
 .../codehaus/groovy/classgen/asm/CompileStack.java |  8 ++---
 .../groovy/classgen/asm/InvocationWriter.java      |  2 +-
 .../classgen/asm/OptimizingStatementWriter.java    |  6 ++--
 .../classgen/asm/WriterControllerFactory.java      |  2 +-
 .../classgen/asm/sc/StaticInvocationWriter.java    |  2 +-
 ...StaticTypesMethodReferenceExpressionWriter.java |  2 +-
 src/spec/test/ClassDesignASTTransformsTest.groovy  |  2 +-
 src/spec/test/DesignPatternsTest.groovy            |  2 +-
 src/tck/test/gls/ch03/s03/UnicodeEscapes2.groovy   |  2 +-
 src/test/gls/innerClass/InnerClassTest.groovy      |  2 +-
 src/test/gls/invocation/CovariantReturnTest.groovy |  2 +-
 src/test/gls/invocation/DefaultParamTest.groovy    |  2 +-
 .../gls/syntax/OldClosureSyntaxRemovalTest.groovy  |  4 +--
 src/test/gls/syntax/UnderscoreInNumbersTest.groovy |  2 +-
 src/test/groovy/CastTest.groovy                    |  2 +-
 src/test/groovy/CategoryTest.groovy                |  2 +-
 src/test/groovy/ClosureMethodTest.groovy           |  6 ++--
 src/test/groovy/HexTest.groovy                     |  2 +-
 src/test/groovy/bugs/CustomMetaClassTest.groovy    |  6 ++--
 src/test/groovy/bugs/DefVariableBug.groovy         |  2 +-
 src/test/groovy/bugs/Groovy4480Bug.groovy          |  4 +--
 src/test/groovy/bugs/Groovy8678.groovy             |  6 ++--
 .../groovy/bugs/SynchronizedBytecodeBug.groovy     |  2 +-
 src/test/groovy/lang/ClassReloadingTest.groovy     |  4 +--
 src/test/groovy/lang/DummyGString.java             |  2 +-
 src/test/groovy/lang/ExpandoMetaClassTest.groovy   |  4 +--
 src/test/groovy/lang/MetaClassRegistryTest.groovy  |  2 +-
 src/test/groovy/transform/ReadWriteLockTest.groovy |  2 +-
 src/test/groovy/txn/TransactionBuilder.java        |  2 +-
 .../groovy/util/FactoryBuilderSupportTest.groovy   | 16 +++++-----
 src/test/groovy/util/ProxyTest.groovy              | 12 ++++----
 .../antlr4/util/ASTComparatorCategory.groovy       |  4 +--
 .../groovy/classgen/DumpingClassLoader.java        |  2 +-
 .../reflection/utils/ReflectionUtilsTest.groovy    |  4 +--
 .../runtime/CustomBooleanCoercionTest.groovy       |  4 +--
 .../groovy/runtime/MethodRankHelperTest.java       |  4 +--
 .../groovy/tools/stubgenerator/Groovy7966.groovy   |  2 +-
 subprojects/groovy-binary/src/spec/doc/index.adoc  |  6 ++--
 .../src/spec/doc/groovy-console.adoc               |  4 +--
 .../groovy-ginq/src/spec/doc/ginq-userguide.adoc   |  2 +-
 .../groovy-groovysh/src/spec/doc/groovysh.adoc     |  6 ++--
 subprojects/groovy-jmx/src/spec/doc/jmx.adoc       | 14 ++++-----
 .../src/spec/doc/_integrating-jsr223.adoc          |  2 +-
 .../src/spec/doc/servlet-userguide.adoc            |  4 +--
 .../groovy-swing/src/spec/doc/_swing-builder.adoc  |  6 ++--
 .../groovy-xml/src/spec/doc/xml-userguide.adoc     | 26 ++++++++---------
 subprojects/stress/README.adoc                     |  2 +-
 101 files changed, 274 insertions(+), 271 deletions(-)


[groovy] 05/09: Polish groovy package documentation

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 39d21c1258fa29803a913a25634dadc1b67ba8d4
Author: Marc Wrobel <ma...@gmail.com>
AuthorDate: Tue Oct 18 15:08:39 2022 +0200

    Polish groovy package documentation
    
    Fix typos and improve documentation (javadoc, comments) in the groovy package.
    
    Note that the following words / expressions were preferred :
    
    - sub-class -> subclass (more common, see https://docs.oracle.com/javase/tutorial/java/IandI/subclasses.html),
    - meta class -> metaclass (incorrect, see https://en.wikipedia.org/wiki/Metaclass).
---
 .../groovy/cli/internal/CliBuilderInternal.groovy  |  2 +-
 src/main/java/groovy/cli/Option.java               |  4 ++--
 .../groovy/grape/GrabAnnotationTransformation.java |  2 +-
 src/main/java/groovy/transform/AutoFinal.java      |  2 +-
 .../java/groovy/transform/InheritConstructors.java |  4 ++--
 src/main/java/groovy/transform/Synchronized.java   |  2 +-
 .../options/LegacyHashMapPropertyHandler.java      |  2 +-
 .../groovy/transform/stc/PickAnyArgumentHint.java  |  2 +-
 src/main/java/groovy/ui/GroovyMain.java            |  2 +-
 src/main/java/groovy/util/CharsetToolkit.java      | 22 +++++++++++-----------
 src/main/java/groovy/util/ConfigObject.java        |  2 +-
 .../java/groovy/util/FactoryBuilderSupport.java    | 12 ++++++------
 src/main/java/groovy/util/Node.java                |  2 +-
 .../java/groovy/util/PermutationGenerator.java     |  4 ++--
 14 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/src/main/groovy/groovy/cli/internal/CliBuilderInternal.groovy b/src/main/groovy/groovy/cli/internal/CliBuilderInternal.groovy
index a3bc3ee249..39eeb0d4ad 100644
--- a/src/main/groovy/groovy/cli/internal/CliBuilderInternal.groovy
+++ b/src/main/groovy/groovy/cli/internal/CliBuilderInternal.groovy
@@ -66,7 +66,7 @@ class CliBuilderInternal {
      * For backwards compatibility with Apache Commons CLI, set this property to
      * <code>true</code> if the parser should recognize long options with both
      * a single hyphen and a double hyphen prefix. The default is <code>false</code>,
-     * so only long options with a double hypen prefix (<code>--option</code>) are recognized.
+     * so only long options with a double hyphen prefix (<code>--option</code>) are recognized.
      * @since 2.5
      */
     boolean acceptLongOptionsWithSingleHyphen = false
diff --git a/src/main/java/groovy/cli/Option.java b/src/main/java/groovy/cli/Option.java
index 9b48861738..49da86d17d 100644
--- a/src/main/java/groovy/cli/Option.java
+++ b/src/main/java/groovy/cli/Option.java
@@ -54,9 +54,9 @@ public @interface Option {
     String longName() default "";
 
     /**
-     * The value separator for this multi-valued option. Only allowed for array-typed arguments.
+     * The value separator for this multivalued option. Only allowed for array-typed arguments.
      *
-     * @return the value separator for this multi-valued option
+     * @return the value separator for this multivalued option
      */
     String valueSeparator() default "";
 
diff --git a/src/main/java/groovy/grape/GrabAnnotationTransformation.java b/src/main/java/groovy/grape/GrabAnnotationTransformation.java
index 3aefb0793f..9cfec9dddc 100644
--- a/src/main/java/groovy/grape/GrabAnnotationTransformation.java
+++ b/src/main/java/groovy/grape/GrabAnnotationTransformation.java
@@ -384,7 +384,7 @@ public class GrabAnnotationTransformation extends ClassCodeVisitorSupport implem
                 }
             } catch (RuntimeException re) {
                 // Decided against syntax exception since this is not a syntax error.
-                // The down side is we lose line number information for the offending
+                // The downside is we lose line number information for the offending
                 // @Grab annotation.
                 source.addException(re);
             }
diff --git a/src/main/java/groovy/transform/AutoFinal.java b/src/main/java/groovy/transform/AutoFinal.java
index cd1d9c8234..dbc67429ae 100644
--- a/src/main/java/groovy/transform/AutoFinal.java
+++ b/src/main/java/groovy/transform/AutoFinal.java
@@ -89,7 +89,7 @@ import java.lang.annotation.Target;
 public @interface AutoFinal {
     /**
      * Indicates that adding final to parameters should not be applied on this node.
-     * <p>Normally not required since leaving off the annotation will achieve the same affect.
+     * <p>Normally not required since leaving off the annotation will achieve the same effect.
      * However, it can be useful for selectively disabling this annotation in just a small part
      * of an otherwise annotated class. As an example, it would make sense to set this to {@code false} on
      * a method which altered parameters in a class already marked as {@code @AutoFinal}.
diff --git a/src/main/java/groovy/transform/InheritConstructors.java b/src/main/java/groovy/transform/InheritConstructors.java
index 5479201946..0725377396 100644
--- a/src/main/java/groovy/transform/InheritConstructors.java
+++ b/src/main/java/groovy/transform/InheritConstructors.java
@@ -26,7 +26,7 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * Class annotation to make constructors from a super class available in a sub class.
+ * Class annotation to make constructors from a super class available in a subclass.
  * Should be used with care with other annotations which create constructors - see "Known
  * Limitations" for more details.
  * <p>
@@ -70,7 +70,7 @@ import java.lang.annotation.Target;
  * Typical Groovy style is to use named-arg constructors when possible.
  * This is easy to do for Groovy objects or any objects following JavaBean
  * conventions. In other cases, inheriting the constructors may be useful.
- * However, sub-classes often introduce new properties and these are often best
+ * However, subclasses often introduce new properties and these are often best
  * set in a constructor; especially if that matches the style adopted
  * in parent classes. So, even for the example above, it may have been
  * better style to define an explicit constructor for <code>PersonAge</code>
diff --git a/src/main/java/groovy/transform/Synchronized.java b/src/main/java/groovy/transform/Synchronized.java
index b3f88e2adb..46a2e7b810 100644
--- a/src/main/java/groovy/transform/Synchronized.java
+++ b/src/main/java/groovy/transform/Synchronized.java
@@ -43,7 +43,7 @@ import java.lang.annotation.Target;
  * parameter to the {@code @Synchronized} annotation. In this usage variant, the lock field
  * will not be created automatically, and you must explicitly create it yourself.
  * <p>
- * <em>Rationale:</em> Locking on <code>this</code> or your own class object can have unfortunate side-effects,
+ * <em>Rationale:</em> Locking on <code>this</code> or your own class object can have unfortunate side effects,
  * as other code not under your control can lock on these objects as well, which can
  * cause race conditions and other nasty threading-related bugs.
  * <p>
diff --git a/src/main/java/groovy/transform/options/LegacyHashMapPropertyHandler.java b/src/main/java/groovy/transform/options/LegacyHashMapPropertyHandler.java
index d0c84097e1..9a791d0d46 100644
--- a/src/main/java/groovy/transform/options/LegacyHashMapPropertyHandler.java
+++ b/src/main/java/groovy/transform/options/LegacyHashMapPropertyHandler.java
@@ -50,7 +50,7 @@ import static org.codehaus.groovy.ast.tools.GeneralUtils.varX;
  * tried to be compatible with both expected tuple behavior and expected named-argument behavior
  * by peeking into the supplied map and guessing as to which approach might be applicable.
  * Recent versions of Groovy now allow both {@code @TupleConstructor} and {@code @MapConstructor}
- * annotations to co-exist which provide's a more flexible solution to this problem. While more
+ * annotations to co-exist which provides a more flexible solution to this problem. While more
  * flexible, the new approach isn't fully compatible with the previous approach. If for some
  * reason you need the old behavior, you can try this property handler. Some features of the
  * new approach won't be available to you.
diff --git a/src/main/java/groovy/transform/stc/PickAnyArgumentHint.java b/src/main/java/groovy/transform/stc/PickAnyArgumentHint.java
index 34b58f0c37..4264596848 100644
--- a/src/main/java/groovy/transform/stc/PickAnyArgumentHint.java
+++ b/src/main/java/groovy/transform/stc/PickAnyArgumentHint.java
@@ -46,7 +46,7 @@ public class PickAnyArgumentHint extends SingleSignatureClosureHint {
     private final int genericTypeIndex;
 
     /**
-     * Creates the an argument picker which extracts the type of the first parameter.
+     * Creates an argument picker which extracts the type of the first parameter.
      */
     public PickAnyArgumentHint() {
         this(0,-1);
diff --git a/src/main/java/groovy/ui/GroovyMain.java b/src/main/java/groovy/ui/GroovyMain.java
index f1c7e2a75b..4dfa13a075 100644
--- a/src/main/java/groovy/ui/GroovyMain.java
+++ b/src/main/java/groovy/ui/GroovyMain.java
@@ -84,7 +84,7 @@ public class GroovyMain {
     // automatically output the result of each script
     private boolean autoOutput;
 
-    // automatically split each line using the splitpattern
+    // automatically split each line using the splitPattern
     private boolean autoSplit;
 
     // The pattern used to split the current line
diff --git a/src/main/java/groovy/util/CharsetToolkit.java b/src/main/java/groovy/util/CharsetToolkit.java
index 6e2d1351f1..a049a56da3 100644
--- a/src/main/java/groovy/util/CharsetToolkit.java
+++ b/src/main/java/groovy/util/CharsetToolkit.java
@@ -140,14 +140,14 @@ public class CharsetToolkit {
     /**
      * Guess the encoding of the provided buffer.
      * If Byte Order Markers are encountered at the beginning of the buffer, we immediately
-     * return the charset implied by this BOM. Otherwise, the file would not be a human
-     * readable text file.
+     * return the charset implied by this BOM. Otherwise, the file would not be a
+     * human-readable text file.
      * <p>
      * If there is no BOM, this method tries to discern whether the file is UTF-8 or not.
      * If it is not UTF-8, we assume the encoding is the default system encoding
      * (of course, it might be any 8-bit charset, but usually, an 8-bit charset is the default one).
      * <p>
-     * It is possible to discern UTF-8 thanks to the pattern of characters with a multi-byte sequence.
+     * It is possible to discern UTF-8 thanks to the pattern of characters with a multibyte sequence.
      * <pre>
      * UCS-4 range (hex.)        UTF-8 octet sequence (binary)
      * 0000 0000-0000 007F       0xxxxxxx
@@ -163,7 +163,7 @@ public class CharsetToolkit {
      */
     private Charset guessEncoding() {
         // if the file has a Byte Order Marker, we can assume the file is in UTF-xx
-        // otherwise, the file would not be human readable
+        // otherwise, the file would not be human-readable
         if (hasUTF8Bom())
             return StandardCharsets.UTF_8;
         if (hasUTF16LEBom())
@@ -197,7 +197,7 @@ public class CharsetToolkit {
                 // a two-bytes sequence was encountered
                 if (isTwoBytesSequence(b0)) {
                     // there must be one continuation byte of the form 10xxxxxx,
-                    // otherwise the following character is is not a valid UTF-8 construct
+                    // otherwise the following character is not a valid UTF-8 construct
                     if (!isContinuationChar(b1))
                         validU8Char = false;
                     else
@@ -206,7 +206,7 @@ public class CharsetToolkit {
                 // a three-bytes sequence was encountered
                 else if (isThreeBytesSequence(b0)) {
                     // there must be two continuation bytes of the form 10xxxxxx,
-                    // otherwise the following character is is not a valid UTF-8 construct
+                    // otherwise the following character is not a valid UTF-8 construct
                     if (!(isContinuationChar(b1) && isContinuationChar(b2)))
                         validU8Char = false;
                     else
@@ -215,7 +215,7 @@ public class CharsetToolkit {
                 // a four-bytes sequence was encountered
                 else if (isFourBytesSequence(b0)) {
                     // there must be three continuation bytes of the form 10xxxxxx,
-                    // otherwise the following character is is not a valid UTF-8 construct
+                    // otherwise the following character is not a valid UTF-8 construct
                     if (!(isContinuationChar(b1) && isContinuationChar(b2) && isContinuationChar(b3)))
                         validU8Char = false;
                     else
@@ -224,7 +224,7 @@ public class CharsetToolkit {
                 // a five-bytes sequence was encountered
                 else if (isFiveBytesSequence(b0)) {
                     // there must be four continuation bytes of the form 10xxxxxx,
-                    // otherwise the following character is is not a valid UTF-8 construct
+                    // otherwise the following character is not a valid UTF-8 construct
                     if (!(isContinuationChar(b1)
                         && isContinuationChar(b2)
                         && isContinuationChar(b3)
@@ -236,7 +236,7 @@ public class CharsetToolkit {
                 // a six-bytes sequence was encountered
                 else if (isSixBytesSequence(b0)) {
                     // there must be five continuation bytes of the form 10xxxxxx,
-                    // otherwise the following character is is not a valid UTF-8 construct
+                    // otherwise the following character is not a valid UTF-8 construct
                     if (!(isContinuationChar(b1)
                         && isContinuationChar(b2)
                         && isContinuationChar(b3)
@@ -253,7 +253,7 @@ public class CharsetToolkit {
                 break;
             i++;
         }
-        // if no byte with an high order bit set, the encoding is US-ASCII
+        // if no byte with a high order bit set, the encoding is US-ASCII
         // (it might have been UTF-7, but this encoding is usually internally used only by mail systems)
         if (!highOrderBit) {
             // returns the default charset rather than US-ASCII if the enforce8Bit flag is set.
@@ -263,7 +263,7 @@ public class CharsetToolkit {
                 return StandardCharsets.US_ASCII;
         }
         // if no invalid UTF-8 were encountered, we can assume the encoding is UTF-8,
-        // otherwise the file would not be human readable
+        // otherwise the file would not be human-readable
         if (validU8Char)
             return StandardCharsets.UTF_8;
         // finally, if it's not UTF-8 nor US-ASCII, let's assume the encoding is the default encoding
diff --git a/src/main/java/groovy/util/ConfigObject.java b/src/main/java/groovy/util/ConfigObject.java
index 5fcf95ac90..4946b548a3 100644
--- a/src/main/java/groovy/util/ConfigObject.java
+++ b/src/main/java/groovy/util/ConfigObject.java
@@ -145,7 +145,7 @@ public class ConfigObject extends GroovyObjectSupport implements Writable, Map,
 
 
     /**
-     * Converts this ConfigObject into a the java.util.Properties format, flattening the tree structure beforehand
+     * Converts this ConfigObject into the java.util.Properties format, flattening the tree structure beforehand
      *
      * @return A java.util.Properties instance
      */
diff --git a/src/main/java/groovy/util/FactoryBuilderSupport.java b/src/main/java/groovy/util/FactoryBuilderSupport.java
index 82764bf4ba..1f79de791d 100644
--- a/src/main/java/groovy/util/FactoryBuilderSupport.java
+++ b/src/main/java/groovy/util/FactoryBuilderSupport.java
@@ -54,7 +54,7 @@ import static org.apache.groovy.util.BeanUtils.capitalize;
  * Mix of BuilderSupport and SwingBuilder's factory support.
  *
  * Warning: this implementation is not thread safe and should not be used
- * across threads in a multi-threaded environment.  A locking mechanism
+ * across threads in a multithreaded environment.  A locking mechanism
  * should be implemented by the subclass if use is expected across
  * multiple threads.
  */
@@ -735,7 +735,7 @@ public abstract class FactoryBuilderSupport extends Binding {
     }
 
     /**
-     * This is a hook for subclasses to plugin a custom strategy for mapping
+     * This is a hook for subclasses to plug in a custom strategy for mapping
      * names to factories.
      *
      * @param name       the name of the factory
@@ -749,7 +749,7 @@ public abstract class FactoryBuilderSupport extends Binding {
     }
 
     /**
-     * This is a hook for subclasses to plugin a custom strategy for mapping
+     * This is a hook for subclasses to plug in a custom strategy for mapping
      * names to explicit methods.
      *
      * @param methodName the name of the explicit method
@@ -762,7 +762,7 @@ public abstract class FactoryBuilderSupport extends Binding {
     }
 
     /**
-     * This is a hook for subclasses to plugin a custom strategy for mapping
+     * This is a hook for subclasses to plug in a custom strategy for mapping
      * names to property methods.
      *
      * @param propertyName the name of the explicit method
@@ -892,7 +892,7 @@ public abstract class FactoryBuilderSupport extends Binding {
                         getProxyBuilder().getContext().put(PARENT_NAME, parentName);
                         getProxyBuilder().getContext().put(PARENT_BUILDER, parentContext.get(CURRENT_BUILDER));
                         getProxyBuilder().getContext().put(CURRENT_BUILDER, parentContext.get(CHILD_BUILDER));
-                        // lets register the builder as the delegate
+                        // let's register the builder as the delegate
                         getProxyBuilder().setClosureDelegate(closure, node);
                         closure.call();
                     } finally {
@@ -1168,7 +1168,7 @@ public abstract class FactoryBuilderSupport extends Binding {
     public Object build(Script script) {
         // this used to be synchronized, but we also used to remove the
         // metaclass.  Since adding the metaclass is now a side effect, we
-        // don't need to ensure the meta-class won't be observed and don't
+        // don't need to ensure the metaclass won't be observed and don't
         // need to hide the side effect.
         MetaClass scriptMetaClass = script.getMetaClass();
         script.setMetaClass(new FactoryInterceptorMetaClass(scriptMetaClass, this));
diff --git a/src/main/java/groovy/util/Node.java b/src/main/java/groovy/util/Node.java
index 255073a320..efd1293996 100644
--- a/src/main/java/groovy/util/Node.java
+++ b/src/main/java/groovy/util/Node.java
@@ -788,7 +788,7 @@ public class Node implements Serializable, Cloneable {
 
 
     /**
-     * Converts the text of this GPathResult to a Integer object.
+     * Converts the text of this GPathResult to an Integer object.
      *
      * @return the GPathResult, converted to a <code>Integer</code>
      */
diff --git a/src/main/java/groovy/util/PermutationGenerator.java b/src/main/java/groovy/util/PermutationGenerator.java
index 8410e7019f..7834f95db6 100644
--- a/src/main/java/groovy/util/PermutationGenerator.java
+++ b/src/main/java/groovy/util/PermutationGenerator.java
@@ -107,13 +107,13 @@ public class PermutationGenerator<E> implements Iterator<List<E>> {
 
         int temp;
 
-        // Find largest index j with a[j] < a[j+1]
+        // Find the largest index j with a[j] < a[j+1]
         int j = a.length - 2;
         while (a[j] > a[j + 1]) {
             j--;
         }
 
-        // Find index k such that a[k] is smallest integer
+        // Find index k such that a[k] is the smallest integer
         // greater than a[j] to the right of a[j]
         int k = a.length - 1;
         while (a[j] > a[k]) {


[groovy] 07/09: minor tweak to doco

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit ac423cd240f221dc278cc2c6ac04e0f529783459
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Oct 19 12:19:18 2022 +1000

    minor tweak to doco
---
 subprojects/groovy-jmx/src/spec/doc/jmx.adoc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/subprojects/groovy-jmx/src/spec/doc/jmx.adoc b/subprojects/groovy-jmx/src/spec/doc/jmx.adoc
index df1fe88fb3..ad695ba106 100644
--- a/subprojects/groovy-jmx/src/spec/doc/jmx.adoc
+++ b/subprojects/groovy-jmx/src/spec/doc/jmx.adoc
@@ -981,8 +981,8 @@ include::../test/JmxTest.groovy[tags=listener_mbean,indent=0]
 
 In the sample above, we see the **syntax for adding listeners to an exported MBean**.
 
-- Fist, a **timer is exported** and started.
-- Then an **MBean is declared that will listen to the timer** event and do something meaningful.
+- First, a **timer is exported** and started.
+- Then, an **MBean is declared that will listen to the timer** event and do something meaningful.
 - The **"heartbeat:"** name is arbitrary and has no correlation to the timer declared above.
 - The **source** of the event **is specified using the "from:" attribute**.
 
@@ -1005,7 +1005,7 @@ jmx.listener(
 Here is the description of the **listener()** node attributes:
 
 - event: An optional string that identifies the JMX event type to listen for.
-- from (required): The JMX ObjectName of the component to listen to. This can be specified as a string or an instance of ObjectName
+- from (required): The JMX ObjectName of the component to listen to. This can be specified as a string or an instance of ObjectName.
 - call: The closure to execute when the event is captured. This can also be specified as a Groovy method pointer.
 
 Here is an example of JmxBuilder's listener node:


[groovy] 03/09: Polish groovy.lang package documentation

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit b12219a563840f774e1d9de7a5f2acb51a4ac597
Author: Marc Wrobel <ma...@gmail.com>
AuthorDate: Tue Oct 18 14:17:15 2022 +0200

    Polish groovy.lang package documentation
    
    Fix typos and improve documentation (javadoc, comments) in the groovy.lang package.
    
    Note that the following words / expressions were preferred :
    
    - return back -> returns (when possible because it is easier to read),
    - multi-threaded -> multithreaded (more common, see https://en.wikipedia.org/wiki/Multithreading)
    - whether or not -> whether (when possible because it is easier to read),
    - meta class -> metaclass (incorrect, see https://en.wikipedia.org/wiki/Metaclass).
    
    Trailing whitespaces were also removed in the process.
---
 src/main/java/groovy/lang/Binding.java             |  2 +-
 src/main/java/groovy/lang/Closure.java             |  4 +--
 src/main/java/groovy/lang/ExpandoMetaClass.java    | 18 ++++++-------
 src/main/java/groovy/lang/GString.java             |  2 +-
 src/main/java/groovy/lang/Grab.java                |  2 +-
 src/main/java/groovy/lang/GroovyClassLoader.java   | 10 ++++----
 src/main/java/groovy/lang/MetaClass.java           | 10 ++++----
 src/main/java/groovy/lang/MetaClassImpl.java       | 24 ++++++++---------
 src/main/java/groovy/lang/MetaClassRegistry.java   | 30 +++++++++++-----------
 .../groovy/lang/MetaClassRegistryChangeEvent.java  |  2 +-
 .../lang/MetaClassRegistryChangeEventListener.java |  2 +-
 src/main/java/groovy/lang/MetaMethod.java          | 18 ++++++-------
 src/main/java/groovy/lang/MetaObjectProtocol.java  |  4 +--
 src/main/java/groovy/lang/Writable.java            | 14 +++++-----
 14 files changed, 71 insertions(+), 71 deletions(-)

diff --git a/src/main/java/groovy/lang/Binding.java b/src/main/java/groovy/lang/Binding.java
index 30a90628f6..1001af56c5 100644
--- a/src/main/java/groovy/lang/Binding.java
+++ b/src/main/java/groovy/lang/Binding.java
@@ -25,7 +25,7 @@ import java.util.Map;
  * Represents the variable bindings of a script which can be altered
  * from outside the script object or created outside of a script and passed
  * into it.
- * <p> Binding instances are not supposed to be used in a multi-threaded context.
+ * <p> Binding instances are not supposed to be used in a multithreaded context.
  */
 public class Binding extends GroovyObjectSupport {
     private Map variables;
diff --git a/src/main/java/groovy/lang/Closure.java b/src/main/java/groovy/lang/Closure.java
index 7d48cf8d71..d26cdb151d 100644
--- a/src/main/java/groovy/lang/Closure.java
+++ b/src/main/java/groovy/lang/Closure.java
@@ -850,7 +850,7 @@ public abstract class Closure<V> extends GroovyObjectSupport implements Cloneabl
      * Builds a trampolined variant of the current closure.
      * To prevent stack overflow due to deep recursion, functions can instead leverage the trampoline mechanism
      * and avoid recursive calls altogether. Under trampoline, the function is supposed to perform one step of
-     * the calculation and, instead of a recursive call to itself or another function, it return back a new closure,
+     * the calculation and, instead of a recursive call to itself or another function, it returns a new closure,
      * which will be executed by the trampoline as the next step.
      * Once a non-closure value is returned, the trampoline stops and returns the value as the final result.
      * Here is an example:
@@ -874,7 +874,7 @@ public abstract class Closure<V> extends GroovyObjectSupport implements Cloneabl
      * Builds a trampolined variant of the current closure.
      * To prevent stack overflow due to deep recursion, functions can instead leverage the trampoline mechanism
      * and avoid recursive calls altogether. Under trampoline, the function is supposed to perform one step of
-     * the calculation and, instead of a recursive call to itself or another function, it return back a new closure,
+     * the calculation and, instead of a recursive call to itself or another function, it returns a new closure,
      * which will be executed by the trampoline as the next step.
      * Once a non-closure value is returned, the trampoline stops and returns the value as the final result.
      * @return A closure, which will execute the original closure on a trampoline.
diff --git a/src/main/java/groovy/lang/ExpandoMetaClass.java b/src/main/java/groovy/lang/ExpandoMetaClass.java
index d1343ec342..2d413b3b17 100644
--- a/src/main/java/groovy/lang/ExpandoMetaClass.java
+++ b/src/main/java/groovy/lang/ExpandoMetaClass.java
@@ -244,12 +244,12 @@ import static org.codehaus.groovy.runtime.MetaClassHelper.EMPTY_TYPE_ARRAY;
  * When using the default implementations of MetaClass, methods are only allowed to be added before initialize() is called.
  * In other words you create a new MetaClass, add some methods and then call initialize(). If you attempt to add new methods
  * after initialize() has been called, an error will be thrown. This is to ensure that the MetaClass can operate appropriately
- * in multi-threaded environments as it forces you to do all method additions at the beginning, before using the MetaClass.
+ * in multithreaded environments as it forces you to do all method additions at the beginning, before using the MetaClass.
  * <p>
  * ExpandoMetaClass differs here from the default in that it allows you to add methods after initialize has been called.
  * This is done by setting the initialize flag internally to false and then add the methods. Since this is not thread
  * safe it has to be done in a synchronized block. The methods to check for modification and initialization are
- * therefore synchronized as well. Any method call done through this meta class will first check if the it is
+ * therefore synchronized as well. Any method call done through this metaclass will first check if the it is
  * synchronized. Should this happen during a modification, then the method cannot be selected or called unless the
  * modification is completed.
  * <p>
@@ -327,7 +327,7 @@ public class ExpandoMetaClass extends MetaClassImpl implements GroovyObject {
      * in the MetaClassRegistry automatically
      *
      * @param theClass The class that the MetaClass applies to
-     * @param register True if the MetaClass should be registered inside the MetaClassRegistry. This defaults to true and ExpandoMetaClass will effect all instances if changed
+     * @param register True if the MetaClass should be registered inside the MetaClassRegistry. This defaults to true and ExpandoMetaClass will affect all instances if changed
      */
     public ExpandoMetaClass(Class theClass, boolean register) {
         this(theClass,register,false,null);
@@ -342,8 +342,8 @@ public class ExpandoMetaClass extends MetaClassImpl implements GroovyObject {
      * in the MetaClassRegistry automatically
      *
      * @param theClass The class that the MetaClass applies to
-     * @param register True if the MetaClass should be registered inside the MetaClassRegistry. This defaults to true and ExpandoMetaClass will effect all instances if changed
-     * @param allowChangesAfterInit Should the meta class be modifiable after initialization. Default is false.
+     * @param register True if the MetaClass should be registered inside the MetaClassRegistry. This defaults to true and ExpandoMetaClass will affect all instances if changed
+     * @param allowChangesAfterInit Should the metaclass be modifiable after initialization. Default is false.
      */
     public ExpandoMetaClass(Class theClass, boolean register, boolean allowChangesAfterInit) {
         this(theClass, register, allowChangesAfterInit, null);
@@ -507,7 +507,7 @@ public class ExpandoMetaClass extends MetaClassImpl implements GroovyObject {
     }
 
     /**
-     * Checks if the meta class is initialized.
+     * Checks if the metaclass is initialized.
      * @see groovy.lang.MetaClassImpl#isInitialized()
      */
     @Override
@@ -901,7 +901,7 @@ public class ExpandoMetaClass extends MetaClassImpl implements GroovyObject {
             if (isInitialized()) {
                 throw new RuntimeException("Already initialized, cannot add new method: " + metaMethod);
             }
-            // we always adds meta methods to class itself
+            // we always add meta methods to class itself
             addMetaMethodToIndex(metaMethod, metaMethodIndex.getHeader(theClass));
 
             dropMethodCache(methodName);
@@ -957,7 +957,7 @@ public class ExpandoMetaClass extends MetaClassImpl implements GroovyObject {
             modified = true;
             // Implementation note: By default Groovy uses soft references to store MetaClass
             // this insures the registry doesn't grow and get out of hand. By doing this we're
-            // saying this this EMC will be a hard reference in the registry. As we're only
+            // saying this EMC will be a hard reference in the registry. As we're only
             // going have a small number of classes that have modified EMC this is ok
             if (inRegistry) {
                 MetaClass currMetaClass = registry.getMetaClass(theClass);
@@ -1251,7 +1251,7 @@ public class ExpandoMetaClass extends MetaClassImpl implements GroovyObject {
     /**
      * Returns true if the name of the method specified and the number of arguments make it a javabean property
      *
-     * @param name True if its a Javabean property
+     * @param name True if it's a Javabean property
      * @param args The arguments
      * @return True if it is a javabean property method
      */
diff --git a/src/main/java/groovy/lang/GString.java b/src/main/java/groovy/lang/GString.java
index 58ee7d6e41..3b6b4d0792 100644
--- a/src/main/java/groovy/lang/GString.java
+++ b/src/main/java/groovy/lang/GString.java
@@ -89,7 +89,7 @@ public abstract class GString extends GroovyObjectSupport implements Comparable,
         try {
             return super.invokeMethod(name, args);
         } catch (MissingMethodException e) {
-            // lets try invoke the method on the real String
+            // let's try to invoke the method on the real String
             return InvokerHelper.invokeMethod(toString(), name, args);
         }
     }
diff --git a/src/main/java/groovy/lang/Grab.java b/src/main/java/groovy/lang/Grab.java
index 89be8b38e4..4e4b330e24 100644
--- a/src/main/java/groovy/lang/Grab.java
+++ b/src/main/java/groovy/lang/Grab.java
@@ -128,7 +128,7 @@ public @interface Grab {
      * {@code group#module;version[confs]} (where only group and module are required and confs,
      * if used, is one or more comma separated configuration names)<br>
      * In addition, you can add any valid Ivy attributes at the end of your string value using
-     * semi-colon separated name = value pairs, e.g.:<br>
+     * semicolon separated name = value pairs, e.g.:<br>
      * {@code @Grab('junit:junit:*;transitive=false')}<br>
      * {@code @Grab('group=junit;module=junit;version=4.8.2;classifier=javadoc')}<br>
      */
diff --git a/src/main/java/groovy/lang/GroovyClassLoader.java b/src/main/java/groovy/lang/GroovyClassLoader.java
index cb5e5bde92..f76d77c003 100644
--- a/src/main/java/groovy/lang/GroovyClassLoader.java
+++ b/src/main/java/groovy/lang/GroovyClassLoader.java
@@ -812,8 +812,8 @@ public class GroovyClassLoader extends URLClassLoader {
     }
 
     /**
-     * sets if the recompilation should be enable. There are 3 possible
-     * values for this. Any value different than null overrides the
+     * sets if the recompilation should be enabled. There are 3 possible
+     * values for this. Any value different from null overrides the
      * value from the compiler configuration. true means to recompile if needed
      * false means to never recompile.
      *
@@ -1032,8 +1032,8 @@ public class GroovyClassLoader extends URLClassLoader {
 
         File file = new File(path, fileWithoutPackage);
         if (file.exists()) {
-            // file.exists() might be case insensitive.
-            // Let's do case sensitive match for the filename
+            // file.exists() might be case-insensitive.
+            // Let's do case-sensitive match for the filename
             try {
                 String caseSensitiveName = file.getCanonicalPath();
                 int index = caseSensitiveName.lastIndexOf(File.separator);
@@ -1066,7 +1066,7 @@ public class GroovyClassLoader extends URLClassLoader {
      * @param source the source we may want to compile
      * @param cls    the former class
      * @return true if the source is newer, false else
-     * @throws IOException if it is not possible to open an
+     * @throws IOException if it is not possible to open a
      *                     connection for the given source
      * @see #getTimeStamp(Class)
      */
diff --git a/src/main/java/groovy/lang/MetaClass.java b/src/main/java/groovy/lang/MetaClass.java
index 100901c3ec..b06d4c6cc5 100644
--- a/src/main/java/groovy/lang/MetaClass.java
+++ b/src/main/java/groovy/lang/MetaClass.java
@@ -106,7 +106,7 @@ public interface MetaClass extends MetaObjectProtocol {
      * @param propertyName The name of the property
      * @param optionalValue The value of the property which could be null in the case of a getter
      * @param isGetter Whether the missing property event was the result of a getter or a setter
-     * 
+     *
      * @return The result of the propertyMissing method or throws MissingPropertyException
      */
      Object invokeMissingProperty(Object instance, String propertyName, Object optionalValue, boolean isGetter);
@@ -136,12 +136,12 @@ public interface MetaClass extends MetaObjectProtocol {
 
     /**
      * Complete the initialisation process. After this method
-     * is called no methods should be added to the meta class.
+     * is called no methods should be added to the metaclass.
      * Invocation of methods or access to fields/properties is
-     * forbidden unless this method is called. This method 
+     * forbidden unless this method is called. This method
      * should contain any initialisation code, taking a longer
-     * time to complete. An example is the creation of the 
-     * Reflector. It is suggested to synchronize this 
+     * time to complete. An example is the creation of the
+     * Reflector. It is suggested to synchronize this
      * method.
      */
      void initialize();
diff --git a/src/main/java/groovy/lang/MetaClassImpl.java b/src/main/java/groovy/lang/MetaClassImpl.java
index 11b92ac13b..cb60058231 100644
--- a/src/main/java/groovy/lang/MetaClassImpl.java
+++ b/src/main/java/groovy/lang/MetaClassImpl.java
@@ -254,7 +254,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
     /**
      * Returns the registry for this metaclass
      *
-     * @return The resgistry
+     * @return The registry
      */
     public MetaClassRegistry getRegistry() {
         return registry;
@@ -971,7 +971,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
      * @param instance      The instance
      * @param propertyName  The name of the property
      * @param optionalValue The value in the case of a setter
-     * @param isGetter      True if its a getter
+     * @param isGetter      True if it's a getter
      * @return The value in the case of a getter or a MissingPropertyException
      */
     protected Object invokeStaticMissingProperty(Object instance, String propertyName, Object optionalValue, boolean isGetter) {
@@ -1412,7 +1412,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
             try {
                 return metaClass.invokeMethod(closure.getClass(), closure, DO_CALL_METHOD, originalArguments, false, fromInsideClass);
             } catch (MissingMethodException mme) {
-                // fall through -- "doCall" is not instrisic to Closure
+                // fall through -- "doCall" is not intrinsic to Closure
             }
         }
 
@@ -1594,7 +1594,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
 //        Class[] argClasses = MetaClassHelper.convertToTypeArray(arguments);
 
         MetaMethod method = retrieveStaticMethod(methodName, arguments);
-        // let's try use the cache to find the method
+        // let's try to use the cache to find the method
 
         if (method != null) {
             MetaClassHelper.unwrap(arguments);
@@ -3136,7 +3136,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
 
     /**
      * adds a MetaMethod to this class. WARNING: this method will not
-     * do the neccessary steps for multimethod logic and using this
+     * do the necessary steps for multimethod logic and using this
      * method doesn't mean, that a method added here is replacing another
      * method from a parent class completely. These steps are usually done
      * by initialize, which means if you need these steps, you have to add
@@ -3284,7 +3284,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
                 return;
             }
         }
-        // the casese true and null for a match are through, the
+        // the cases true and null for a match are through, the
         // remaining case is false and that means adding the method
         // to our list
         list.add(method);
@@ -3456,7 +3456,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
 
     /**
      * Complete the initialisation process. After this method
-     * is called no methods should be added to the meta class.
+     * is called no methods should be added to the metaclass.
      * Invocation of methods or access to fields/properties is
      * forbidden unless this method is called. This method
      * should contain any initialisation code, taking a longer
@@ -3508,7 +3508,7 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
             for (Method listenerMethod : listenerMethods) {
                 final MetaMethod metaMethod = CachedMethod.find(descriptor.getAddListenerMethod());
                 // GROOVY-5202
-                // there might be a non public listener of some kind
+                // there might be a non-public listener of some kind
                 // we skip that here
                 if (metaMethod == null) continue;
                 addToAllMethodsIfPublic(metaMethod);
@@ -3963,20 +3963,20 @@ public class MetaClassImpl implements MetaClass, MutableMetaClass {
     }
 
     /**
-     * indicates is the meta class method invocation for non-static methods is done
+     * indicates is the metaclass method invocation for non-static methods is done
      * through a custom invoker object.
      *
-     * @return true - if the method invocation is not done by the meta class itself
+     * @return true - if the method invocation is not done by the metaclass itself
      */
     public boolean hasCustomInvokeMethod() {
         return invokeMethodMethod != null;
     }
 
     /**
-     * indicates is the meta class method invocation for static methods is done
+     * indicates is the metaclass method invocation for static methods is done
      * through a custom invoker object.
      *
-     * @return true - if the method invocation is not done by the meta class itself
+     * @return true - if the method invocation is not done by the metaclass itself
      */
     public boolean hasCustomStaticInvokeMethod() {
         return false;
diff --git a/src/main/java/groovy/lang/MetaClassRegistry.java b/src/main/java/groovy/lang/MetaClassRegistry.java
index ef6e206316..03d10555b3 100644
--- a/src/main/java/groovy/lang/MetaClassRegistry.java
+++ b/src/main/java/groovy/lang/MetaClassRegistry.java
@@ -25,7 +25,7 @@ import java.lang.reflect.Constructor;
 import java.util.Iterator;
 
 /**
- * A MetaClassRegistry is an object that is responsible for managing the a cache of MetaClass instances. Each
+ * A MetaClassRegistry is an object that is responsible for managing a cache of MetaClass instances. Each
  * java.lang.Class instance has an associated MetaClass and client code can query this interface for the MetaClass for
  * a given associated java.lang.Class
  *
@@ -36,7 +36,7 @@ public interface MetaClassRegistry {
 
     /**
      * The main function of the registry
-     * If a meta class exists then return it
+     * If a metaclass exists then return it
      * otherwise create one, put it in the registry and return it
      */
     MetaClass getMetaClass(Class theClass);
@@ -71,14 +71,14 @@ public interface MetaClassRegistry {
     void setMetaClassCreationHandle(MetaClassCreationHandle handle);
 
     /**
-     * Adds a meta class change listener for constant meta classes
+     * Adds a metaclass change listener for constant metaclasses
      *
      * @param listener - the update listener
      */
     void addMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener);
 
     /**
-     * Adds a meta class change listener for constant meta classes.
+     * Adds a metaclass change listener for constant metaclasses.
      * This listener cannot be removed!
      *
      * @param listener - the update listener
@@ -86,38 +86,38 @@ public interface MetaClassRegistry {
     void addNonRemovableMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener);
 
     /**
-     * Removes a meta class change listener for constant meta classes
+     * Removes a metaclass change listener for constant metaclasses
      *
      * @param listener - the update listener
      */
     void removeMetaClassRegistryChangeEventListener(MetaClassRegistryChangeEventListener listener);
 
     /**
-     * Returns all registered class change listener for constant meta classes.
+     * Returns all registered class change listener for constant metaclasses.
      *
      * @return an array containing all change listener
      */
     MetaClassRegistryChangeEventListener[] getMetaClassRegistryChangeEventListeners();
 
     /**
-     * Gets a snapshot of the current constant meta classes and returns it as Iterator.
+     * Gets a snapshot of the current constant metaclasses and returns it as Iterator.
      * Modifications done using this Iterator will not cause a ConcurrentModificationException.
      * If a MetaClass is removed using this Iterator, then the MetaClass will only
      * be removed if the MetaClass was not replaced by another MetaClass in the meantime.
      * If a MetaClass is added while using this Iterator, then it will be part of the Iteration.
-     * If a MetaClass replaces another constant meta class, then the Iteration might show two
-     * meta classes for the same class.
+     * If a MetaClass replaces another constant metaclass, then the Iteration might show two
+     * metaclasses for the same class.
      * <p>
-     * Note: This Iterator may not used with multiple threads.
+     * Note: This Iterator may not be used with multiple threads.
      *
-     * @return Iterator for the constant meta classes
+     * @return Iterator for the constant metaclasses
      */
     Iterator iterator();
 
     /**
      * Class used as base for the creation of MetaClass implementations.
      * The Class defaults to MetaClassImpl, if the class loading fails to
-     * find a special meta class. The name for such a meta class would be
+     * find a special metaclass. The name for such a metaclass would be
      * the class name it is created for with the prefix
      * "groovy.runtime.metaclass." By replacing the handle in the registry
      * you can have any control over the creation of what MetaClass is used
@@ -168,17 +168,17 @@ public interface MetaClassRegistry {
         }
 
         /**
-         * Returns whether custom meta classes are disabled.
+         * Returns whether custom metaclasses are disabled.
          */
         public boolean isDisableCustomMetaClassLookup() {
             return disableCustomMetaClassLookup;
         }
 
         /**
-         * Set flag saying to disable lookup of custom meta classes
+         * Set flag saying to disable lookup of custom metaclasses
          * It's enough to call this method only once in your application for handle which was set in to registry
          * as every new handle will inherit this property
-         * @param disableCustomMetaClassLookup flag saying to disable lookup of custom meta classes
+         * @param disableCustomMetaClassLookup flag saying to disable lookup of custom metaclasses
          */
         public void setDisableCustomMetaClassLookup(boolean disableCustomMetaClassLookup) {
             this.disableCustomMetaClassLookup = disableCustomMetaClassLookup;
diff --git a/src/main/java/groovy/lang/MetaClassRegistryChangeEvent.java b/src/main/java/groovy/lang/MetaClassRegistryChangeEvent.java
index 0077365a6e..8049a47b75 100644
--- a/src/main/java/groovy/lang/MetaClassRegistryChangeEvent.java
+++ b/src/main/java/groovy/lang/MetaClassRegistryChangeEvent.java
@@ -21,7 +21,7 @@ package groovy.lang;
 import java.util.EventObject;
 
 /**
- * An event used to propagate meta class updates
+ * An event used to propagate metaclass updates
  */
 public class MetaClassRegistryChangeEvent extends EventObject {
     private static final long serialVersionUID = 1647849176793457976L;
diff --git a/src/main/java/groovy/lang/MetaClassRegistryChangeEventListener.java b/src/main/java/groovy/lang/MetaClassRegistryChangeEventListener.java
index 6a850e9adb..d264ea0c2f 100644
--- a/src/main/java/groovy/lang/MetaClassRegistryChangeEventListener.java
+++ b/src/main/java/groovy/lang/MetaClassRegistryChangeEventListener.java
@@ -30,7 +30,7 @@ import java.util.EventListener;
 public interface MetaClassRegistryChangeEventListener extends EventListener{
 
     /**
-     * Called when the a constant MetaClass is updated. If the new MetaClass is null, then the MetaClass
+     * Called when the constant MetaClass is updated. If the new MetaClass is null, then the MetaClass
      * is removed. Be careful, while this method is executed other updates may happen. If you want this
      * method thread safe, you have to take care of that by yourself.
      *
diff --git a/src/main/java/groovy/lang/MetaMethod.java b/src/main/java/groovy/lang/MetaMethod.java
index be98d4b7d5..46f887e23b 100644
--- a/src/main/java/groovy/lang/MetaMethod.java
+++ b/src/main/java/groovy/lang/MetaMethod.java
@@ -94,7 +94,7 @@ public abstract class MetaMethod extends ParameterTypes implements Cloneable {
      * @throws IllegalArgumentException if the parameters are not valid
      */
     public void checkParameters(Class[] arguments) {
-        // lets check that the argument types are valid
+        // let's check that the argument types are valid
         if (!isValidMethod(arguments)) {
             throw new IllegalArgumentException(
                     "Parameters to method: "
@@ -107,7 +107,7 @@ public abstract class MetaMethod extends ParameterTypes implements Cloneable {
     }
 
     /**
-     *Returns true if this this metamethod represents the same method as the argument.
+     * Returns true if this metamethod represents the same method as the argument.
      *
      * @param method A metaMethod instance
      * @return true if method is for the same method as this method, false otherwise.
@@ -171,7 +171,7 @@ public abstract class MetaMethod extends ParameterTypes implements Cloneable {
     }
 
     /**
-     * Returns whether or not this method is static.
+     * Returns whether this method is static.
      * @return true if this method is static
      */
     public boolean isStatic() {
@@ -179,7 +179,7 @@ public abstract class MetaMethod extends ParameterTypes implements Cloneable {
     }
 
     /**
-     * Returns whether or not this method is abstract.
+     * Returns whether this method is abstract.
      * @return true if this method is abstract
      */
     public boolean isAbstract() {
@@ -187,7 +187,7 @@ public abstract class MetaMethod extends ParameterTypes implements Cloneable {
     }
 
     /**
-     * Returns whether or not this method is interface-default.
+     * Returns whether this method is interface-default.
      * @return true if this method is default
      */
     public boolean isDefault() {
@@ -195,7 +195,7 @@ public abstract class MetaMethod extends ParameterTypes implements Cloneable {
     }
 
     /**
-     * Returns whether or not this method is private.
+     * Returns whether this method is private.
      * @return true if this method is private
      */
     public final boolean isPrivate() {
@@ -203,7 +203,7 @@ public abstract class MetaMethod extends ParameterTypes implements Cloneable {
     }
 
     /**
-     * Returns whether or not this method is protected.
+     * Returns whether this method is protected.
      * @return true if this method is protected
      */
     public final boolean isProtected() {
@@ -211,7 +211,7 @@ public abstract class MetaMethod extends ParameterTypes implements Cloneable {
     }
 
     /**
-     * Returns whether or not this method is public.
+     * Returns whether this method is public.
      * @return true if this method is public
      */
     public final boolean isPublic() {
@@ -232,7 +232,7 @@ public abstract class MetaMethod extends ParameterTypes implements Cloneable {
 
     /**
      * Checks the compatibility between two modifier masks. Checks that they are equal
-     * with regards to access and static modifier.
+     * in regard to access and static modifier.
      *
      * @return true if the modifiers are compatible
      */
diff --git a/src/main/java/groovy/lang/MetaObjectProtocol.java b/src/main/java/groovy/lang/MetaObjectProtocol.java
index b37caae139..793da68bd8 100644
--- a/src/main/java/groovy/lang/MetaObjectProtocol.java
+++ b/src/main/java/groovy/lang/MetaObjectProtocol.java
@@ -29,14 +29,14 @@ import java.util.List;
 public interface MetaObjectProtocol {
 
     /**
-     * Obtain a list of all meta properties available on this meta class
+     * Obtain a list of all meta properties available on this metaclass
      *
      * @see groovy.lang.MetaProperty
      * @return A list of MetaProperty instances
      */
     List<MetaProperty> getProperties();
     /**
-     * Obtain a list of all the meta methods available on this meta class
+     * Obtain a list of all the meta methods available on this metaclass
      *
      * @see groovy.lang.MetaMethod
      * @return A list of MetaMethod instances
diff --git a/src/main/java/groovy/lang/Writable.java b/src/main/java/groovy/lang/Writable.java
index fde3be3002..90c2a1d5fe 100644
--- a/src/main/java/groovy/lang/Writable.java
+++ b/src/main/java/groovy/lang/Writable.java
@@ -28,7 +28,7 @@ import java.io.Writer;
  * of itself. This mechanism is particularly useful for templates and such like.
  * <p>
  * It is worth noting that writable implementations often override their
- * toString() implementation as well to allow rendering the same result 
+ * toString() implementation as well to allow rendering the same result
  * directly to a String; however this is not required.
  */
 public interface Writable {
@@ -37,14 +37,14 @@ public interface Writable {
      * Writes this object to the given writer.
      * <p>
      * This is used to defer content creation until the point when it is
-     * streamed to the output destination.  Oftentimes, content will be defined 
-     * but not necessarily created (as is may be the case with a Closure 
-     * definition.)  In that case, the output is then 'deferred' to the point 
-     * when it is serialized to the writer. This class may be used whenever an 
-     * object should be responsible for creating its own textual representation, 
+     * streamed to the output destination.  Oftentimes, content will be defined
+     * but not necessarily created (as it may be the case with a Closure
+     * definition.)  In that case, the output is then 'deferred' to the point
+     * when it is serialized to the writer. This class may be used whenever an
+     * object should be responsible for creating its own textual representation,
      * but creating the entire output as a single String would be inefficient
      * (such as outputting a multi-gigabyte XML document.)
-     * 
+     *
      * @param out the Writer to which this Writable should output its data.
      * @return the Writer that was passed
      * @throws IOException if an error occurred while outputting data to the writer


[groovy] 02/09: Fix minor typos in tests documentation

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 627480dcd1d22128f2aab61e1d6178489c499a40
Author: Marc Wrobel <ma...@gmail.com>
AuthorDate: Tue Oct 18 13:26:02 2022 +0200

    Fix minor typos in tests documentation
    
    Note that the following words / expressions were preferred :
    
    - meta data -> metadata (incorrect, see https://www.merriam-webster.com/dictionary/metadata),
    - meta class -> metaclass (incorrect, see https://en.wikipedia.org/wiki/Metaclass).
    
    Some trailing whitespaces were removed and a few typos in failure messages were also fixed.
---
 src/spec/test/ClassDesignASTTransformsTest.groovy        |  2 +-
 src/spec/test/DesignPatternsTest.groovy                  |  2 +-
 src/tck/test/gls/ch03/s03/UnicodeEscapes2.groovy         |  2 +-
 src/test/gls/innerClass/InnerClassTest.groovy            |  2 +-
 src/test/gls/invocation/CovariantReturnTest.groovy       |  2 +-
 src/test/gls/invocation/DefaultParamTest.groovy          |  2 +-
 src/test/gls/syntax/OldClosureSyntaxRemovalTest.groovy   |  4 ++--
 src/test/gls/syntax/UnderscoreInNumbersTest.groovy       |  2 +-
 src/test/groovy/CastTest.groovy                          |  2 +-
 src/test/groovy/CategoryTest.groovy                      |  2 +-
 src/test/groovy/ClosureMethodTest.groovy                 |  6 +++---
 src/test/groovy/HexTest.groovy                           |  2 +-
 src/test/groovy/bugs/CustomMetaClassTest.groovy          |  6 +++---
 src/test/groovy/bugs/DefVariableBug.groovy               |  2 +-
 src/test/groovy/bugs/Groovy4480Bug.groovy                |  4 ++--
 src/test/groovy/bugs/Groovy8678.groovy                   |  6 +++---
 src/test/groovy/bugs/SynchronizedBytecodeBug.groovy      |  2 +-
 src/test/groovy/lang/ClassReloadingTest.groovy           |  4 ++--
 src/test/groovy/lang/DummyGString.java                   |  2 +-
 src/test/groovy/lang/ExpandoMetaClassTest.groovy         |  4 ++--
 src/test/groovy/lang/MetaClassRegistryTest.groovy        |  2 +-
 src/test/groovy/transform/ReadWriteLockTest.groovy       |  2 +-
 src/test/groovy/txn/TransactionBuilder.java              |  2 +-
 src/test/groovy/util/FactoryBuilderSupportTest.groovy    | 16 ++++++++--------
 src/test/groovy/util/ProxyTest.groovy                    | 12 ++++++------
 .../parser/antlr4/util/ASTComparatorCategory.groovy      |  4 ++--
 .../org/codehaus/groovy/classgen/DumpingClassLoader.java |  2 +-
 .../groovy/reflection/utils/ReflectionUtilsTest.groovy   |  4 ++--
 .../groovy/runtime/CustomBooleanCoercionTest.groovy      |  4 ++--
 .../codehaus/groovy/runtime/MethodRankHelperTest.java    |  4 ++--
 .../groovy/tools/stubgenerator/Groovy7966.groovy         |  2 +-
 31 files changed, 57 insertions(+), 57 deletions(-)

diff --git a/src/spec/test/ClassDesignASTTransformsTest.groovy b/src/spec/test/ClassDesignASTTransformsTest.groovy
index 46de3281ed..49e2bf8b74 100644
--- a/src/spec/test/ClassDesignASTTransformsTest.groovy
+++ b/src/spec/test/ClassDesignASTTransformsTest.groovy
@@ -399,7 +399,7 @@ long longComputation(int seed) {
 }
 
 def x = longComputation(1) // returns after 100 milliseconds
-def y = longComputation(1) // returns immediatly
+def y = longComputation(1) // returns immediately
 def z = longComputation(2) // returns after 200 milliseconds
 assert x==y
 assert x!=z
diff --git a/src/spec/test/DesignPatternsTest.groovy b/src/spec/test/DesignPatternsTest.groovy
index b42922300f..f09bce29f7 100644
--- a/src/spec/test/DesignPatternsTest.groovy
+++ b/src/spec/test/DesignPatternsTest.groovy
@@ -1134,7 +1134,7 @@ class DesignPatternsTest extends CompilableTestSupport {
             }
 
             class Aircraft {
-                private type         // instrinsic state
+                private type         // intrinsic state
                 private assetNumber  // extrinsic state
                 private bought       // extrinsic state
                 Aircraft(typeCode, assetNumber, bought) {
diff --git a/src/tck/test/gls/ch03/s03/UnicodeEscapes2.groovy b/src/tck/test/gls/ch03/s03/UnicodeEscapes2.groovy
index 4bf41c09b7..3c045fd1b5 100644
--- a/src/tck/test/gls/ch03/s03/UnicodeEscapes2.groovy
+++ b/src/tck/test/gls/ch03/s03/UnicodeEscapes2.groovy
@@ -36,7 +36,7 @@ class UnicodeEscapes2 extends GroovyTestCase {
         def a = 1
         assert \u0061 == 1 // char 61 is 'a'
 
-        // Not intepreted as an escape
+        // Not interpreted as an escape
         // \\u0061 == 1 // @fail:parse
 
         assert "\u0061".length() == 1
diff --git a/src/test/gls/innerClass/InnerClassTest.groovy b/src/test/gls/innerClass/InnerClassTest.groovy
index 5ce2d21037..476bb45912 100644
--- a/src/test/gls/innerClass/InnerClassTest.groovy
+++ b/src/test/gls/innerClass/InnerClassTest.groovy
@@ -1196,7 +1196,7 @@ final class InnerClassTest {
         // this does actually not do much, but before this
         // change the inner class was tried to be executed
         // because a class ordering bug. The main method
-        // makes the Foo class executeable, but Foo$Bar is
+        // makes the Foo class executable, but Foo$Bar is
         // not. So if Foo$Bar is returned, asserScript will
         // fail. If Foo is returned, asserScript will not
         // fail.
diff --git a/src/test/gls/invocation/CovariantReturnTest.groovy b/src/test/gls/invocation/CovariantReturnTest.groovy
index 8e136aa406..4ecfeea6d5 100644
--- a/src/test/gls/invocation/CovariantReturnTest.groovy
+++ b/src/test/gls/invocation/CovariantReturnTest.groovy
@@ -159,7 +159,7 @@ class CovariantReturnTest extends CompilableTestSupport {
 
     void testImplementedInterfacesNotInfluencing() {
         // in GROOVY-3229 some methods from Appendable were not correctly recognized
-        // as already being overridden (PrintWriter<Writer<Appenable)
+        // as already being overridden (PrintWriter<Writer<Appendable)
         shouldCompile """
             class IndentWriter extends java.io.PrintWriter {
                public IndentWriter(Writer w)  { super(w, true) }
diff --git a/src/test/gls/invocation/DefaultParamTest.groovy b/src/test/gls/invocation/DefaultParamTest.groovy
index 1dad4df56a..d1bfeb7aed 100644
--- a/src/test/gls/invocation/DefaultParamTest.groovy
+++ b/src/test/gls/invocation/DefaultParamTest.groovy
@@ -106,7 +106,7 @@ final class DefaultParamTest extends GroovyTestCase {
 
     void testPrecendence() {
         // def meth(Closure cl = null) will produce a call meth(null)
-        // since interfaces are prefered over normal classes and since
+        // since interfaces are preferred over normal classes and since
         // def meth(Map args, Closure cl = null) will produce a method
         // meth(Map) a simple call with meth(null) would normally call
         // meth(Map). To ensure this will not happen the call has to
diff --git a/src/test/gls/syntax/OldClosureSyntaxRemovalTest.groovy b/src/test/gls/syntax/OldClosureSyntaxRemovalTest.groovy
index 984f47e9ad..8d9ac26463 100644
--- a/src/test/gls/syntax/OldClosureSyntaxRemovalTest.groovy
+++ b/src/test/gls/syntax/OldClosureSyntaxRemovalTest.groovy
@@ -29,7 +29,7 @@ class OldClosureSyntaxRemovalTest extends CompilableTestSupport {
         def oldClosure = { a | b }
         assert newClosure(1) == 1
         assert oldClosure.getMaximumNumberOfParameters() == 1
-        // the old closure would have cimply returned b
+        // the old closure would have simply returned b
         // after removal this is the logic or
         assert oldClosure(1) == (a | b)
     }
@@ -42,4 +42,4 @@ class OldClosureSyntaxRemovalTest extends CompilableTestSupport {
             c = { a,b -> a+b }
         """
     }
-}
\ No newline at end of file
+}
diff --git a/src/test/gls/syntax/UnderscoreInNumbersTest.groovy b/src/test/gls/syntax/UnderscoreInNumbersTest.groovy
index 084d23debb..cd1f3734a9 100644
--- a/src/test/gls/syntax/UnderscoreInNumbersTest.groovy
+++ b/src/test/gls/syntax/UnderscoreInNumbersTest.groovy
@@ -47,7 +47,7 @@ class UnderscoreInNumbersTest extends CompilableTestSupport {
 
             // this one is mentioned in the proposal but I think is wrong
             // since we shouldn't allow _., ie. an underscore (or a series of underscores)
-            // should alwasy be surrounded with at least one number
+            // should always be surrounded with at least one number
             // double whyWouldYouEverDoThis = 0x1_.ffff_ffff_ffff_fp10_23
         '''
     }
diff --git a/src/test/groovy/CastTest.groovy b/src/test/groovy/CastTest.groovy
index 964b28d596..e91fe95f0e 100644
--- a/src/test/groovy/CastTest.groovy
+++ b/src/test/groovy/CastTest.groovy
@@ -120,7 +120,7 @@ class CastTest extends GroovyTestCase {
         mySet = [2, 3, 4, 3] as Set
         assert mySet instanceof HashSet
 
-        // identitiy test
+        // identity test
         mySet = {} as Set
         assert mySet.is ( mySet as Set )
 
diff --git a/src/test/groovy/CategoryTest.groovy b/src/test/groovy/CategoryTest.groovy
index 7f0c2e662b..aa5c6851f9 100644
--- a/src/test/groovy/CategoryTest.groovy
+++ b/src/test/groovy/CategoryTest.groovy
@@ -190,7 +190,7 @@ final class CategoryTest extends GroovyTestCase {
         // this test will call a method using a POJO while a category is active
         // in call site caching this triggers the usage of POJOMetaClassSite,
         // which was missing a null check for the receiver. The last foo call
-        // uses null to exaclty check that path. I use multiple calls with foo(1)
+        // uses null to exactly check that path. I use multiple calls with foo(1)
         // before to ensure for example indy will do the right things as well,
         // since indy may need more than one call here.
         assertScript """
diff --git a/src/test/groovy/ClosureMethodTest.groovy b/src/test/groovy/ClosureMethodTest.groovy
index e908629c2a..0fab4be429 100644
--- a/src/test/groovy/ClosureMethodTest.groovy
+++ b/src/test/groovy/ClosureMethodTest.groovy
@@ -249,7 +249,7 @@ class ClosureMethodTest extends GroovyTestCase {
         // Check edges
         try {
             [].inject { a, b -> a + b } == null
-            fail("inject(Closure) on an emtpy list should throw a NoSuchElementException")
+            fail("inject(Closure) on an empty list should throw a NoSuchElementException")
         }
         catch (NoSuchElementException e) {
         }
@@ -263,7 +263,7 @@ class ClosureMethodTest extends GroovyTestCase {
 
         try {
             ([] as Object[]).inject { c, item -> c + item }
-            fail("inject(Closure) on an emtpy Object[] should throw a NoSuchElementException")
+            fail("inject(Closure) on an empty Object[] should throw a NoSuchElementException")
         }
         catch (NoSuchElementException e) {
         }
@@ -278,7 +278,7 @@ class ClosureMethodTest extends GroovyTestCase {
         try {
             iter = [hasNext: { -> false }, next: { -> null }] as Iterator
             iter.inject { a, b -> a * b }
-            fail("inject(Closure) on an exhaused iterator should throw a NoSuchElementException")
+            fail("inject(Closure) on an exhausted iterator should throw a NoSuchElementException")
         }
         catch (NoSuchElementException e) {
         }
diff --git a/src/test/groovy/HexTest.groovy b/src/test/groovy/HexTest.groovy
index c97fea5ef0..e6d2ab0b7b 100644
--- a/src/test/groovy/HexTest.groovy
+++ b/src/test/groovy/HexTest.groovy
@@ -75,7 +75,7 @@ class HexTest extends GroovyTestCase {
     }
 
     void testEncodeAndDecode() {
-        // test with an arbitary string
+        // test with an arbitrary string
         def testString = "00010fa011f000ff"
         assert testString.decodeHex().encodeHex().toString() == testString
 
diff --git a/src/test/groovy/bugs/CustomMetaClassTest.groovy b/src/test/groovy/bugs/CustomMetaClassTest.groovy
index d0eedcec24..02d3f04834 100644
--- a/src/test/groovy/bugs/CustomMetaClassTest.groovy
+++ b/src/test/groovy/bugs/CustomMetaClassTest.groovy
@@ -36,7 +36,7 @@ class CustomMetaClassTest extends GroovyTestCase {
 
     void testReplaceMetaClass() {
         /*
-         * Constructing first instance before meta class replacement
+         * Constructing first instance before metaclass replacement
          * is made.
          */
         def firstInstance = "first"
@@ -50,13 +50,13 @@ class CustomMetaClassTest extends GroovyTestCase {
         registry.setMetaClass(String.class, myMetaClass)
 
         /*
-         * Constructing second instance after meta class replacment
+         * Constructing second instance after metaclass replacement
          * is made.
          */
         def secondInstance = "second"
 
         /*
-         * Since we are replacing a meta class at the class level
+         * Since we are replacing a metaclass at the class level
          * we are changing the behavior of the first and second
          * instances of the string.
          */
diff --git a/src/test/groovy/bugs/DefVariableBug.groovy b/src/test/groovy/bugs/DefVariableBug.groovy
index b221378515..a75922acfd 100644
--- a/src/test/groovy/bugs/DefVariableBug.groovy
+++ b/src/test/groovy/bugs/DefVariableBug.groovy
@@ -24,7 +24,7 @@ class DefVariableBug extends GroovyTestCase {
 
     void testBug() {
 
-     /* cpoirier - "def" can be refered to as a variable name,
+     /* cpoirier - "def" can be referred as a variable name,
         but cannot be declared as one (due to ambiguities)
 
         def = 123
diff --git a/src/test/groovy/bugs/Groovy4480Bug.groovy b/src/test/groovy/bugs/Groovy4480Bug.groovy
index 33270dcd3e..0862012e0d 100644
--- a/src/test/groovy/bugs/Groovy4480Bug.groovy
+++ b/src/test/groovy/bugs/Groovy4480Bug.groovy
@@ -22,7 +22,7 @@ import groovy.test.GroovyTestCase
 
 /**
  * Checks that if else can be used on a single line.
- * A regression got introduced wiht extended command expression that dissallowed if else on the same line
+ * A regression got introduced wiht extended command expression that disallowed if else on the same line
  */
 class Groovy4480Bug extends GroovyTestCase {
 
@@ -34,4 +34,4 @@ class Groovy4480Bug extends GroovyTestCase {
         assert ifelse(true) == 3
         assert ifelse(false) == 4
     }
-}
\ No newline at end of file
+}
diff --git a/src/test/groovy/bugs/Groovy8678.groovy b/src/test/groovy/bugs/Groovy8678.groovy
index 03c0a6e45f..4657789959 100644
--- a/src/test/groovy/bugs/Groovy8678.groovy
+++ b/src/test/groovy/bugs/Groovy8678.groovy
@@ -176,7 +176,7 @@ final class Groovy8678 {
     private class BigDecimalCategory {
         // using @Category here has a similar effect like
         //     BigDecimal.metaClass.call << { delegate * 2 }
-        // but without the side effects on the state of BigDecimal's meta class after the test
+        // but without the side effects on the state of BigDecimal's metaclass after the test
         def call() {
             return this * 2
         }
@@ -186,7 +186,7 @@ final class Groovy8678 {
     private class FloatCategory {
         // using @Category here has a similar effect like
         //     Float.metaClass.call << { delegate * 2 }
-        // but without the side effects on the state of Float's meta class after the test
+        // but without the side effects on the state of Float's metaclass after the test
         def call() {
             return this * 2
         }
@@ -196,7 +196,7 @@ final class Groovy8678 {
     private class DoubleCategory {
         // using @Category here has a similar effect like
         //     Double.metaClass.call << { delegate * 2 }
-        // but without the side effects on the state of Double's meta class after the test
+        // but without the side effects on the state of Double's metaclass after the test
         def call() {
             return this * 2
         }
diff --git a/src/test/groovy/bugs/SynchronizedBytecodeBug.groovy b/src/test/groovy/bugs/SynchronizedBytecodeBug.groovy
index 7901f1a6f0..5821faf883 100644
--- a/src/test/groovy/bugs/SynchronizedBytecodeBug.groovy
+++ b/src/test/groovy/bugs/SynchronizedBytecodeBug.groovy
@@ -23,7 +23,7 @@ import groovy.test.GroovyTestCase
 class SynchronizedBytecodeBug extends GroovyTestCase {
 
     /**
-     * Groovy's bytecode associated with syncrhonized(foo) construct used to generate invalid bytecode
+     * Groovy's bytecode associated with synchronized(foo) construct used to generate invalid bytecode
      * This test method shows that the standard wait()/notify() works.
      */
     void testSynchronized() {
diff --git a/src/test/groovy/lang/ClassReloadingTest.groovy b/src/test/groovy/lang/ClassReloadingTest.groovy
index 7d9bc2cdb1..b140c880f6 100644
--- a/src/test/groovy/lang/ClassReloadingTest.groovy
+++ b/src/test/groovy/lang/ClassReloadingTest.groovy
@@ -83,7 +83,7 @@ class ClassReloadingTest extends GroovyTestCase {
         def message = groovyClass.newInstance().greeting
         assert "hello" == message
 
-        // (string, string) version should not do the caching as it breaks Spring integration (bean refreh)
+        // (string, string) version should not do the caching as it breaks Spring integration (bean refresh)
         classStr = """
             class Groovy3981 {
                 def greeting = "goodbye"
@@ -145,4 +145,4 @@ class ClassReloadingTest extends GroovyTestCase {
         }
     }
 
-}
\ No newline at end of file
+}
diff --git a/src/test/groovy/lang/DummyGString.java b/src/test/groovy/lang/DummyGString.java
index beb79a1883..244f8fcaa4 100644
--- a/src/test/groovy/lang/DummyGString.java
+++ b/src/test/groovy/lang/DummyGString.java
@@ -19,7 +19,7 @@
 package groovy.lang;
 
 /**
- * A hand crafted example GString
+ * A handcrafted example GString
  */
 public class DummyGString extends DummyGStringBase {
 
diff --git a/src/test/groovy/lang/ExpandoMetaClassTest.groovy b/src/test/groovy/lang/ExpandoMetaClassTest.groovy
index 83a20afc6b..170d564250 100644
--- a/src/test/groovy/lang/ExpandoMetaClassTest.groovy
+++ b/src/test/groovy/lang/ExpandoMetaClassTest.groovy
@@ -784,10 +784,10 @@ class ExpandoMetaClassTest extends GroovyTestCase {
 
     void testPickMethodForVarg() {
         // as of 1.6 a metaClass is often the HandleMetaclass, which delegates
-        // methods to an underlaying meta class. hasMethod is a Method on EMC
+        // methods to an underlying metaclass. hasMethod is a Method on EMC
         // that takes a Class[] vargs argument as last part. If that part is not
         // given, then hasMetaMethod will still work, but the code actually
-        // invoking the method in EMC.invokeMehod(String,Object) has to correct the
+        // invoking the method in EMC.invokeMethod(String,Object) has to correct the
         // arguments.
         assert "".metaClass.pickMethod("trim")
     }
diff --git a/src/test/groovy/lang/MetaClassRegistryTest.groovy b/src/test/groovy/lang/MetaClassRegistryTest.groovy
index 0f0feccbed..e03e492e7f 100644
--- a/src/test/groovy/lang/MetaClassRegistryTest.groovy
+++ b/src/test/groovy/lang/MetaClassRegistryTest.groovy
@@ -79,7 +79,7 @@ class MetaClassRegistryTest extends GroovyTestCase {
         def metaClasses = []
         registry.each { metaClasses << it }
 
-        // we add one more constant meta class and then count them to
+        // we add one more constant metaclass and then count them to
         // see if the number fits
         Integer.metaClass.foo = {}
 
diff --git a/src/test/groovy/transform/ReadWriteLockTest.groovy b/src/test/groovy/transform/ReadWriteLockTest.groovy
index 91e7de5f4e..7389557c63 100644
--- a/src/test/groovy/transform/ReadWriteLockTest.groovy
+++ b/src/test/groovy/transform/ReadWriteLockTest.groovy
@@ -142,7 +142,7 @@ final class ReadWriteLockTest {
     void testDeadlockingDoesNotOccur() {
         def tester = new MyClass()
 
-        // this tests for deadlocks from not releaseing in finally block
+        // this tests for deadlocks from not releasing in finally block
         shouldFail { tester.namedReaderMethod1() }
         shouldFail { tester.namedReaderMethod2() }
         shouldFail { tester.namedWriterMethod1() }
diff --git a/src/test/groovy/txn/TransactionBuilder.java b/src/test/groovy/txn/TransactionBuilder.java
index a9eda2c4dc..d5e5edcae2 100644
--- a/src/test/groovy/txn/TransactionBuilder.java
+++ b/src/test/groovy/txn/TransactionBuilder.java
@@ -26,7 +26,7 @@ public class TransactionBuilder {
         closure.setDelegate(bean);
         closure.call(this);
 
-        // lets call the closures now
+        // let's call the closures now
         System.out.println("Performing normal transaction");
         bean.run().call(this);
         bean.onSuccess().call(this);
diff --git a/src/test/groovy/util/FactoryBuilderSupportTest.groovy b/src/test/groovy/util/FactoryBuilderSupportTest.groovy
index c61b40ba36..4ac42e4d1a 100644
--- a/src/test/groovy/util/FactoryBuilderSupportTest.groovy
+++ b/src/test/groovy/util/FactoryBuilderSupportTest.groovy
@@ -256,7 +256,7 @@ class FactoryBuilderSupportTest extends GroovyTestCase {
         // property neither set in the binding or explicitly, should fail
         shouldFail { b.exp }
 
-        // setting first should set the value in the binding and make it usable 
+        // setting first should set the value in the binding and make it usable
         b.notExp = 1
         assert b.notExp == 1
 
@@ -274,7 +274,7 @@ class FactoryBuilderSupportTest extends GroovyTestCase {
         b.exp = 4
         assert val == 5
 
-        // symbols in the property closure shold also resolve to the builder...
+        // symbols in the property closure should also resolve to the builder...
         b.registerExplicitProperty ('exp2', {exp}, {exp = it })
 
         assert b.exp2 == val - 1
@@ -300,7 +300,7 @@ class FactoryBuilderSupportTest extends GroovyTestCase {
         b.exp(5)
         assert val == 8
 
-        // symbols in the method closure shold also resolve to the builder...
+        // symbols in the method closure should also resolve to the builder...
         b.registerExplicitMethod ('exp2', {exp(it)})
 
         assert b.exp2(-2) == 6
@@ -535,7 +535,7 @@ class FactoryBuilderSupportTest extends GroovyTestCase {
             withBuilder(c){
                fooz(){
                   baz()
-               }   
+               }
             }
         }
         assert b.@log == [
@@ -587,7 +587,7 @@ class FactoryBuilderSupportTest extends GroovyTestCase {
             withBuilder(c,'foo'){
                fooz(){
                   baz()
-               }   
+               }
             }
         }
 
@@ -646,7 +646,7 @@ class FactoryBuilderSupportTest extends GroovyTestCase {
             withBuilder(c,'foo',bar:'baz'){
                fooz(){
                   baz()
-               }   
+               }
             }
         }
 
@@ -723,7 +723,7 @@ class FactoryBuilderSupportTest extends GroovyTestCase {
                 'post_node_completion', 'x', 'x'/*,
             'node_completed',null,'x',
             'post_node_completion',null, 'x'*/
-                // node foo() was not completed successfuly
+                // node foo() was not completed successfully
         ]
         assert c.@log == [
                 'register', 'outest', 'Layers',
@@ -910,7 +910,7 @@ class XFactory extends AbstractFactory {
         builder.@log << 'handle_node_attributes'
         builder.@log << node
         attributes.each{entry -> builder.@log << entry.key; builder.@log << entry.value}
-        return false 
+        return false
     }
 
     public void onNodeCompleted( FactoryBuilderSupport builder, Object parent, Object node ) {
diff --git a/src/test/groovy/util/ProxyTest.groovy b/src/test/groovy/util/ProxyTest.groovy
index 05fcc8ef60..9426f6ca28 100644
--- a/src/test/groovy/util/ProxyTest.groovy
+++ b/src/test/groovy/util/ProxyTest.groovy
@@ -29,9 +29,9 @@ class ProxyTest extends GroovyTestCase {
         assertSame original, proxy.adaptee
         // method, that is only known on adaptee is relayed through the proxy
         assertEquals original.size(), proxy.size()
-        // method, that is availabe in both objects should come from proxy
+        // method, that is available in both objects should come from proxy
         assertEquals 0, proxy.length()
-        // method, that is availabe in both objects
+        // method, that is available in both objects
         // but should come from adaptee needs explicit relay
         assertEquals original, proxy.toString()
         // method from decorator, that is not in adaptee
@@ -48,25 +48,25 @@ class ProxyTest extends GroovyTestCase {
 
   void testProxyCollect ( ) {
     def collection = [ 1 , 2 , 3 ]
-    def proxy = ( new Proxy ( ) ).wrap ( collection ) 
+    def proxy = ( new Proxy ( ) ).wrap ( collection )
     assertEquals ( [ 2 , 3 , 4 ] , proxy.collect { it + 1 } )
   }
 
   void testProxyAny ( ) {
     def collection = [ 1 , 2 , 3 ]
-    def proxy = ( new Proxy ( ) ).wrap ( collection ) 
+    def proxy = ( new Proxy ( ) ).wrap ( collection )
     assertEquals ( true , proxy.any { it == 2 } )
   }
 
   void testProxyFind ( ) {
     def collection = [ 1 , 2 , 3 ]
-    def proxy = ( new Proxy ( ) ).wrap ( collection ) 
+    def proxy = ( new Proxy ( ) ).wrap ( collection )
     assertEquals ( 2 , proxy.find { it == 2 } )
   }
 
   void testProxyEach ( ) {
     def collection = [ 1 , 2 , 3 ]
-    def proxy = ( new Proxy ( ) ).wrap ( collection ) 
+    def proxy = ( new Proxy ( ) ).wrap ( collection )
     def testString = ''
     proxy.each { testString += it }
     assertEquals ( '123' , testString )
diff --git a/src/test/org/apache/groovy/parser/antlr4/util/ASTComparatorCategory.groovy b/src/test/org/apache/groovy/parser/antlr4/util/ASTComparatorCategory.groovy
index 129da6a9a7..1248e865de 100644
--- a/src/test/org/apache/groovy/parser/antlr4/util/ASTComparatorCategory.groovy
+++ b/src/test/org/apache/groovy/parser/antlr4/util/ASTComparatorCategory.groovy
@@ -210,7 +210,7 @@ class ASTComparatorCategory {
 
     /**
      * Main method that makes the magic. Compares all properties for object a and object b.
-     * There is a lot of problems in this code, like omitted class checking and so on. Just belive, it will be used properly.
+     * There is a lot of problems in this code, like omitted class checking and so on. Just believe it will be used properly.
      * @param a
      * @param b
      * @return
@@ -280,7 +280,7 @@ class ASTComparatorCategory {
     }
 
     ////////////////////////////////////////////////////////////////////////////////////////////////////
-    // Just a bunch of copypasted methods. Maybe will wrote AST transformation for them.
+    // Just a bunch of copy-pasted methods. Maybe will wrote AST transformation for them.
     ////////////////////////////////////////////////////////////////////////////////////////////////////
 
     static equals(ClassNode a, ClassNode b) {
diff --git a/src/test/org/codehaus/groovy/classgen/DumpingClassLoader.java b/src/test/org/codehaus/groovy/classgen/DumpingClassLoader.java
index 980a698c39..737da00332 100644
--- a/src/test/org/codehaus/groovy/classgen/DumpingClassLoader.java
+++ b/src/test/org/codehaus/groovy/classgen/DumpingClassLoader.java
@@ -55,7 +55,7 @@ public class DumpingClassLoader extends GroovyClassLoader implements Opcodes {
         }
 
         public void call(ClassVisitor classWriter, ClassNode classNode) {
-            // lets test out the class verifier
+            // let's test out the class verifier
             if (DUMP_CLASS) {
                 dumper.visitClass(classNode);
             }
diff --git a/src/test/org/codehaus/groovy/reflection/utils/ReflectionUtilsTest.groovy b/src/test/org/codehaus/groovy/reflection/utils/ReflectionUtilsTest.groovy
index 3f675abafd..0cb0064de2 100644
--- a/src/test/org/codehaus/groovy/reflection/utils/ReflectionUtilsTest.groovy
+++ b/src/test/org/codehaus/groovy/reflection/utils/ReflectionUtilsTest.groovy
@@ -21,7 +21,7 @@ package org.codehaus.groovy.reflection.utils
 import groovy.test.GroovyTestCase
 import org.codehaus.groovy.reflection.ReflectionUtils
 
-// note, this must be in a package other than org.codehause.groovy.reflection or else
+// note, this must be in a package other than org.codehaus.groovy.reflection or else
 // the tests will incorrectly miss the target
 
 class ReflectionUtilsTest extends GroovyTestCase {
@@ -89,4 +89,4 @@ class PogoCalleTestClass {
     public Class instanceCaller() {
         return ReflectionUtils.getCallingClass()
     }
-}
\ No newline at end of file
+}
diff --git a/src/test/org/codehaus/groovy/runtime/CustomBooleanCoercionTest.groovy b/src/test/org/codehaus/groovy/runtime/CustomBooleanCoercionTest.groovy
index c34ba8f1ff..bbda753125 100644
--- a/src/test/org/codehaus/groovy/runtime/CustomBooleanCoercionTest.groovy
+++ b/src/test/org/codehaus/groovy/runtime/CustomBooleanCoercionTest.groovy
@@ -118,7 +118,7 @@ class CustomBooleanCoercionTest extends GroovyTestCase {
     }
 }
 
-/** A Predicate classe coercible to a boolea expression */
+/** A Predicate classe coercible to a boolean expression */
 class Predicate {
     boolean value
     boolean asBoolean() { value }
@@ -129,4 +129,4 @@ class BoolCategory {
     static boolean asBoolean(Predicate self) {
         !self.value
     }
-}
\ No newline at end of file
+}
diff --git a/src/test/org/codehaus/groovy/runtime/MethodRankHelperTest.java b/src/test/org/codehaus/groovy/runtime/MethodRankHelperTest.java
index e1722f847a..c0611f1b7d 100644
--- a/src/test/org/codehaus/groovy/runtime/MethodRankHelperTest.java
+++ b/src/test/org/codehaus/groovy/runtime/MethodRankHelperTest.java
@@ -76,7 +76,7 @@ public class MethodRankHelperTest extends TestCase {
     }
 
     /**
-     * turns a int array to a Integer array
+     * turns an int array to an Integer array
      */
     private Integer[] box(int[] ia) {
         Integer[] ret = new Integer[ia.length];
@@ -159,4 +159,4 @@ public class MethodRankHelperTest extends TestCase {
     public void testGetConstructorSuggestionString() {
         assertEquals("No suggestion", 0, MethodRankHelper.getConstructorSuggestionString(TempClass.class, new Object[]{null, null, null, null, null}).length());
     }
-}
\ No newline at end of file
+}
diff --git a/src/test/org/codehaus/groovy/tools/stubgenerator/Groovy7966.groovy b/src/test/org/codehaus/groovy/tools/stubgenerator/Groovy7966.groovy
index 93a50340f2..0ef1495bfa 100644
--- a/src/test/org/codehaus/groovy/tools/stubgenerator/Groovy7966.groovy
+++ b/src/test/org/codehaus/groovy/tools/stubgenerator/Groovy7966.groovy
@@ -19,7 +19,7 @@
 package org.codehaus.groovy.tools.stubgenerator
 
 /**
- * Test that fileorder doesn't impact whether GroovyObject appears in implements list.
+ * Test that file order doesn't impact whether GroovyObject appears in implements list.
  */
 final class Groovy7966 extends StringSourcesStubTestCase {
 


[groovy] 09/09: Ignore Vscode & Fleet folders

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 1e7573ef14635c0f9fc8e7a476833f66230ad9d0
Author: Goooler <wa...@gmail.com>
AuthorDate: Wed Oct 19 10:24:55 2022 +0800

    Ignore Vscode & Fleet folders
---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.gitignore b/.gitignore
index 3516d1ee8d..ef4ddff8c2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,9 @@ out/
 *.iws
 .shelf
 
+.fleet
+
+.vscode
 .settings/
 .classpath
 .project


[groovy] 01/09: Polish org.codehaus.groovy.classgen package documentation

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 1288928c6792dfaab135fb0bc2beac1593dc63d4
Author: Marc Wrobel <ma...@gmail.com>
AuthorDate: Tue Oct 18 14:28:38 2022 +0200

    Polish org.codehaus.groovy.classgen package documentation
    
    Fix typos and improve documentation (javadoc, comments) in the org.codehaus.groovy.classgen package.
    
    Note that the following words / expressions were preferred :
    
    - meta data -> metadata (incorrect, see https://www.merriam-webster.com/dictionary/metadata),
    - meta class -> metaclass (incorrect, see https://en.wikipedia.org/wiki/Metaclass).
    
    Trailing whitespaces were also removed in the process.
---
 .../groovy/classgen/ClassCompletionVerifier.java         |  2 +-
 .../codehaus/groovy/classgen/FinalVariableAnalyzer.java  |  2 +-
 src/main/java/org/codehaus/groovy/classgen/Verifier.java |  4 ++--
 .../groovy/classgen/asm/BinaryExpressionHelper.java      |  2 +-
 .../asm/BinaryExpressionMultiTypeDispatcher.java         |  2 +-
 .../groovy/classgen/asm/BinaryIntExpressionHelper.java   | 16 ++++++++--------
 .../groovy/classgen/asm/BinaryLongExpressionHelper.java  |  6 +++---
 .../org/codehaus/groovy/classgen/asm/BytecodeDumper.java |  2 +-
 .../org/codehaus/groovy/classgen/asm/BytecodeHelper.java |  2 +-
 .../org/codehaus/groovy/classgen/asm/CallSiteWriter.java |  2 +-
 .../org/codehaus/groovy/classgen/asm/CompileStack.java   |  8 ++++----
 .../codehaus/groovy/classgen/asm/InvocationWriter.java   |  2 +-
 .../groovy/classgen/asm/OptimizingStatementWriter.java   |  6 +++---
 .../groovy/classgen/asm/WriterControllerFactory.java     |  2 +-
 .../groovy/classgen/asm/sc/StaticInvocationWriter.java   |  2 +-
 .../sc/StaticTypesMethodReferenceExpressionWriter.java   |  2 +-
 16 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/classgen/ClassCompletionVerifier.java b/src/main/java/org/codehaus/groovy/classgen/ClassCompletionVerifier.java
index f2d31589b3..f5ad9e825f 100644
--- a/src/main/java/org/codehaus/groovy/classgen/ClassCompletionVerifier.java
+++ b/src/main/java/org/codehaus/groovy/classgen/ClassCompletionVerifier.java
@@ -674,7 +674,7 @@ public class ClassCompletionVerifier extends ClassCodeVisitorSupport {
 
             /*
              *  if it is static final but not accessed inside a static constructor, or,
-             *  if it is an instance final but not accessed inside a instance constructor, it is an error
+             *  if it is an instance final but not accessed inside an instance constructor, it is an error
              */
             boolean isFinal = fn.isFinal();
             boolean isStatic = fn.isStatic();
diff --git a/src/main/java/org/codehaus/groovy/classgen/FinalVariableAnalyzer.java b/src/main/java/org/codehaus/groovy/classgen/FinalVariableAnalyzer.java
index 907182ebea..bc92c77c2b 100644
--- a/src/main/java/org/codehaus/groovy/classgen/FinalVariableAnalyzer.java
+++ b/src/main/java/org/codehaus/groovy/classgen/FinalVariableAnalyzer.java
@@ -531,7 +531,7 @@ public class FinalVariableAnalyzer extends ClassCodeVisitorSupport {
 
     public interface VariableNotFinalCallback {
         /**
-         * Callback called whenever an assignment transforms an effectively final variable into a non final variable
+         * Callback called whenever an assignment transforms an effectively final variable into a non-final variable
          * (aka, breaks the "final" modifier contract)
          *
          * @param var  the variable detected as not final
diff --git a/src/main/java/org/codehaus/groovy/classgen/Verifier.java b/src/main/java/org/codehaus/groovy/classgen/Verifier.java
index d29925b789..f431ea8403 100644
--- a/src/main/java/org/codehaus/groovy/classgen/Verifier.java
+++ b/src/main/java/org/codehaus/groovy/classgen/Verifier.java
@@ -573,7 +573,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
                     @Override
                     public void visit(final MethodVisitor mv) {
                         /*
-                         * the code is (meta class is stored in 1):
+                         * the code is (metaclass is stored in 1):
                          * this.metaClass = <1>
                          */
                         mv.visitVarInsn(ALOAD, 0);
@@ -1672,7 +1672,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
     }
 
     /**
-     * When constant expressions are created, the value is always wrapped to a non primitive type.
+     * When constant expressions are created, the value is always wrapped to a non-primitive type.
      * Some constant expressions are optimized to return primitive types, but not all primitives are
      * handled. This method guarantees to return a similar constant expression but with a primitive type
      * instead of a boxed type.
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/BinaryExpressionHelper.java b/src/main/java/org/codehaus/groovy/classgen/asm/BinaryExpressionHelper.java
index e5810243ea..fa425da144 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/BinaryExpressionHelper.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/BinaryExpressionHelper.java
@@ -840,7 +840,7 @@ public class BinaryExpressionHelper {
         // jump depending on the value. For true we are done, for false we
         // have to load y, thus we first remove x and then load y.
         // But since x and y may have different stack lengths, this cannot work
-        // Thus we have to have to do the following:
+        // Thus we have to do the following:
         // Be X the type of x, Y the type of y and S the common supertype of
         // X and Y, then we have to see x?:y as
         //      var t=x;boolean(t)?S(t):S(y)
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/BinaryExpressionMultiTypeDispatcher.java b/src/main/java/org/codehaus/groovy/classgen/asm/BinaryExpressionMultiTypeDispatcher.java
index d00bab2c20..2dff533249 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/BinaryExpressionMultiTypeDispatcher.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/BinaryExpressionMultiTypeDispatcher.java
@@ -397,7 +397,7 @@ public class BinaryExpressionMultiTypeDispatcher extends BinaryExpressionHelper
             // store value in array
             bew.arraySet(false);
 
-            // load return value && correct operand stack stack
+            // load return value && correct operand stack
             operandStack.remove(3);
             rhsValueLoader.visit(acg);
         } else {
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/BinaryIntExpressionHelper.java b/src/main/java/org/codehaus/groovy/classgen/asm/BinaryIntExpressionHelper.java
index 731dd3ac74..19307d287f 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/BinaryIntExpressionHelper.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/BinaryIntExpressionHelper.java
@@ -57,7 +57,7 @@ public class BinaryIntExpressionHelper extends BinaryExpressionWriter {
 
     private static final int[] stdCompareCodes = {
         IF_ICMPEQ,      // COMPARE_NOT_EQUAL            120
-        IF_ICMPNE,      // COMPARE_IDENTICAL            121 
+        IF_ICMPNE,      // COMPARE_IDENTICAL            121
         IF_ICMPEQ,      // COMPARE_NOT_IDENTICAL        122
         IF_ICMPNE,      // COMPARE_EQUAL                123
         IF_ICMPGE,      // COMPARE_LESS_THAN            124
@@ -78,10 +78,10 @@ public class BinaryIntExpressionHelper extends BinaryExpressionWriter {
     private static final int[] bitOp = {
         IOR,            //  BITWISE_OR / PIPE   340
         IAND,           //  BITWISE_AND         341
-        IXOR,           //  BIWISE_XOR          342
-    };    
+        IXOR,           //  BITWISE_XOR         342
+    };
 
-    /* unhandled types from from org.codehaus.groovy.syntax.Types
+    /* unhandled types from org.codehaus.groovy.syntax.Types
     public static final int LOGICAL_OR                  = 162;   // ||
     public static final int LOGICAL_AND                 = 164;   // &&
 
@@ -137,7 +137,7 @@ public class BinaryIntExpressionHelper extends BinaryExpressionWriter {
 
 
     /**
-     * writes a std compare. This involves the tokens IF_ICMPEQ, IF_ICMPNE, 
+     * writes a std compare. This involves the tokens IF_ICMPEQ, IF_ICMPNE,
      * IF_ICMPEQ, IF_ICMPNE, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE and IF_ICMPLT
      * @param type the token type
      * @return true if a successful std compare write
@@ -174,7 +174,7 @@ public class BinaryIntExpressionHelper extends BinaryExpressionWriter {
     @Override
     protected boolean writeSpaceship(int type, boolean simulate) {
         if (type != COMPARE_TO) return false;
-        /*  
+        /*
            we will actually do
 
           (x < y) ? -1 : ((x == y) ? 0 : 1)
@@ -200,7 +200,7 @@ public class BinaryIntExpressionHelper extends BinaryExpressionWriter {
           to load them again, we will instead duplicate them. This will
           require some pop actions in the branches!
 
-              DUP2          (operands: IIII) 
+              DUP2          (operands: IIII)
               IF_ICMPGE L1  (operands: II)
               ICONST_M1     (operands: III)
               GOTO L2
@@ -212,7 +212,7 @@ public class BinaryIntExpressionHelper extends BinaryExpressionWriter {
           L3
               - jump from L1 branch to here (operands: -)
               ICONST_1      (operands: I)
-          L2  
+          L2
           - if jump from GOTO L2 we have III, but need only I
           - if from L3 branch we get only I
 
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/BinaryLongExpressionHelper.java b/src/main/java/org/codehaus/groovy/classgen/asm/BinaryLongExpressionHelper.java
index aef72e8626..2a14c0e65e 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/BinaryLongExpressionHelper.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/BinaryLongExpressionHelper.java
@@ -61,7 +61,7 @@ public class BinaryLongExpressionHelper extends BinaryExpressionWriter {
             DUP2_X1
             DUP2_X1
             POP2
-            DUP2_X1          
+            DUP2_X1
          */
         mv.visitInsn(DUP2_X1);
         mv.visitInsn(POP2);
@@ -77,14 +77,14 @@ public class BinaryLongExpressionHelper extends BinaryExpressionWriter {
         mv.visitInsn(POP2);
     }
 
-    private static final MethodCaller 
+    private static final MethodCaller
         longArrayGet = MethodCaller.newStatic(BytecodeInterface8.class, "lArrayGet"),
         longArraySet = MethodCaller.newStatic(BytecodeInterface8.class, "lArraySet");
 
     private static final int[] bitOp = {
         LOR,            //  BITWISE_OR / PIPE   340
         LAND,           //  BITWISE_AND         341
-        LXOR,           //  BIWISE_XOR          342
+        LXOR,           //  BITWISE_XOR         342
     };
 
     @Override
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/BytecodeDumper.java b/src/main/java/org/codehaus/groovy/classgen/asm/BytecodeDumper.java
index 86359e6626..bae8feea33 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/BytecodeDumper.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/BytecodeDumper.java
@@ -26,7 +26,7 @@ import java.io.PrintWriter;
 import java.io.Writer;
 
 /**
- * An utility class which can be used in test cases to dump generated bytecode.
+ * A utility class which can be used in test cases to dump generated bytecode.
  *
  * @since 2.4.0
  */
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/BytecodeHelper.java b/src/main/java/org/codehaus/groovy/classgen/asm/BytecodeHelper.java
index 10c2ccc703..baf54fa405 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/BytecodeHelper.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/BytecodeHelper.java
@@ -611,7 +611,7 @@ public class BytecodeHelper {
     public static boolean isClassLiteralPossible(ClassNode classNode) {
         // the current implementation only checks for public modifier, because Groovy used to allow
         // handles on classes even if they are package protected and not in the same package.
-        // There are situations where we could make more fine grained checks, but be careful of
+        // There are situations where we could make more fine-grained checks, but be careful of
         // potential breakage of existing code.
         return Modifier.isPublic(classNode.getModifiers());
     }
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/CallSiteWriter.java b/src/main/java/org/codehaus/groovy/classgen/asm/CallSiteWriter.java
index 6a5b797e36..5d49885fed 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/CallSiteWriter.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/CallSiteWriter.java
@@ -64,7 +64,7 @@ import static org.objectweb.asm.Opcodes.PUTSTATIC;
 import static org.objectweb.asm.Opcodes.RETURN;
 
 /**
- * This class represents non public API used by AsmClassGenerator. Don't
+ * This class represents non-public API used by AsmClassGenerator. Don't
  * use this class in your code
  */
 public class CallSiteWriter {
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/CompileStack.java b/src/main/java/org/codehaus/groovy/classgen/asm/CompileStack.java
index 64a8ce05a3..4f5d16b1b9 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/CompileStack.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/CompileStack.java
@@ -436,7 +436,7 @@ public class CompileStack {
     /**
      * Causes the state-stack to add an element and sets
      * the given scope as new current variable scope. Creates
-     * a element for the state stack so pop has to be called later
+     * an element for the state stack so pop has to be called later
      */
     public void pushVariableScope(final VariableScope scope) {
         pushState();
@@ -464,7 +464,7 @@ public class CompileStack {
     /**
      * Should be called when descending into a loop that defines
      * also a scope. Calls pushVariableScope and prepares labels
-     * for a loop structure. Creates a element for the state stack
+     * for a loop structure. Creates an element for the state stack
      * so pop has to be called later
      */
     public void pushLoop(final VariableScope el, final List<String> labelNames) {
@@ -497,7 +497,7 @@ public class CompileStack {
 
     /**
      * Should be called when descending into a loop that does
-     * not define a scope. Creates a element for the state stack
+     * not define a scope. Creates an element for the state stack
      * so pop has to be called later
      */
     public void pushLoop(final List<String> labelNames) {
@@ -544,7 +544,7 @@ public class CompileStack {
     }
 
     /**
-     * Creates a new break label and a element for the state stack
+     * Creates a new break label and an element for the state stack
      * so pop has to be called later
      */
     public Label pushSwitch() {
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/InvocationWriter.java b/src/main/java/org/codehaus/groovy/classgen/asm/InvocationWriter.java
index 8f9d38a04b..7032a92da1 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/InvocationWriter.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/InvocationWriter.java
@@ -831,7 +831,7 @@ public class InvocationWriter {
     }
 
     /**
-     * Converts sourceType to a non primitive by using Groovy casting.
+     * Converts sourceType to a non-primitive by using Groovy casting.
      * sourceType might be a primitive
      * This might be done using SBA#castToType
      */
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/OptimizingStatementWriter.java b/src/main/java/org/codehaus/groovy/classgen/asm/OptimizingStatementWriter.java
index aa3f9b9667..2b295d98a4 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/OptimizingStatementWriter.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/OptimizingStatementWriter.java
@@ -128,7 +128,7 @@ public class OptimizingStatementWriter extends StatementWriter {
             }
         }
 
-        // meta class check with boolean holder
+        // metaclass check with boolean holder
         MethodNode mn = controller.getMethodNode();
         if (mn != null) {
             mv.visitFieldInsn(GETSTATIC, controller.getInternalClassName(), Verifier.STATIC_METACLASS_BOOL, "Z");
@@ -332,7 +332,7 @@ public class OptimizingStatementWriter extends StatementWriter {
             super.writeExpressionStatement(statement);
         } else {
             StatementMeta meta = statement.getNodeMetaData(StatementMeta.class);
-            // we have to have handle DelcarationExpressions special, since their
+            // we have to have handle DeclarationExpressions special, since their
             // entry should be outside the optimization path, we have to do that of
             // course only if we are actually going to do two different paths,
             // otherwise it is not needed
@@ -777,7 +777,7 @@ public class OptimizingStatementWriter extends StatementWriter {
         public void visitConstructorCallExpression(final ConstructorCallExpression expression) {
             if (expression.getNodeMetaData(StatementMeta.class) != null) return;
             super.visitConstructorCallExpression(expression);
-            // we cannot set a target for the constructor call, since we cannot easily check the meta class of the other class
+            // we cannot set a target for the constructor call, since we cannot easily check the metaclass of the other class
             //setMethodTarget(call, "<init>", call.getArguments(), false);
         }
 
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/WriterControllerFactory.java b/src/main/java/org/codehaus/groovy/classgen/asm/WriterControllerFactory.java
index a98bd44aeb..9d683edc07 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/WriterControllerFactory.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/WriterControllerFactory.java
@@ -19,7 +19,7 @@
 package org.codehaus.groovy.classgen.asm;
 
 /**
- * A non static factory to get alternative writer controller to be stored in the meta data
+ * A non-static factory to get alternative writer controller to be stored in the metadata
  */
 public interface WriterControllerFactory {
     WriterController makeController(WriterController normalController);
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticInvocationWriter.java b/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticInvocationWriter.java
index 2092c16f31..f240f92752 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticInvocationWriter.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticInvocationWriter.java
@@ -737,7 +737,7 @@ public class StaticInvocationWriter extends InvocationWriter {
                     if (isObjectType(declaringClass)) {
                         // checkcast not necessary because Object never evolves
                         // and it prevents a potential ClassCastException if the
-                        // delegate of a closure is changed in a SC closure
+                        // delegate of a closure is changed in an SC closure
                         type = ClassHelper.OBJECT_TYPE;
                     } else if (isObjectType(type)) {
                         // can happen for compiler rewritten code, where type information is missing
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesMethodReferenceExpressionWriter.java b/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesMethodReferenceExpressionWriter.java
index f6319b81ac..c3efd7a793 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesMethodReferenceExpressionWriter.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesMethodReferenceExpressionWriter.java
@@ -145,7 +145,7 @@ public class StaticTypesMethodReferenceExpressionWriter extends MethodReferenceE
             if (isConstructorReference) { // TODO: move this check to the parser
                 addFatalError("Constructor reference must be TypeName::new", methodReferenceExpression);
             } else if (methodRefMethod.isStatic() && !targetIsArgument) {
-                // "string"::valueOf refers to static method, so instance is superflous
+                // "string"::valueOf refers to static method, so instance is superfluous
                 typeOrTargetRef = makeClassTarget(typeOrTargetRefType, typeOrTargetRef);
                 isClassExpression = true;
             } else {


[groovy] 04/09: Polish project documentation

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit ef114c91723d7bac7593569838b9887040965ffc
Author: Marc Wrobel <ma...@gmail.com>
AuthorDate: Tue Oct 18 12:31:54 2022 +0200

    Polish project documentation
    
    Use proper spelling for GitHub and fix a few typos.
---
 CONTRIBUTING.md                |  4 ++--
 README.adoc                    | 10 +++++-----
 subprojects/stress/README.adoc |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b7523baa58..0c21375e8f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -17,6 +17,6 @@ limitations under the License.
 # Contributing
 
 Please visit the
-[project development web site](https://groovy.apache.org/)
+[project development website](https://groovy.apache.org/)
 to find out more about contributing to the project.
-We welcome all contributors.
\ No newline at end of file
+We welcome all contributors.
diff --git a/README.adoc b/README.adoc
index 91ac45a22d..f68a58a8ab 100644
--- a/README.adoc
+++ b/README.adoc
@@ -80,14 +80,14 @@ Apache Groovy uses Git. The official Git repository is at:
 
     https://gitbox.apache.org/repos/asf/groovy.git
 
-And a mirror is hosted on Github:
+And a mirror is hosted on GitHub:
 
     https://github.com/apache/groovy
 
-The Github mirror is read-only and provides convenience to users and developers to explore the code and for the
-community to accept contributions via Github Pull Requests.
+The GitHub mirror is read-only and provides convenience to users and developers to explore the code and for the
+community to accept contributions via GitHub Pull Requests.
 
-Simply `git clone` the repo (or the repo you forked via the github website) and you will have the complete source.
+Simply `git clone` the repo (or the repo you forked via the GitHub website) and you will have the complete source.
 
 === Unpacking the src distribution
 
@@ -100,7 +100,7 @@ use it to execute one bootstrap step.
 ==== Bootstrapping Gradle
 
 As mentioned in the previous paragraph, if you download the source distribution
-you need to bootstrap Gradle. This isn't needed if you clone from the Github repo.
+you need to bootstrap Gradle. This isn't needed if you clone from the GitHub repo.
 
 Each version of Groovy is built and tested using a specific version of Gradle.
 That version is specified by the `gradle_version` property defined in the `gradle.properties`
diff --git a/subprojects/stress/README.adoc b/subprojects/stress/README.adoc
index 745b837716..7b70c951d0 100644
--- a/subprojects/stress/README.adoc
+++ b/subprojects/stress/README.adoc
@@ -25,7 +25,7 @@ Tests in this subproject are used for stress testing.  These types of tests
 will normally involve calls to `System.gc()`, spinning up many threads, and
 may attempt to create OutOfMemory errors.
 
-These tests can be long running and may be prone to failure on different
+These tests can be long-running and may be prone to failure on different
 platforms, so in order to run these tests you must enable them as follows:
 
     ./gradlew -PstressTests :stress:test


[groovy] 06/09: Fix minor typos in subprojects spec documentations

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 8289ffdd93925d99965e03864c41e3f3c3b2f83b
Author: Marc Wrobel <ma...@gmail.com>
AuthorDate: Tue Oct 18 12:48:11 2022 +0200

    Fix minor typos in subprojects spec documentations
    
    A few trailing whitespaces were removed in the process.
---
 subprojects/groovy-binary/src/spec/doc/index.adoc  |  6 ++---
 .../src/spec/doc/groovy-console.adoc               |  4 ++--
 .../groovy-ginq/src/spec/doc/ginq-userguide.adoc   |  2 +-
 .../groovy-groovysh/src/spec/doc/groovysh.adoc     |  6 ++---
 subprojects/groovy-jmx/src/spec/doc/jmx.adoc       |  8 +++----
 .../src/spec/doc/_integrating-jsr223.adoc          |  2 +-
 .../src/spec/doc/servlet-userguide.adoc            |  4 ++--
 .../groovy-swing/src/spec/doc/_swing-builder.adoc  |  6 ++---
 .../groovy-xml/src/spec/doc/xml-userguide.adoc     | 26 +++++++++++-----------
 9 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/subprojects/groovy-binary/src/spec/doc/index.adoc b/subprojects/groovy-binary/src/spec/doc/index.adoc
index a0ef111e65..b7b695607d 100644
--- a/subprojects/groovy-binary/src/spec/doc/index.adoc
+++ b/subprojects/groovy-binary/src/spec/doc/index.adoc
@@ -140,11 +140,11 @@ Creating Swing UIs is made easy thanks to the use of <<swingbuilder,SwingBuilder
 Security is a complex and multi-faceted issue and needs to be addressed in a holistic way.
 Groovy offers some features to improve security, but organisations
 concerned about security should already be addressing other necessary aspects
-such as network security, file-system security, operating sytem security, database security,
+such as network security, file-system security, operating system security, database security,
 passwords and potentially encryption.
 
 Also, since Groovy runs on the JDK and optionally uses other library dependencies,
-users should ensure their JDK and all depdendencies are up to date with respect to
+users should ensure their JDK and all dependencies are up-to-date with respect to
 the latest security fixes.
 
 With regard to security issues that may affect the Groovy project itself,
@@ -164,7 +164,7 @@ offer some of the same security features as Java programs, including:
 
 Special security support is provided through:
 
-* gapi:groovy.lang.GroovyShell[], gapi:groovy.lang.GroovyClassLoader[] and other parts of the Groovy runtime fully support the Java security manager which allows you to sandbox script execution with a security policy. (Note: this funtionality might be scaled back in future Groovy versions or when running
+* gapi:groovy.lang.GroovyShell[], gapi:groovy.lang.GroovyClassLoader[] and other parts of the Groovy runtime fully support the Java security manager which allows you to sandbox script execution with a security policy. (Note: this functionality might be scaled back in future Groovy versions or when running
 on particular JDK versions in line with https://openjdk.java.net/jeps/411[JEP 411])
 * gapi:org.codehaus.groovy.control.customizers.SecureASTCustomizer[]
 secures source code by controlling what code constructs are permitted or prohibited in a code base
diff --git a/subprojects/groovy-console/src/spec/doc/groovy-console.adoc b/subprojects/groovy-console/src/spec/doc/groovy-console.adoc
index 8bf058aada..1760b2e910 100644
--- a/subprojects/groovy-console/src/spec/doc/groovy-console.adoc
+++ b/subprojects/groovy-console/src/spec/doc/groovy-console.adoc
@@ -97,7 +97,7 @@ blank input area
 [[GroovyConsole-Historyandresults]]
 === History and results
 
-* You can pop-up a gui inspector on the last (non-null) result by
+* You can pop up a gui inspector on the last (non-null) result by
 selecting `Inspect Last` from the `Actions` menu. The inspector is a
 convenient way to view lists and maps.
 * The console remembers the last ten script runs. You can scroll back
@@ -118,7 +118,7 @@ find yourself running a script multiple times until it works the way you want
 it to. However, what if your code takes too long to finish or worse, creates
 an infinite loop? Interrupting script execution can be achieved by clicking
 the `interrupt` button on the small dialog box that pops up when a script
-is executing or through the `interrupt` icon in the tool bar.
+is executing or through the `interrupt` icon in the toolbar.
 
 image:{reldir_console}/assets/img/gconsole-toolbar.png[Toolbar]
 
diff --git a/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc b/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc
index 6138cc9519..4dfa3546a0 100644
--- a/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc
+++ b/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc
@@ -163,7 +163,7 @@ Also, it could be referenced by its index, e.g. `r[0]`
 include::../test/org/apache/groovy/ginq/GinqTest.groovy[tags=ginq_projection_01,indent=0]
 ----
 [NOTE]
-`select P1, P2, ..., Pn` is a simplifed syntax of `select new NamedRecord(P1, P2, ..., Pn)` when and only when `n` >= 2.
+`select P1, P2, ..., Pn` is a simplified syntax of `select new NamedRecord(P1, P2, ..., Pn)` when and only when `n` >= 2.
 Also, `NamedRecord` instance will be created if `as` clause is used.
 The values stored in the `NamedRecord` could be referenced by their names.
 
diff --git a/subprojects/groovy-groovysh/src/spec/doc/groovysh.adoc b/subprojects/groovy-groovysh/src/spec/doc/groovysh.adoc
index 39412ab5ac..200412d6c1 100644
--- a/subprojects/groovy-groovysh/src/spec/doc/groovysh.adoc
+++ b/subprojects/groovy-groovysh/src/spec/doc/groovysh.adoc
@@ -416,7 +416,7 @@ Set or list preferences.
 [[GroovyShell-Preferences]]
 === Preferences
 
-Some of aspects of `groovysh` behaviors can be customized by setting
+Some aspects of `groovysh` behaviors can be customized by setting
 preferences. Preferences are set using the `set` command or the `:=`
 shortcut.
 
@@ -480,7 +480,7 @@ Configures the editor used by the `edit` command.
 
 Default is the value of the system environment variable `EDITOR`.
 
-Mac OS XTo use TextEdit, the default text editor on Mac OS X, configure:
+To use TextEdit, the default text editor on macOS, configure:
 set editor /Applications/TextEdit.app/Contents/MacOS/TextEdit
 
 [[GroovyShell-SettingaPreference]]
@@ -499,7 +499,7 @@ To list the current _set_ preferences (and their values):
 groovy:000> :show preferences
 ----------------
 
-Limitation: At the moment, there is no way to list all of the
+Limitation: At the moment, there is no way to list all the
 known/available preferences to be set.
 
 [[GroovyShell-ClearingPreferencesieResettingtoDefaults]]
diff --git a/subprojects/groovy-jmx/src/spec/doc/jmx.adoc b/subprojects/groovy-jmx/src/spec/doc/jmx.adoc
index 7bc5395bfb..df1fe88fb3 100644
--- a/subprojects/groovy-jmx/src/spec/doc/jmx.adoc
+++ b/subprojects/groovy-jmx/src/spec/doc/jmx.adoc
@@ -628,7 +628,7 @@ image:{reldir_jmx}/assets/img/jconsole-implicit-export.png[]
 
 ==== JmxBuilder.bean() Syntax
 
-The JmxBuilder.bean() node supports an extensive set of descriptors to describe your bean for management. The JMX MBeanServer uses these descriptors to expose meta data about the bean exposed for management.
+The JmxBuilder.bean() node supports an extensive set of descriptors to describe your bean for management. The JMX MBeanServer uses these descriptors to expose metadata about the bean exposed for management.
 
 ----
 jmx.export {
@@ -800,7 +800,7 @@ In the snippet above, the **builder will only export methods start() and stop()*
 
 ==== Export Operations by Signature
 
-Using JmxBuilder, you can target methods to export for management using the methods's parameter signature. This is useful when you want to distinguish methods with the same name that you want to export (i.e. stop() instead of stop(boolean)).
+Using JmxBuilder, you can target methods to export for management using the methods' parameter signature. This is useful when you want to distinguish methods with the same name that you want to export (i.e. stop() instead of stop(boolean)).
 
 [source,groovy]
 ----
@@ -818,7 +818,7 @@ JmxBuilder supports detailed descriptors for bean operations. You can supply dee
 include::../test/JmxTest.groovy[tags=export_operations_with_explicit_descriptors,indent=0]
 ----
 
-The snippet above shows all of the ways JmxBuilder allows you to describe an operation targeted for management:
+The snippet above shows all the ways JmxBuilder allows you to describe an operation targeted for management:
 
 - Operations **start() and stop()** are described by the "desc" key (this is enough since there are no params).
 - In operation **setResource()** uses of a shorthand version of **params**: to describe the parameters for the method.
@@ -1015,7 +1015,7 @@ Here is an example of JmxBuilder's listener node:
 include::../test/JmxTest.groovy[tags=jmxbuilders_listener,indent=0]
 ----
 
-This example shows how you can use a stand alone listener (outside of an MBean export). Here, we **export a timer with a 1 second** resolution. Then, we specify a listener to that timer that will print "beep" every second.
+This example shows how you can use a stand-alone listener (outside an MBean export). Here, we **export a timer with a 1 second** resolution. Then, we specify a listener to that timer that will print "beep" every second.
 
 === Emitting JMX Events
 
diff --git a/subprojects/groovy-jsr223/src/spec/doc/_integrating-jsr223.adoc b/subprojects/groovy-jsr223/src/spec/doc/_integrating-jsr223.adoc
index 2faf0339dc..69a6757804 100644
--- a/subprojects/groovy-jsr223/src/spec/doc/_integrating-jsr223.adoc
+++ b/subprojects/groovy-jsr223/src/spec/doc/_integrating-jsr223.adoc
@@ -60,7 +60,7 @@ include::../test/JSR223SpecTest.java[tags=jsr223_invocable,indent=0]
 -------------------------------------------------------------------------------
 
 The engine keeps per default hard references to the script functions. To
-change this you should set a engine level scoped attribute to the script
+change this you should set an engine level scoped attribute to the script
 context of the name `#jsr223.groovy.engine.keep.globals` with a
 String being `phantom` to use phantom references, `weak` to use weak
 references or `soft` to use soft references - casing is ignored. Any
diff --git a/subprojects/groovy-servlet/src/spec/doc/servlet-userguide.adoc b/subprojects/groovy-servlet/src/spec/doc/servlet-userguide.adoc
index e2fe27198d..d759a1268b 100644
--- a/subprojects/groovy-servlet/src/spec/doc/servlet-userguide.adoc
+++ b/subprojects/groovy-servlet/src/spec/doc/servlet-userguide.adoc
@@ -65,7 +65,7 @@ The following variables are ready for use in Groovlets:
 1. The session variable is only set, if there was already a session object. See the `if (session == null)` checks in the examples above.
 2. These variables cannot be re-assigned inside a `Groovlet`. They are bound on first access, allowing to e.g. calling methods on the `response` object before using `out`.
 
-== Setting up groovylets
+== Setting up groovlets
 
 Add the following to your `web.xml`:
 [source,xml]
@@ -91,4 +91,4 @@ So for example using tomcat you could edit `tomcat/conf/server.xml` like this:
 <Context path="/groovy" docBase="c:/groovy-servlet"/>
 --------------------------------------------------------------------------------------------------
 
-Then access it with http://localhost:8080/groovy/hello.groovy
\ No newline at end of file
+Then access it with http://localhost:8080/groovy/hello.groovy
diff --git a/subprojects/groovy-swing/src/spec/doc/_swing-builder.adoc b/subprojects/groovy-swing/src/spec/doc/_swing-builder.adoc
index e202d143dc..6b78093917 100644
--- a/subprojects/groovy-swing/src/spec/doc/_swing-builder.adoc
+++ b/subprojects/groovy-swing/src/spec/doc/_swing-builder.adoc
@@ -30,7 +30,7 @@ endif::[]
 
 `SwingBuilder` allows you to create full-fledged Swing GUIs in a declarative and concise fashion. It accomplishes this by employing a common idiom in Groovy, builders.
 Builders handle the busywork of creating complex objects for you, such as instantiating children, calling Swing methods, and attaching these children to their parents.
-As a consequence, your code is much more readable and maintainable, while still allowing you access to the full range of Swing components.
+As a consequence, your code is much more readable and maintainable, while still allowing you to access to the full range of Swing components.
 
 Here's a simple example of using `SwingBuilder`:
 
@@ -46,7 +46,7 @@ image:{reldir_swing}/assets/img/SwingBuilder001.png[]
 This hierarchy of components would normally be created through a series of repetitive instantiations, setters, and finally attaching this child to its respective parent.
 Using `SwingBuilder`, however, allows you to define this hierarchy in its native form, which makes the interface design understandable simply by reading the code.
 
-The flexibility shown here is made possible by leveraging the many programming features built-in to Groovy, such as closures, implicit constructor calling, import aliasing, and string interpolation. 
+The flexibility shown here is made possible by leveraging the many programming features built-in to Groovy, such as closures, implicit constructor calling, import aliasing, and string interpolation.
 Of course, these do not have to be fully understood in order to use `SwingBuilder`; as you can see from the code above, their uses are intuitive.
 
 Here is a slightly more involved example, with an example of `SwingBuilder` code re-use via a closure.
@@ -63,4 +63,4 @@ Here's another variation that relies on observable beans and binding:
 include::../test/SwingBuilderTest.groovy[tags=observable_binding_example,indent=0]
 ----
 
-<<{...@Bindable>> is one of the core AST Transformations. It generates all the required boilerplate code to turn a simple bean into an observable one. The `bind()` node creates appropriate `PropertyChangeListeners` that will update the interested parties whenever a `PropertyChangeEvent` is fired.
\ No newline at end of file
+<<{...@Bindable>> is one of the core AST Transformations. It generates all the required boilerplate code to turn a simple bean into an observable one. The `bind()` node creates appropriate `PropertyChangeListeners` that will update the interested parties whenever a `PropertyChangeEvent` is fired.
diff --git a/subprojects/groovy-xml/src/spec/doc/xml-userguide.adoc b/subprojects/groovy-xml/src/spec/doc/xml-userguide.adoc
index a438eb1717..687598c6a0 100644
--- a/subprojects/groovy-xml/src/spec/doc/xml-userguide.adoc
+++ b/subprojects/groovy-xml/src/spec/doc/xml-userguide.adoc
@@ -32,10 +32,10 @@ one of:
 * `groovy.xml.XmlParser`
 * `groovy.xml.XmlSlurper`
 
-Both have the same approach to parse an xml. Both come with a bunch of
+Both have the same approach to parse an XML. Both come with a bunch of
 overloaded parse methods plus some special methods such as `parseText`,
 parseFile and others. For the next example we will use the `parseText`
-method. It parses a XML `String` and recursively converts it to a list
+method. It parses an XML `String` and recursively converts it to a list
 or map of objects.
 
 [source,groovy]
@@ -98,7 +98,7 @@ frequency.
 === DOMCategory
 
 There is another way of parsing XML documents with Groovy with the
-used of `groovy.xml.dom.DOMCategory` which is a category class which
+use of `groovy.xml.dom.DOMCategory` which is a category class which
 adds GPath style operations to Java's DOM classes.
 
 NOTE: Java has in-built support for DOM processing of XML using classes
@@ -106,7 +106,7 @@ representing the various parts of XML documents, e.g. `Document`,
 `Element`, `NodeList`, `Attr` etc. For more information about these classes,
 refer to the respective JavaDocs.
 
-Having a XML like the following:
+Having an XML like the following:
 
 [source,groovy]
 ----
@@ -167,7 +167,7 @@ get the first book's author's name
 include::../test/UserGuideXmlSlurperTest.groovy[tags=testGettingANodeText,indent=0]
 ----
 
-First we parse the document with `XmlSlurper` and the we have to
+First we parse the document with `XmlSlurper` and then we have to
 consider the returning value as the root of the XML document, so in
 this case is "response".
 
@@ -181,7 +181,7 @@ wanted the text inside that node we should be calling the `text()`
 method.  The `author` node is an instance of `GPathResult` type and
 `text()` a method giving us the content of that node as a String.
 
-When using `GPath` with an xml parsed with `XmlSlurper` we'll have as a
+When using `GPath` with an XML parsed with `XmlSlurper` we'll have as a
 result a `GPathResult` object. `GPathResult` has many other convenient
 methods to convert the text inside a node to any other type such as:
 
@@ -192,12 +192,12 @@ methods to convert the text inside a node to any other type such as:
 
 All these methods try to convert a `String` to the appropriate type.
 
-If we were using a XML parsed with `XmlParser` we could be dealing with
+If we were using an XML parsed with `XmlParser` we could be dealing with
 instances of type `Node`. But still all the actions applied to
 `GPathResult` in these examples could be applied to a Node as
 well. Creators of both parsers took into account `GPath` compatibility.
 
-Next step is to get the some values from a given node's attribute. In the following sample
+Next step is to get some values from a given node's attribute. In the following sample
 we want to get the first book's author's id. We'll be using two different approaches. Let's see the code first:
 
 [source,groovy]
@@ -332,7 +332,7 @@ include::../test/UserGuideMarkupBuilderTest.groovy[tags=testCreateSimpleXml1,ind
 <1> We're creating a reference string to compare against
 <2> The `xmlWriter` instance is used by `MarkupBuilder` to convert the
 xml representation to a String instance eventually
-<3> The `xmlMarkup.movie(...)` call will create a XML node with a tag
+<3> The `xmlMarkup.movie(...)` call will create an XML node with a tag
 called `movie` and with content `the godfather`.
 
 [source,groovy]
@@ -409,7 +409,7 @@ include::../test/UserGuideStreamingMarkupBuilderTest.groovy[tags=testSimpleExamp
 
 <1> Note that `StreamingMarkupBuilder.bind` returns a `Writable`
 instance that may be used to stream the markup to a Writer
-<2> We're capturing the output in a String to parse it again an check
+<2> We're capturing the output in a String to parse it again and check
 the structure of the generated XML with `XmlSlurper`.
 
 === MarkupBuilderHelper
@@ -452,7 +452,7 @@ from within the `bind` method scope when using
 include::../test/UserGuideStreamingMarkupBuilderTest.groovy[tags=testMkp,indent=0]
 ----
 
-<1> If we want to generate a escaped value for the name attribute with
+<1> If we want to generate an escaped value for the name attribute with
 `mkp.yield`
 <2> Checking the values later on with `XmlSlurper`
 
@@ -469,9 +469,9 @@ the following example:
 include::../test/UserGuideMarkupBuilderTest.groovy[tags=testDOMToGroovy,indent=0]
 ----
 
-<1> Creating `DOMToGroovy` instance 
+<1> Creating `DOMToGroovy` instance
 <2> Converts the XML to `MarkupBuilder` calls which are available in the output `StringWriter`
-<3> Using `output` variable to create the whole MarkupBuilder 
+<3> Using `output` variable to create the whole MarkupBuilder
 <4> Back to XML string
 
 == Manipulating XML


[groovy] 08/09: Polish org.codehaus.groovy.ast package documentation

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 456a79a7b8ac0caa578ca3681bbcef3ed393805a
Author: Marc Wrobel <ma...@gmail.com>
AuthorDate: Tue Oct 18 13:58:45 2022 +0200

    Polish org.codehaus.groovy.ast package documentation
    
    Fix typos and improve documentation (javadoc, comments) in the org.codehaus.groovy.ast package.
    
    Note that the following words / expressions were preferred :
    
    - meta data -> metadata (incorrect, see https://www.merriam-webster.com/dictionary/metadata),
    - sub-class -> subclass (more common, see https://www.merriam-webster.com/dictionary/subclass).
    
    Trailing whitespaces were also removed in the process.
---
 src/main/java/org/codehaus/groovy/ast/ASTNode.java |  2 +-
 .../java/org/codehaus/groovy/ast/ClassHelper.java  |  2 +-
 .../java/org/codehaus/groovy/ast/ClassNode.java    |  8 ++---
 .../java/org/codehaus/groovy/ast/CompileUnit.java  |  2 +-
 .../codehaus/groovy/ast/NodeMetaDataHandler.java   | 34 +++++++++++-----------
 .../org/codehaus/groovy/ast/VariableScope.java     |  2 +-
 .../groovy/ast/decompiled/AsmDecompiler.java       |  2 +-
 .../groovy/ast/decompiled/DecompiledClassNode.java |  2 +-
 .../groovy/ast/expr/GStringExpression.java         |  4 +--
 .../groovy/ast/expr/VariableExpression.java        |  4 +--
 .../codehaus/groovy/ast/tools/GeneralUtils.java    |  2 +-
 .../codehaus/groovy/ast/tools/GenericsUtils.java   |  2 +-
 .../groovy/ast/tools/WideningCategories.java       |  8 ++---
 13 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/ast/ASTNode.java b/src/main/java/org/codehaus/groovy/ast/ASTNode.java
index 66ccecf18f..989cc08fb7 100644
--- a/src/main/java/org/codehaus/groovy/ast/ASTNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/ASTNode.java
@@ -104,7 +104,7 @@ public class ASTNode implements NodeMetaDataHandler {
     }
 
     /**
-     * Copies all node meta data from the other node to this one
+     * Copies all node metadata from the other node to this one
      * @param other - the other node
      */
     public void copyNodeMetaData(ASTNode other) {
diff --git a/src/main/java/org/codehaus/groovy/ast/ClassHelper.java b/src/main/java/org/codehaus/groovy/ast/ClassHelper.java
index ab125faa5d..59fde0ee0c 100644
--- a/src/main/java/org/codehaus/groovy/ast/ClassHelper.java
+++ b/src/main/java/org/codehaus/groovy/ast/ClassHelper.java
@@ -229,7 +229,7 @@ public class ClassHelper {
      * A new ClassNode object is only created if the class
      * is not one of the predefined ones
      *
-     * @param c class used to created the ClassNode
+     * @param c class used to create the ClassNode
      * @return ClassNode instance created from the given class
      */
     public static ClassNode make(Class c) {
diff --git a/src/main/java/org/codehaus/groovy/ast/ClassNode.java b/src/main/java/org/codehaus/groovy/ast/ClassNode.java
index 7e828dd2ac..3f71cb520c 100644
--- a/src/main/java/org/codehaus/groovy/ast/ClassNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/ClassNode.java
@@ -180,7 +180,7 @@ public class ClassNode extends AnnotatedNode {
     protected Class clazz;
     // only false when this classNode is constructed from a class
     private volatile boolean lazyInitDone = true;
-    // not null if if the ClassNode is an array
+    // not null if the ClassNode is an array
     private ClassNode componentType;
     // if not null this instance is handled as proxy
     // for the redirect
@@ -831,7 +831,7 @@ public class ClassNode extends AnnotatedNode {
         BlockStatement block = getCodeAsBlock(method);
 
         // while anything inside a static initializer block is appended
-        // we don't want to append in the case we have a initialization
+        // we don't want to append in the case we have an initialization
         // expression of a static field. In that case we want to add
         // before the other statements
         if (!fieldInit) {
@@ -872,7 +872,7 @@ public class ClassNode extends AnnotatedNode {
     }
 
     /**
-     * This methods returns a list of all methods of the given name
+     * This method returns a list of all methods of the given name
      * defined in the current class
      * @return the method list
      * @see #getMethods(String)
@@ -885,7 +885,7 @@ public class ClassNode extends AnnotatedNode {
     }
 
     /**
-     * This methods creates a list of all methods with this name of the
+     * This method creates a list of all methods with this name of the
      * current class and of all super classes
      * @return the methods list
      * @see #getDeclaredMethods(String)
diff --git a/src/main/java/org/codehaus/groovy/ast/CompileUnit.java b/src/main/java/org/codehaus/groovy/ast/CompileUnit.java
index ed856c6560..970dfe2f52 100644
--- a/src/main/java/org/codehaus/groovy/ast/CompileUnit.java
+++ b/src/main/java/org/codehaus/groovy/ast/CompileUnit.java
@@ -195,7 +195,7 @@ public class CompileUnit implements NodeMetaDataHandler {
     /**
      * this method actually does not compile a class. It's only
      * a marker that this type has to be compiled by the CompilationUnit
-     * at the end of a parse step no node should be be left.
+     * at the end of a parse step no node should be left.
      */
     public void addClassNodeToCompile(final ClassNode node, final SourceUnit location) {
         String nodeName = node.getName();
diff --git a/src/main/java/org/codehaus/groovy/ast/NodeMetaDataHandler.java b/src/main/java/org/codehaus/groovy/ast/NodeMetaDataHandler.java
index 57453167fa..95aa7a3a44 100644
--- a/src/main/java/org/codehaus/groovy/ast/NodeMetaDataHandler.java
+++ b/src/main/java/org/codehaus/groovy/ast/NodeMetaDataHandler.java
@@ -31,10 +31,10 @@ import java.util.function.Function;
 @SuppressWarnings({"unchecked", "rawtypes"})
 public interface NodeMetaDataHandler {
     /**
-     * Gets the node meta data.
+     * Gets the node metadata.
      *
-     * @param key the meta data key
-     * @return the node meta data value for this key
+     * @param key the metadata key
+     * @return the node metadata value for this key
      */
     default <T> T getNodeMetaData(Object key) {
         Map metaDataMap = this.getMetaDataMap();
@@ -45,11 +45,11 @@ public interface NodeMetaDataHandler {
     }
 
     /**
-     * Gets the node meta data.
+     * Gets the node metadata.
      *
-     * @param key the meta data key
-     * @param valFn the meta data value supplier
-     * @return the node meta data value for this key
+     * @param key the metadata key
+     * @param valFn the metadata value supplier
+     * @return the node metadata value for this key
      */
     default <T> T getNodeMetaData(Object key, Function<?, ? extends T> valFn) {
         if (key == null) throw new GroovyBugError("Tried to get/set meta data with null key on " + this + ".");
@@ -63,7 +63,7 @@ public interface NodeMetaDataHandler {
     }
 
     /**
-     * Copies all node meta data from the other node to this one
+     * Copies all node metadata from the other node to this one
      *
      * @param other the other node
      */
@@ -82,10 +82,10 @@ public interface NodeMetaDataHandler {
     }
 
     /**
-     * Sets the node meta data.
+     * Sets the node metadata.
      *
-     * @param key   the meta data key
-     * @param value the meta data value
+     * @param key   the metadata key
+     * @param value the metadata value
      * @throws GroovyBugError if key is null or there is already meta
      *                        data under that key
      */
@@ -95,11 +95,11 @@ public interface NodeMetaDataHandler {
     }
 
     /**
-     * Sets the node meta data but allows overwriting values.
+     * Sets the node metadata but allows overwriting values.
      *
-     * @param key   the meta data key
-     * @param value the meta data value
-     * @return the old node meta data value for this key
+     * @param key   the metadata key
+     * @param value the metadata value
+     * @return the old node metadata value for this key
      * @throws GroovyBugError if key is null
      */
     default Object putNodeMetaData(Object key, Object value) {
@@ -114,9 +114,9 @@ public interface NodeMetaDataHandler {
     }
 
     /**
-     * Removes a node meta data entry.
+     * Removes a node metadata entry.
      *
-     * @param key the meta data key
+     * @param key the metadata key
      * @throws GroovyBugError if the key is null
      */
     default void removeNodeMetaData(Object key) {
diff --git a/src/main/java/org/codehaus/groovy/ast/VariableScope.java b/src/main/java/org/codehaus/groovy/ast/VariableScope.java
index 942cfd5ff4..13a1079e04 100644
--- a/src/main/java/org/codehaus/groovy/ast/VariableScope.java
+++ b/src/main/java/org/codehaus/groovy/ast/VariableScope.java
@@ -24,7 +24,7 @@ import java.util.LinkedHashMap;
 import java.util.Map;
 
 /**
- * Records declared and referenced variabes for a given scope.  Helps determine
+ * Records declared and referenced variables for a given scope.  Helps determine
  * variable sharing across closure and method boundaries.
  */
 public class VariableScope {
diff --git a/src/main/java/org/codehaus/groovy/ast/decompiled/AsmDecompiler.java b/src/main/java/org/codehaus/groovy/ast/decompiled/AsmDecompiler.java
index 3a66c08be5..268f034da0 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/AsmDecompiler.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/AsmDecompiler.java
@@ -62,7 +62,7 @@ public abstract class AsmDecompiler {
      * Loads the URL contents and parses them with ASM, producing a {@link ClassStub} object representing the structure of
      * the corresponding class file. Stubs are cached and reused if queried several times with equal URLs.
      *
-     * @param url an URL from a class loader, most likely a file system file or a JAR entry.
+     * @param url a URL from a class loader, most likely a file system file or a JAR entry.
      * @return the class stub
      * @throws IOException if reading from this URL is impossible
      */
diff --git a/src/main/java/org/codehaus/groovy/ast/decompiled/DecompiledClassNode.java b/src/main/java/org/codehaus/groovy/ast/decompiled/DecompiledClassNode.java
index 52d32dc677..e919d090db 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/DecompiledClassNode.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/DecompiledClassNode.java
@@ -54,7 +54,7 @@ public class DecompiledClassNode extends ClassNode {
     /**
      * Handle the case of inner classes returning the correct modifiers from
      * the INNERCLASS reference since the top-level modifiers for inner classes
-     * wont include static or private/protected.
+     * won't include static or private/protected.
      */
     private static int getModifiers(ClassStub classData) {
         return (classData.innerClassModifiers != -1 ? classData.innerClassModifiers : classData.accessModifiers);
diff --git a/src/main/java/org/codehaus/groovy/ast/expr/GStringExpression.java b/src/main/java/org/codehaus/groovy/ast/expr/GStringExpression.java
index 8bba765ef9..817ed20dc8 100644
--- a/src/main/java/org/codehaus/groovy/ast/expr/GStringExpression.java
+++ b/src/main/java/org/codehaus/groovy/ast/expr/GStringExpression.java
@@ -61,7 +61,7 @@ public class GStringExpression extends Expression {
                 transformExpressions(values, transformer));
         ret.setSourcePosition(this);
         ret.copyNodeMetaData(this);
-        return ret;        
+        return ret;
     }
 
     @Override
@@ -90,7 +90,7 @@ public class GStringExpression extends Expression {
     }
 
     public void addValue(Expression value) {
-        // If the first thing is an value, then we need a dummy empty string in front of it so that when we
+        // If the first thing is a value, then we need a dummy empty string in front of it so that when we
         // toString it they come out in the correct order.
         if (strings.isEmpty())
             strings.add(ConstantExpression.EMPTY_STRING);
diff --git a/src/main/java/org/codehaus/groovy/ast/expr/VariableExpression.java b/src/main/java/org/codehaus/groovy/ast/expr/VariableExpression.java
index 2b685e77d8..96c3841e8b 100644
--- a/src/main/java/org/codehaus/groovy/ast/expr/VariableExpression.java
+++ b/src/main/java/org/codehaus/groovy/ast/expr/VariableExpression.java
@@ -169,7 +169,7 @@ public class VariableExpression extends Expression implements Variable {
 
     /**
      * For internal use only. This flag is used by compiler internals and should probably
-     * be converted to a node metadata in future.
+     * be converted to a node metadata in the future.
      *
      * @param useRef
      */
@@ -179,7 +179,7 @@ public class VariableExpression extends Expression implements Variable {
 
     /**
      * For internal use only. This flag is used by compiler internals and should probably
-     * be converted to a node metadata in future.
+     * be converted to a node metadata in the future.
      */
     public boolean isUseReferenceDirectly() {
         return useRef;
diff --git a/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java b/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java
index 05817b5a98..06edc9e3ee 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java
@@ -290,7 +290,7 @@ public class GeneralUtils {
      * Builds a binary expression that compares two values.
      *
      * @param lhv expression for the value to compare from
-     * @param rhv expression for the value value to compare to
+     * @param rhv expression for the value to compare to
      * @return the expression comparing two values
      */
     public static BinaryExpression cmpX(final Expression lhv, final Expression rhv) {
diff --git a/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java b/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java
index cbce5ff302..215b3d5992 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java
@@ -820,7 +820,7 @@ public class GenericsUtils {
      * but the other will not try even if the parameterized type has placeholders
      *
      * @param declaringClass the generics class node declaring the generics types
-     * @param actualReceiver the sub-class class node
+     * @param actualReceiver the subclass class node
      * @return the placeholder-to-actualtype mapping
      *
      * @since 3.0.0
diff --git a/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java b/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java
index d68bc3cf5e..d0339c42df 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/WideningCategories.java
@@ -95,7 +95,7 @@ public class WideningCategories {
     }
 
     /**
-     * Used to check if a type is an double or Double.
+     * Used to check if a type is a double or Double.
      * @param type the type to check
      */
     public static boolean isDouble(final ClassNode type) {
@@ -151,7 +151,7 @@ public class WideningCategories {
     }
 
     /**
-     * It is of a floating category, if the provided type is a
+     * It is of a floating category, if the provided type is
      * a float, double. C(type)=float
      */
     public static boolean isFloatingCategory(final ClassNode type) {
@@ -227,9 +227,9 @@ public class WideningCategories {
     }
 
     /**
-     * Given a lowest upper bound computed without generic type information but which requires to be parameterized
+     * Given the lowest upper bound computed without generic type information but which requires to be parameterized
      * and the two implementing classnodes which are parameterized with potentially two different types, returns
-     * a parameterized lowest upper bound.
+     * the parameterized lowest upper bound.
      *
      * For example, if LUB is Set&lt;T&gt; and a is Set&lt;String&gt; and b is Set&lt;StringBuffer&gt;, this
      * will return a LUB which parameterized type matches Set&lt;? extends CharSequence&gt;