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


The following commit(s) were added to refs/heads/GROOVY_4_0_X by this push:
     new 9aed14dc0a spelling correction in private method
9aed14dc0a is described below

commit 9aed14dc0a415ef7f024ce35fc015dc90cecde3a
Author: Paul King <[email protected]>
AuthorDate: Tue May 24 11:36:27 2022 +1000

    spelling correction in private method
---
 .../classgen/asm/sc/StaticTypesMethodReferenceExpressionWriter.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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 aeba6a9ebc..4c5b44fff1 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
@@ -171,7 +171,7 @@ public class StaticTypesMethodReferenceExpressionWriter 
extends MethodReferenceE
                             .map(e -> e.getType().getText())
                             .collect(Collectors.joining(","))
                     + ")] in the type[" + typeOrTargetRefType.getText() + "]", 
methodReferenceExpression);
-        } else if (parametersWithExactType.length > 0 && 
isTypeReferingInstanceMethod(typeOrTargetRef, methodRefMethod)) {
+        } else if (parametersWithExactType.length > 0 && 
isTypeReferringInstanceMethod(typeOrTargetRef, methodRefMethod)) {
             ClassNode firstParameterType = 
parametersWithExactType[0].getType();
             if (!isAssignableTo(firstParameterType, typeOrTargetRefType)) {
                 throw new RuntimeParserException("Invalid receiver type: " + 
firstParameterType.getText() + " is not compatible with " + 
typeOrTargetRefType.getText(), typeOrTargetRef);
@@ -268,7 +268,7 @@ public class StaticTypesMethodReferenceExpressionWriter 
extends MethodReferenceE
 
         return chooseMethodRefMethodCandidate(typeOrTargetRef, 
methods.stream().filter(method -> {
             Parameter[] parameters = method.getParameters();
-            if (isTypeReferingInstanceMethod(typeOrTargetRef, method)) {
+            if (isTypeReferringInstanceMethod(typeOrTargetRef, method)) {
                 // there is an implicit parameter for "String::length"
                 ClassNode firstParamType = method.getDeclaringClass();
 
@@ -304,7 +304,7 @@ public class StaticTypesMethodReferenceExpressionWriter 
extends MethodReferenceE
         return (methodRefMethod instanceof ExtensionMethodNode);
     }
 
-    private static boolean isTypeReferingInstanceMethod(final Expression 
typeOrTargetRef, final MethodNode mn) {
+    private static boolean isTypeReferringInstanceMethod(final Expression 
typeOrTargetRef, final MethodNode mn) {
         // class::instanceMethod
         return (typeOrTargetRef instanceof ClassExpression) && ((mn != null && 
!mn.isStatic())
                 || (isExtensionMethod(mn) && !((ExtensionMethodNode) 
mn).isStaticExtension()));

Reply via email to