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

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


The following commit(s) were added to refs/heads/master by this push:
     new 4592e3d2e9 GROOVY-11857: encapsulate ForStatement without value 
variable (tweak Javadoc)
4592e3d2e9 is described below

commit 4592e3d2e986ed305346e3bf15f6632189dbfd88
Author: Paul King <[email protected]>
AuthorDate: Thu Feb 12 14:54:01 2026 +1000

    GROOVY-11857: encapsulate ForStatement without value variable (tweak 
Javadoc)
---
 src/main/java/org/codehaus/groovy/ast/stmt/ForStatement.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/main/java/org/codehaus/groovy/ast/stmt/ForStatement.java 
b/src/main/java/org/codehaus/groovy/ast/stmt/ForStatement.java
index 442557f3c6..40782a6ea4 100644
--- a/src/main/java/org/codehaus/groovy/ast/stmt/ForStatement.java
+++ b/src/main/java/org/codehaus/groovy/ast/stmt/ForStatement.java
@@ -109,6 +109,8 @@ public class ForStatement extends Statement implements 
LoopingStatement {
     
//--------------------------------------------------------------------------
 
     /**
+     * Retrieves the index variable of for-in loops with an index variable or 
null in other cases.
+     *
      * @since 5.0.0
      */
     public Parameter getIndexVariable() {
@@ -116,6 +118,8 @@ public class ForStatement extends Statement implements 
LoopingStatement {
     }
 
     /**
+     * Retrieves the value variable of for-in loops or null for a classic for 
loop.
+     *
      * @since 5.0.0
      */
     public Parameter getValueVariable() {
@@ -132,6 +136,10 @@ public class ForStatement extends Statement implements 
LoopingStatement {
         return valueVariable.getType();
     }
 
+    /**
+     * Retrieves the collection expression of a for loop.
+     * Will be an instance of {@link ClosureListExpression} for a classic for 
loop.
+     */
     public Expression getCollectionExpression() {
         return collectionExpression;
     }

Reply via email to