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 2020/10/28 13:06:57 UTC

[groovy] branch GROOVY_2_5_X updated: fixed grammar type in code and Documentation (closes #1412)

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

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


The following commit(s) were added to refs/heads/GROOVY_2_5_X by this push:
     new 040460a  fixed grammar type in code and Documentation (closes #1412)
040460a is described below

commit 040460a039f317c97e56aaf8eaae07b84cba7817
Author: Amir Naghibi <am...@visier.com>
AuthorDate: Mon Oct 26 13:47:34 2020 -0700

    fixed grammar type in code and Documentation (closes #1412)
---
 .../org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java    | 2 +-
 src/spec/doc/core-operators.adoc                                        | 2 +-
 .../src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java   | 2 +-
 subprojects/groovy-xml/src/main/java/groovy/xml/DOMBuilder.java         | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java b/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
index 2b4ad38..308d5fe 100644
--- a/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
+++ b/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
@@ -409,7 +409,7 @@ public class MetaClassRegistryImpl implements MetaClassRegistry{
     }
 
     /**
-     * Gets an array of of all registered ConstantMetaClassListener instances.
+     * Gets an array of all registered ConstantMetaClassListener instances.
      */
     public MetaClassRegistryChangeEventListener[] getMetaClassRegistryChangeEventListeners() {
         synchronized (changeListenerList) {
diff --git a/src/spec/doc/core-operators.adoc b/src/spec/doc/core-operators.adoc
index 2fd8608..0142f88 100644
--- a/src/spec/doc/core-operators.adoc
+++ b/src/spec/doc/core-operators.adoc
@@ -475,7 +475,7 @@ it will return null instead of throwing a `NullPointerException`:
 ----
 include::{projectdir}/src/spec/test/OperatorsTest.groovy[tags=spreaddot_nullsafe,indent=0]
 ----
-<1> build a list for which of of the elements is `null`
+<1> build a list for which one of the elements is `null`
 <2> using the spread operator will *not* throw a `NullPointerException`
 <3> the receiver might also be null, in which case the return value is `null`
 
diff --git a/subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java b/subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java
index e0aa6bf..29b5ad4 100644
--- a/subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java
+++ b/subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java
@@ -220,7 +220,7 @@ public class SwingGroovyMethods {
      * Allow DefaultListModel to work with subscript operators.<p>
      * <b>WARNING:</b> this operation does not replace the element at the
      * specified index, rather it inserts the element at that index, thus
-     * increasing the size of of the model by 1.
+     * increasing the size of the model by 1.
      *
      * @param self  a DefaultListModel
      * @param index an index
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/DOMBuilder.java b/subprojects/groovy-xml/src/main/java/groovy/xml/DOMBuilder.java
index f1fd975..cef9cca 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/xml/DOMBuilder.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/xml/DOMBuilder.java
@@ -224,7 +224,7 @@ public class DOMBuilder extends BuilderSupport {
                 QName qname = (QName) key;
                 element.setAttributeNS(qname.getNamespaceURI(), qname.getQualifiedName(), value.toString());
             } else {
-                throw new IllegalArgumentException("The key: " + key + " should be an instanceof of " + QName.class);
+                throw new IllegalArgumentException("The key: " + key + " should be an instance of " + QName.class);
             }
         }
     }