You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2021/05/13 00:14:15 UTC
[GitHub] [groovy] danielsun1106 commented on a change in pull request #1578: GROOVY-9632: Java 8 Type Param Annotation Not Generated in Byte Code
danielsun1106 commented on a change in pull request #1578:
URL: https://github.com/apache/groovy/pull/1578#discussion_r631482165
##########
File path: src/main/java/org/codehaus/groovy/ast/ClassNode.java
##########
@@ -1420,6 +1421,16 @@ public void setUsingGenerics(boolean usesGenerics) {
this.usesGenerics = usesGenerics;
}
+ public ClassNode getPlainPrimitiveReference() {
+ ClassNode n = new ClassNode(name, modifiers, superClass, null, null);
+ n.isPrimaryNode = false;
+ n.setRedirect(redirect());
+ if (isArray()) {
+ n.componentType = redirect().getComponentType();
+ }
+ return n;
+ }
+
public ClassNode getPlainNodeReference() {
if (ClassHelper.isPrimitiveType(this)) return this;
ClassNode n = new ClassNode(name, modifiers, superClass, null, null);
Review comment:
We could remove the duplicated code by invoking the method:
`return getPlainPrimitiveReference()`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org