You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2021/01/28 00:06:22 UTC

[GitHub] [groovy] keeganwitt commented on a change in pull request #1476: GROOVY-9777: stubgen: add cast for Object parameter in special ctor call

keeganwitt commented on a change in pull request #1476:
URL: https://github.com/apache/groovy/pull/1476#discussion_r565727272



##########
File path: src/main/java/org/codehaus/groovy/tools/javac/JavaStubGenerator.java
##########
@@ -627,15 +627,15 @@ private static boolean noExceptionToAvoid(ConstructorNode fromStub, ConstructorN
 
     private void printSpecialConstructorArgs(PrintWriter out, ConstructorNode node, ConstructorCallExpression constrCall) {
         // Select a constructor from our class, or super-class which is legal to call,
-        // then write out an invoke w/nulls using casts to avoid ambiguous crapo
+        // then write out an invoke w/nulls using casts to avoid ambiguous calls
 
         Parameter[] params = selectAccessibleConstructorFromSuper(node);
         if (params != null) {
             out.print("super (");
 
-            for (int i = 0; i < params.length; i++) {
+            for (int i = 0, n = params.length; i < n; i += 1) {

Review comment:
       I think this is less readable than the original honestly (sorry to say).




----------------------------------------------------------------
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:
users@infra.apache.org