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/05/24 02:43:11 UTC
[groovy] branch master updated: spelling correction in private method
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new bcf66b50ae spelling correction in private method
bcf66b50ae is described below
commit bcf66b50aeb9a8c373b51bd5960af3b6b49b5fb6
Author: Paul King <pa...@asert.com.au>
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()));