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

paulk 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 a4e0d6de9c tweak error message
a4e0d6de9c is described below

commit a4e0d6de9cc2d8ecb48b48df501e63ec1735d837
Author: Paul King <[email protected]>
AuthorDate: Thu Apr 6 19:37:13 2023 +1000

    tweak error message
---
 .../codehaus/groovy/classgen/ClassCompletionVerifier.java | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git 
a/src/main/java/org/codehaus/groovy/classgen/ClassCompletionVerifier.java 
b/src/main/java/org/codehaus/groovy/classgen/ClassCompletionVerifier.java
index 924b5633af..8ff9c1ef00 100644
--- a/src/main/java/org/codehaus/groovy/classgen/ClassCompletionVerifier.java
+++ b/src/main/java/org/codehaus/groovy/classgen/ClassCompletionVerifier.java
@@ -786,16 +786,15 @@ public class ClassCompletionVerifier extends 
ClassCodeVisitorSupport {
             checkGenericsUsage(ref, node.getComponentType());
         } else if (!node.isRedirectNode() && node.isUsingGenerics()) {
             addError(
-                    "A transform used a generics-containing ClassNode "+ node 
+ " " +
-                    "for "+getRefDescriptor(ref) +
+                    "A transform used a generics-containing ClassNode "+ node +
+                    " for " + getRefDescriptor(ref) +
                     "directly. You are not supposed to do this. " +
                     "Please create a clean ClassNode using 
ClassNode#getPlainNodeReference() " +
-                    "and #setGenericsTypes(GenericsType[]) on it or use 
GenericsUtils.makeClassSafe*" +
-                    "and use the new ClassNode instead of the original one. 
Otherwise " +
-                    "the compiler will create wrong descriptors and a 
potential " +
-                    "NullPointerException in TypeResolver in the OpenJDK. If 
this is " +
-                    "not your own doing, please report this bug to the writer 
of the " +
-                    "transform.",
+                    "and #setGenericsTypes(GenericsType[]) on it or use 
GenericsUtils.makeClassSafe* " +
+                    "and use the new ClassNode instead of the original one. 
Otherwise, " +
+                    "the compiler will create incorrect descriptors 
potentially leading to " +
+                    "NullPointerExceptions in the TypeResolver class. If this 
is not your own " +
+                    "doing, please report this bug to the writer of the 
transform.",
                     ref);
         }
     }

Reply via email to