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 2023/04/08 00:50:34 UTC

[groovy] 02/02: tweak error message

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

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 448c2e6b12309ef51f07853e0f0c40450b317f77
Author: Paul King <pa...@asert.com.au>
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);
         }
     }