This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new e1e7250 additional notes for breaking changes
e1e7250 is described below
commit e1e72505efc3b959b11ddd17af7e22567a9f3912
Author: Paul King <[email protected]>
AuthorDate: Thu May 15 16:14:57 2025 +1000
additional notes for breaking changes
---
site/src/site/releasenotes/groovy-5.0.adoc | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/site/src/site/releasenotes/groovy-5.0.adoc
b/site/src/site/releasenotes/groovy-5.0.adoc
index 6f9aae8..24766a2 100644
--- a/site/src/site/releasenotes/groovy-5.0.adoc
+++ b/site/src/site/releasenotes/groovy-5.0.adoc
@@ -826,11 +826,14 @@ image:img/ascii_barchart.png[image]
[[Groovy5.0-breaking]]
== Breaking changes
+* The return type for the `findIndexValues` extension method for an `Iterator`
+was changed to `Iterator` from `List`. This facilitates calling a series of
iterator extension methods in sequence and retaining the inherent lazy nature
of the iterator. If you need all index values calculated eagerly, simply add
`.toList()`. If a subsequent extension method is called, no change may be
needed. (https://issues.apache.org/jira/browse/GROOVY-11647[GROOVY-11647])
+* The return type for the `chop` extension method for an `Iterator`
+was changed to `Iterator<List>` from `List<List>`. This facilitates calling a
series of iterator extension methods in sequence and retaining the inherent
lazy nature of the iterator. If you need all chopped lists calculated eagerly,
simply add `.toList()`. If a subsequent extension method is called, no change
may be needed.
(https://issues.apache.org/jira/browse/GROOVY-11599[GROOVY-11599])
* Scripts containing a static `main` method and no statements outside that
method have changed slightly
-for improved JEP 445 compatibility. The script class for such methods no
longer extends `Script` and
+for improved JEP 512 compatibility. The script class for such methods no
longer extends `Script` and
hence no longer has access to the script context or bindings. For many such
scripts, access to the
-binding isn't needed and there is now a simpler structure for those scripts.
Scripts which need access
-to the binding should instead use a no-arg instance `run` method.
+binding isn't needed and there is now a simpler structure for those scripts.
If you have a script with such a method, convert it to a normal Groovy script,
or change it to instead use a no-arg instance `run` method.
(link:https://issues.apache.org/jira/browse/GROOVY-11118[GROOVY-11118])
* The `getProperty` method allows for getting properties that don't exist
within a class.
Previously, static properties from an outer class were given priority over
overrides