[
https://issues.apache.org/jira/browse/GROOVY-10470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17487190#comment-17487190
]
Alexander Veit commented on GROOVY-10470:
-----------------------------------------
Sorry, I didn't see the information about changed default includes. But I agree
that the way you have shown is more preferable than implicitly importing
classes like AntBuilder in advance.
> Update from Groovy 3 to 4.0.0 breaks existing code
> --------------------------------------------------
>
> Key: GROOVY-10470
> URL: https://issues.apache.org/jira/browse/GROOVY-10470
> Project: Groovy
> Issue Type: Bug
> Components: groovy-runtime
> Affects Versions: 4.0.0
> Reporter: Alexander Veit
> Priority: Major
>
> After updating from Groovy 3 to 4.0.0 scripts that use {{AntBuilder}} without
> an {{import}} statement no longer work.
> This is probably caused by missing default includes for {{groovy.ant.*}} or
> {{groovy.ant.AntBuilder}}.
> The same problem exists for {{XmlSlurper}} and {{XmlParser}}.
> Example: The script below works with Groovy 3.0.9 but not with 4.0.0.
> {code:java}
> new AntBuilder()
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)