groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From emil...@apache.org
Subject [groovy] branch master updated: minor edits
Date Sat, 14 Dec 2019 19:04:46 GMT
This is an automated email from the ASF dual-hosted git repository.

emilles 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 51b14ea  minor edits
51b14ea is described below

commit 51b14ea4a07f2640f6e8d1d31810ce8c9d24d714
Author: Eric Milles <eric.milles@thomsonreuters.com>
AuthorDate: Sat Dec 14 13:04:33 2019 -0600

    minor edits
---
 src/main/java/org/codehaus/groovy/ast/GenericsType.java | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/ast/GenericsType.java b/src/main/java/org/codehaus/groovy/ast/GenericsType.java
index ed0d938..d63e59f 100644
--- a/src/main/java/org/codehaus/groovy/ast/GenericsType.java
+++ b/src/main/java/org/codehaus/groovy/ast/GenericsType.java
@@ -285,20 +285,15 @@ public class GenericsType extends ASTNode {
     }
 
     /**
-     * Iterates over each generics bound of this generics specification, and checks
-     * that the generics defined by the bound are compatible with the generics specified
-     * by the type.
-     * @param classNode the classnode the bounds should be compared with
-     * @return true if generics from bounds are compatible
+     * Compares the bounds of this generics specification against the given type
+     * for compatibility.  Ex: String would satisfy &lt;? extends CharSequence>.
      */
     private boolean checkGenerics(final ClassNode classNode) {
         ClassNode lowerBound = getLowerBound();
-        ClassNode[] upperBounds = getUpperBounds();
         if (lowerBound != null) {
-            if (!lowerBound.redirect().isUsingGenerics()) {
-                return compareGenericsWithBound(classNode, lowerBound);
-            }
+            return compareGenericsWithBound(classNode, lowerBound);
         }
+        ClassNode[] upperBounds = getUpperBounds();
         if (upperBounds != null) {
             for (ClassNode upperBound : upperBounds) {
                 if (!compareGenericsWithBound(classNode, upperBound)) {


Mime
View raw message