This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits 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 f208e2f3bc Trivial refactor: avoid using magic number
f208e2f3bc is described below

commit f208e2f3bc233ce31c5deff284e1db1464d45abf
Author: Daniel Sun <[email protected]>
AuthorDate: Tue May 5 20:02:53 2026 +0900

    Trivial refactor: avoid using magic number
---
 src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java 
b/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
index 06b1af3929..1e3af7d388 100644
--- a/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
+++ b/src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java
@@ -425,10 +425,7 @@ public class AsmClassGenerator extends ClassGenerator {
 
             visitAnnotations(recordComponent, visitor);
 
-            // the int encoded value of the type reference is ALWAYS 
`318767104`
-            // TODO Get the magic number `318767104` via 
`TypeReference.newXXX()`
-            TypeReference typeRef = new TypeReference(318767104);
-
+            TypeReference typeRef = newTypeReference(FIELD);
             visitTypeAnnotations(type, visitor, typeRef, "", true);
 
             visitor.visitEnd();

Reply via email to