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/09/26 23:01:45 UTC
[groovy] branch GROOVY_3_0_X updated: Revert "GROOVY-9760:
parameterizeType for raw type should be T
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
new 9f753a5 Revert "GROOVY-9760: parameterizeType for raw type should be T<Object> not T<X> (port to 2_5_X fix)" (accidentally on wrong branch)
9f753a5 is described below
commit 9f753a516e6a8a15e95ab3fd98a67d1be8a13d34
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sun Sep 27 09:01:11 2020 +1000
Revert "GROOVY-9760: parameterizeType for raw type should be T<Object> not T<X> (port to 2_5_X fix)" (accidentally on wrong branch)
This reverts commit c95a41a44295095d43288a833d74178151272a1d.
---
.../java/org/codehaus/groovy/ast/tools/GenericsUtils.java | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java b/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java
index 6d16916..2f30e7b 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java
@@ -536,15 +536,6 @@ public class GenericsUtils {
return superClass;
}
- private static GenericsType asGenericsType(ClassNode type) {
- if (!type.isGenericsPlaceHolder()) {
- return new GenericsType(type);
- } else {
- ClassNode upper = (type.redirect() != null ? type.redirect() : type);
- return new GenericsType(type, new ClassNode[]{upper}, null);
- }
- }
-
private static void extractSuperClassGenerics(final GenericsType[] usage, final GenericsType[] declaration, final Map<String, ClassNode> spec) {
// if declaration does not provide generics, there is no connection to make
if (declaration == null || declaration.length == 0) return;
@@ -556,7 +547,7 @@ public class GenericsUtils {
ClassNode type = spec.get(name);
if (type != null && type.isGenericsPlaceHolder()
&& type.getUnresolvedName().equals(name)) {
- type = asGenericsType(type).getUpperBounds()[0];
+ type = type.asGenericsType().getUpperBounds()[0];
spec.put(name, type);
}
}