eric-milles edited a comment on pull request #1332:
URL: https://github.com/apache/groovy/pull/1332#issuecomment-667094288


   Could `ModuleNode#addImport` do copy-on-write instead?  That seems to be the 
only source of backwards compatibility issues:
   ```java
     private void visit(ModuleNode moduleNode, SourceUnit sourceUnit) {
       for (ImportNode importNode : moduleNode.getImports()) {
         if (shouldTransformClass(importNode.getType())) {
           moduleNode.addImport(importNode.getAlias(), 
rewriteType(importNode.getType()));
         }
       }
   ```


----------------------------------------------------------------
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:
[email protected]


Reply via email to