jdaugherty commented on code in PR #15557:
URL: https://github.com/apache/grails-core/pull/15557#discussion_r3341502124


##########
grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java:
##########
@@ -1510,8 +1510,20 @@ public static void processVariableScopes(SourceUnit 
source, ClassNode classNode,
         VariableScopeVisitor scopeVisitor = new VariableScopeVisitor(source);
         if (methodNode == null) {
             scopeVisitor.visitClass(classNode);
+            return;
+        }
+        scopeVisitor.prepareVisit(classNode);
+        if (methodNode.getExceptions() == null) {
+            // Groovy 5's VariableScopeVisitor reads the method's exceptions 
array without a null check, and AST

Review Comment:
   Isn't this a bug in our implementation?  Instead of fixing all of our calls, 
we're trying to post process fix this? 



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to