You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2022/04/11 08:09:30 UTC

[groovy] branch master updated (07a5cd4527 -> b8506a2d66)

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

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


    from 07a5cd4527 GROOVY-10576: "?" source and target "? extends Object"
     new ccbf28c279 minor refactor
     new b8506a2d66 minor refactor for travis

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .travis.yml                                              | 4 ++--
 src/main/java/org/codehaus/groovy/classgen/Verifier.java | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)


[groovy] 01/02: minor refactor

Posted by pa...@apache.org.
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

commit ccbf28c2799eebe0d2fd8a34a589f04541814ff6
Author: Paul King <pa...@asert.com.au>
AuthorDate: Mon Apr 11 18:08:33 2022 +1000

    minor refactor
---
 src/main/java/org/codehaus/groovy/classgen/Verifier.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/classgen/Verifier.java b/src/main/java/org/codehaus/groovy/classgen/Verifier.java
index 6eed40febc..99f52fbc2a 100644
--- a/src/main/java/org/codehaus/groovy/classgen/Verifier.java
+++ b/src/main/java/org/codehaus/groovy/classgen/Verifier.java
@@ -992,6 +992,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
         List<ConstructorNode> constructors = new ArrayList<>(type.getDeclaredConstructors());
         addDefaultParameters(constructors, (arguments, params, method) -> {
             // GROOVY-9151: check for references to parameters that have been removed
+            List<Parameter> paramList = Arrays.asList(params);
             for (ListIterator<Expression> it = arguments.getExpressions().listIterator(); it.hasNext(); ) {
                 Expression argument = it.next();
                 if (argument instanceof CastExpression) {
@@ -1001,7 +1002,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
                     VariableExpression v = (VariableExpression) argument;
                     if (v.getAccessedVariable() instanceof Parameter) {
                         Parameter p = (Parameter) v.getAccessedVariable();
-                        if (p.hasInitialExpression() && !Arrays.asList(params).contains(p)
+                        if (p.hasInitialExpression() && !paramList.contains(p)
                                 && p.getInitialExpression() instanceof ConstantExpression) {
                             // replace argument "(Type) param" with "(Type) <param's default>" for simple default value
                             it.set(castX(method.getParameters()[it.nextIndex() - 1].getType(), p.getInitialExpression()));
@@ -1014,7 +1015,7 @@ public class Verifier implements GroovyClassVisitor, Opcodes {
                 public void visitVariableExpression(final VariableExpression e) {
                     if (e.getAccessedVariable() instanceof Parameter) {
                         Parameter p = (Parameter) e.getAccessedVariable();
-                        if (p.hasInitialExpression() && !Arrays.asList(params).contains(p)) {
+                        if (p.hasInitialExpression() && !paramList.contains(p)) {
                             String error = String.format(
                                     "The generated constructor \"%s(%s)\" references parameter '%s' which has been replaced by a default value expression.",
                                     type.getNameWithoutPackage(),


[groovy] 02/02: minor refactor for travis

Posted by pa...@apache.org.
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

commit b8506a2d6694c1fd1ced7c684f193dbfd45623e7
Author: Paul King <pa...@asert.com.au>
AuthorDate: Mon Apr 11 18:09:22 2022 +1000

    minor refactor for travis
---
 .travis.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index e9e489f786..10c667e2dd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,8 +25,8 @@ install:
 
 matrix:
   include:
-#    - env: BC='indy' FEATURE='19' TARGET_JAVA_HOME="/home/travis/openjdk$FEATURE" LICENSE='GPL'
-#      jdk: openjdk17
+    - env: BC='indy' FEATURE='19' TARGET_JAVA_HOME="/home/travis/openjdk$FEATURE" LICENSE='GPL'
+      jdk: openjdk17
     - env: BC='indy' FEATURE='18' TARGET_JAVA_HOME="/home/travis/openjdk$FEATURE" LICENSE='GPL'
       jdk: openjdk17
     - env: BC='indy'