You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2020/07/12 07:37:28 UTC
[groovy] branch master updated: Trivial tweak: simplify checks
This is an automated email from the ASF dual-hosted git repository.
sunlan 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 f7f5fc1 Trivial tweak: simplify checks
f7f5fc1 is described below
commit f7f5fc120c01cf28f307b301b65188c09801bf04
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Jul 12 15:35:23 2020 +0800
Trivial tweak: simplify checks
---
src/main/java/org/apache/groovy/ast/tools/MethodNodeUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/groovy/ast/tools/MethodNodeUtils.java b/src/main/java/org/apache/groovy/ast/tools/MethodNodeUtils.java
index 79a9134..c1b1e34 100644
--- a/src/main/java/org/apache/groovy/ast/tools/MethodNodeUtils.java
+++ b/src/main/java/org/apache/groovy/ast/tools/MethodNodeUtils.java
@@ -83,7 +83,7 @@ public class MethodNodeUtils {
public static String getPropertyName(final MethodNode mNode) {
final int parameterCnt = mNode.getParameters().length;
- if (0 == parameterCnt || 1 == parameterCnt) {
+ if (parameterCnt < 2) {
final String name = mNode.getName();
final int nameLength = name.length();
if (nameLength > 2) {