[jira] [Updated] (GROOVY-9566) Default import for Proxy is wrong
[ https://issues.apache.org/jira/browse/GROOVY-9566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9566: --- Fix Version/s: 3.0.5 4.0.0-alpha-1 > Default import for Proxy is wrong > - > > Key: GROOVY-9566 > URL: https://issues.apache.org/jira/browse/GROOVY-9566 > Project: Groovy > Issue Type: Bug > Components: Compiler >Affects Versions: 3.0.3 >Reporter: James Kleeh >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.5 > > > In Java 11, a Groovy class that uses `Proxy`, the default import is > `groovy.util.Proxy` where it should be `java.net.Proxy` > > In Java 8, the default import is `java.net.Proxy` -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (GROOVY-9566) Default import for Proxy is wrong
[ https://issues.apache.org/jira/browse/GROOVY-9566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun reassigned GROOVY-9566: -- Assignee: Daniel Sun > Default import for Proxy is wrong > - > > Key: GROOVY-9566 > URL: https://issues.apache.org/jira/browse/GROOVY-9566 > Project: Groovy > Issue Type: Bug > Components: Compiler >Affects Versions: 3.0.3 >Reporter: James Kleeh >Assignee: Daniel Sun >Priority: Major > > In Java 11, a Groovy class that uses `Proxy`, the default import is > `groovy.util.Proxy` where it should be `java.net.Proxy` > > In Java 8, the default import is `java.net.Proxy` -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9548) groovydoc: properties claim to be "private" and don't show annotations
[ https://issues.apache.org/jira/browse/GROOVY-9548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9548. Fix Version/s: 3.0.5 4.0.0-alpha-1 Assignee: Daniel Sun Resolution: Fixed The proposed PR was merged. Thanks! > groovydoc: properties claim to be "private" and don't show annotations > --- > > Key: GROOVY-9548 > URL: https://issues.apache.org/jira/browse/GROOVY-9548 > Project: Groovy > Issue Type: Bug > Components: GroovyDoc >Affects Versions: 3.0.3 >Reporter: Mikko Värri >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.5 > > Attachments: groovy-property-2_5_11.png, groovy-property-3_0_3.png > > Time Spent: 1h > Remaining Estimate: 0h > > In 2.5.11, properties don't have visibility modifiers and the annotations are > shown: > !groovy-property-2_5_11.png! > > In 3.0.3, they are claimed to be private (although, -private groovydoc flag > wasn't used) and annotations are missing: > !groovy-property-3_0_3.png! -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (GROOVY-9556) Stub generated without the effect of AST transformation makes joint compilation fail
[ https://issues.apache.org/jira/browse/GROOVY-9556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17108922#comment-17108922 ] Daniel Sun edited comment on GROOVY-9556 at 5/16/20, 9:46 AM: -- As Java stubs are generated at the CONVERSION phase, if groovy source code uses AST tranformation which will change the AST at the phases after CONVERSION, e.g. {{@InheritConstructors}}, the generated Java stubs will not include the changes specified in the AST tranformation. If the changes are relied by the Java compilation, e.g. super class has its own constructors and its sub class should have some of the relevant constructors, the Java compilation will fail. If Java compilation does not use the Java stubs, e.g. Java source code does not use any Groovy classes which contain the AST transformation mentioned above, we can workaround the issue as 2.5.x does via the JVM option {{-sourcepath}}. If Java compilation does use the Java stubs, the {{-sourcepath}} can take effect and help Java compiler find the Java stubs. But for the Java stubs in memory, no workaround found, in other words, we can not specify {{-sourcepath}} to some virtual path and no Java compiler API found could be used to simulate {{-sourcepath}} was (Author: daniel_sun): As Java stubs are generated at the CONVERSION phase, if groovy source code uses AST tranformation which will change the AST at the phases after CONVERSION, e.g. {{@InheritConstructors}}, the generated Java stubs will not include the changes specified in the AST tranformation. If the changes are relied by the Java compilation, e.g. super class has its own constructors, its sub class should have some of the relevant constructors, the Java compilation will fail. If Java compilation does not use the Java stubs, e.g. Java source code does not use any Groovy classes which contain the AST transformation mentioned above, we can workaround the issue as 2.5.x does via the JVM option {{-sourcepath}}. If Java compilation does use the Java stubs, the {{-sourcepath}} can take effect and help Java compiler find the Java stubs. But for the Java stubs in memory, no workaround found, in other words, we can not specify {{-sourcepath}} to some virtual path and no Java compiler API found could be used to simulate {{-sourcepath}} > Stub generated without the effect of AST transformation makes joint > compilation fail > > > Key: GROOVY-9556 > URL: https://issues.apache.org/jira/browse/GROOVY-9556 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.3 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 40m > Remaining Estimate: 0h > > http://groovy.329449.n5.nabble.com/More-Groovy-3-woes-td5768022.html > {code:java} > === > 194 ocs /tmp> /* > * Copyright 2015 The Apache Software Foundation. > * OC: removed almost all code, leaving just what's needed to crash > */ > package org.apache.pdfbox.examples.signature; > import java.io.IOException; > import java.io.InputStream; > import java.security.KeyStore; > import java.security.KeyStoreException; > import java.security.NoSuchAlgorithmException; > import java.security.UnrecoverableKeyException; > import java.security.cert.CertificateException; > import > org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface; > public abstract class CreateSignatureBase implements SignatureInterface > { > public CreateSignatureBase(KeyStore keystore, char[] pin) > throws KeyStoreException, UnrecoverableKeyException, > NoSuchAlgorithmException, IOException, CertificateException > { } > @Override > public byte[] sign(InputStream content) throws IOException > { > return null; > } > } > 195 ocs /tmp> package cz.ocs.utilities > import groovy.transform.* > import org.apache.pdfbox.pdmodel.* > import org.apache.pdfbox.examples.signature.CreateSignatureBase > @InheritConstructors class CreateSignature extends CreateSignatureBase { > void signPDF(PDDocument pdd, OutputStream out) { > } > } > 196 ocs /tmp> /usr/local/groovy-2.4.17/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > 197 ocs /tmp> /usr/local/groovy-3.0.3/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/zh/h4cv6xjx033frtt9y72ch898gp/T/groovy-generated-8946934250394256568-java-source/cz/ocs/utilities/CreateSignature.java:12: > error: constructor CreateSignat
[jira] [Comment Edited] (GROOVY-9556) Stub generated without the effect of AST transformation makes joint compilation fail
[ https://issues.apache.org/jira/browse/GROOVY-9556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17108922#comment-17108922 ] Daniel Sun edited comment on GROOVY-9556 at 5/16/20, 9:45 AM: -- As Java stubs are generated at the CONVERSION phase, if groovy source code uses AST tranformation which will change the AST at the phases after CONVERSION, e.g. {{@InheritConstructors}}, the generated Java stubs will not include the changes specified in the AST tranformation. If the changes are relied by the Java compilation, e.g. super class has its own constructors, its sub class should have some of the relevant constructors, the Java compilation will fail. If Java compilation does not use the Java stubs, e.g. Java source code does not use any Groovy classes which contain the AST transformation mentioned above, we can workaround the issue as 2.5.x does via the JVM option {{-sourcepath}}. If Java compilation does use the Java stubs, the {{-sourcepath}} can take effect and help Java compiler find the Java stubs. But for the Java stubs in memory, no workaround found, in other words, we can not specify {{-sourcepath}} to some virtual path and no Java compiler API found could be used to simulate {{-sourcepath}} was (Author: daniel_sun): As Java stubs are generated at the CONVERSION phase, if groovy source code uses AST tranformation which will change the AST at the phases after CONVERSION, e.g. {{@InheritConstructors}}, the generated Java stubs will not include the changes specified in the AST tranformation. If the changes is relied by the Java compilation, e.g. super class has its own constructors, its sub class should have some of the relevant constructors, the Java compilation will fail. If Java compilation does not use the Java stubs, e.g. Java source code does not use any Groovy classes which contain the AST transformation mentioned above, we can workaround the issue as 2.5.x does via the JVM option {{-sourcepath}}. If Java compilation does use the Java stubs, the {{-sourcepath}} can take effect and help Java compiler find the Java stubs. But for the Java stubs in memory, no workaround found, in other words, we can not specify {{-sourcepath}} to some virtual path and no Java compiler API found could be used to simulate {{-sourcepath}} > Stub generated without the effect of AST transformation makes joint > compilation fail > > > Key: GROOVY-9556 > URL: https://issues.apache.org/jira/browse/GROOVY-9556 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.3 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 40m > Remaining Estimate: 0h > > http://groovy.329449.n5.nabble.com/More-Groovy-3-woes-td5768022.html > {code:java} > === > 194 ocs /tmp> /* > * Copyright 2015 The Apache Software Foundation. > * OC: removed almost all code, leaving just what's needed to crash > */ > package org.apache.pdfbox.examples.signature; > import java.io.IOException; > import java.io.InputStream; > import java.security.KeyStore; > import java.security.KeyStoreException; > import java.security.NoSuchAlgorithmException; > import java.security.UnrecoverableKeyException; > import java.security.cert.CertificateException; > import > org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface; > public abstract class CreateSignatureBase implements SignatureInterface > { > public CreateSignatureBase(KeyStore keystore, char[] pin) > throws KeyStoreException, UnrecoverableKeyException, > NoSuchAlgorithmException, IOException, CertificateException > { } > @Override > public byte[] sign(InputStream content) throws IOException > { > return null; > } > } > 195 ocs /tmp> package cz.ocs.utilities > import groovy.transform.* > import org.apache.pdfbox.pdmodel.* > import org.apache.pdfbox.examples.signature.CreateSignatureBase > @InheritConstructors class CreateSignature extends CreateSignatureBase { > void signPDF(PDDocument pdd, OutputStream out) { > } > } > 196 ocs /tmp> /usr/local/groovy-2.4.17/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > 197 ocs /tmp> /usr/local/groovy-3.0.3/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/zh/h4cv6xjx033frtt9y72ch898gp/T/groovy-generated-8946934250394256568-java-source/cz/ocs/utilities/CreateSignature.java:12: > error: constructor CreateSignatureB
[jira] [Comment Edited] (GROOVY-9556) Stub generated without the effect of AST transformation makes joint compilation fail
[ https://issues.apache.org/jira/browse/GROOVY-9556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17108922#comment-17108922 ] Daniel Sun edited comment on GROOVY-9556 at 5/16/20, 9:17 AM: -- As Java stubs are generated at the CONVERSION phase, if groovy source code uses AST tranformation which will change the AST at the phases after CONVERSION, e.g. {{@InheritConstructors}}, the generated Java stubs will not include the changes specified in the AST tranformation. If the changes is relied by the Java compilation, e.g. super class has its own constructors, its sub class should have some of the relevant constructors, the Java compilation will fail. If Java compilation does not use the Java stubs, e.g. Java source code does not use any Groovy classes which contain the AST transformation mentioned above, we can workaround the issue as 2.5.x does via the JVM option {{-sourcepath}}. If Java compilation does use the Java stubs, the {{-sourcepath}} can take effect and help Java compiler find the Java stubs. But for the Java stubs in memory, no workaround found, in other words, we can not specify {{-sourcepath}} to some virtual path and no Java compiler API found could be used to simulate {{-sourcepath}} was (Author: daniel_sun): As Java stubs are generated at the CONVERSION phase, if groovy source code uses AST tranformation which will change the AST at the phases after CONVERSION, e.g. {{@InheritConstructors}}, the generated Java stubs will not include the changes specified in the AST tranformation. If the changes is relied by the Java compilation, e.g. super class has its own constructors, its sub class should have some of the relevant constructors, otherwise the Java compilation will fail. If Java compilation does not use the Java stubs, e.g. Java source code does not use any Groovy classes which contain the AST transformation mentioned above, we can workaround the issue as 2.5.x does via the JVM option {{-sourcepath}}. If Java compilation does use the Java stubs, the {{-sourcepath}} can take effect and help Java compiler find the Java stubs. But for the Java stubs in memory, no workaround found, in other words, we can not specify {{-sourcepath}} to some virtual path and no Java compiler API found could be used to simulate {{-sourcepath}} > Stub generated without the effect of AST transformation makes joint > compilation fail > > > Key: GROOVY-9556 > URL: https://issues.apache.org/jira/browse/GROOVY-9556 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.3 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 40m > Remaining Estimate: 0h > > http://groovy.329449.n5.nabble.com/More-Groovy-3-woes-td5768022.html > {code:java} > === > 194 ocs /tmp> /* > * Copyright 2015 The Apache Software Foundation. > * OC: removed almost all code, leaving just what's needed to crash > */ > package org.apache.pdfbox.examples.signature; > import java.io.IOException; > import java.io.InputStream; > import java.security.KeyStore; > import java.security.KeyStoreException; > import java.security.NoSuchAlgorithmException; > import java.security.UnrecoverableKeyException; > import java.security.cert.CertificateException; > import > org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface; > public abstract class CreateSignatureBase implements SignatureInterface > { > public CreateSignatureBase(KeyStore keystore, char[] pin) > throws KeyStoreException, UnrecoverableKeyException, > NoSuchAlgorithmException, IOException, CertificateException > { } > @Override > public byte[] sign(InputStream content) throws IOException > { > return null; > } > } > 195 ocs /tmp> package cz.ocs.utilities > import groovy.transform.* > import org.apache.pdfbox.pdmodel.* > import org.apache.pdfbox.examples.signature.CreateSignatureBase > @InheritConstructors class CreateSignature extends CreateSignatureBase { > void signPDF(PDDocument pdd, OutputStream out) { > } > } > 196 ocs /tmp> /usr/local/groovy-2.4.17/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > 197 ocs /tmp> /usr/local/groovy-3.0.3/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/zh/h4cv6xjx033frtt9y72ch898gp/T/groovy-generated-8946934250394256568-java-source/cz/ocs/utilities/CreateSignature.java:12: > error: constructor CreateS
[jira] [Resolved] (GROOVY-9556) Stub generated without the effect of AST transformation makes joint compilation fail
[ https://issues.apache.org/jira/browse/GROOVY-9556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9556. Resolution: Fixed > Stub generated without the effect of AST transformation makes joint > compilation fail > > > Key: GROOVY-9556 > URL: https://issues.apache.org/jira/browse/GROOVY-9556 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.3 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 40m > Remaining Estimate: 0h > > http://groovy.329449.n5.nabble.com/More-Groovy-3-woes-td5768022.html > {code:java} > === > 194 ocs /tmp> /* > * Copyright 2015 The Apache Software Foundation. > * OC: removed almost all code, leaving just what's needed to crash > */ > package org.apache.pdfbox.examples.signature; > import java.io.IOException; > import java.io.InputStream; > import java.security.KeyStore; > import java.security.KeyStoreException; > import java.security.NoSuchAlgorithmException; > import java.security.UnrecoverableKeyException; > import java.security.cert.CertificateException; > import > org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface; > public abstract class CreateSignatureBase implements SignatureInterface > { > public CreateSignatureBase(KeyStore keystore, char[] pin) > throws KeyStoreException, UnrecoverableKeyException, > NoSuchAlgorithmException, IOException, CertificateException > { } > @Override > public byte[] sign(InputStream content) throws IOException > { > return null; > } > } > 195 ocs /tmp> package cz.ocs.utilities > import groovy.transform.* > import org.apache.pdfbox.pdmodel.* > import org.apache.pdfbox.examples.signature.CreateSignatureBase > @InheritConstructors class CreateSignature extends CreateSignatureBase { > void signPDF(PDDocument pdd, OutputStream out) { > } > } > 196 ocs /tmp> /usr/local/groovy-2.4.17/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > 197 ocs /tmp> /usr/local/groovy-3.0.3/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/zh/h4cv6xjx033frtt9y72ch898gp/T/groovy-generated-8946934250394256568-java-source/cz/ocs/utilities/CreateSignature.java:12: > error: constructor CreateSignatureBase in class CreateSignatureBase cannot > be applied to given types; > @groovy.transform.InheritConstructors() public class CreateSignature >^ > required: KeyStore,char[] > found: no arguments > reason: actual and formal argument lists differ in length > 1 error > 1 error > 198 ocs /tmp> > === > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (GROOVY-9556) Stub generated without the effect of AST transformation makes joint compilation fail
[ https://issues.apache.org/jira/browse/GROOVY-9556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17108922#comment-17108922 ] Daniel Sun edited comment on GROOVY-9556 at 5/16/20, 8:50 AM: -- As Java stubs are generated at the CONVERSION phase, if groovy source code uses AST tranformation which will change the AST at the phases after CONVERSION, e.g. {{@InheritConstructors}}, the generated Java stubs will not include the changes specified in the AST tranformation. If the changes is relied by the Java compilation, e.g. super class has its own constructors, its sub class should have some of the relevant constructors, otherwise the Java compilation will fail. If Java compilation does not use the Java stubs, e.g. Java source code does not use any Groovy classes which contain the AST transformation mentioned above, we can workaround the issue as 2.5.x does via the JVM option {{-sourcepath}}. If Java compilation does use the Java stubs, the {{-sourcepath}} can take effect and help Java compiler find the Java stubs. But for the Java stubs in memory, no workaround found, in other words, we can not specify {{-sourcepath}} to some virtual path and no Java compiler API found could be used to simulate {{-sourcepath}} was (Author: daniel_sun): As Java stubs are generated at the CONVERSION phase, if groovy source code uses AST tranformation which will change the AST at the phases after CONVERSION, e.g. {{@InheritConstructors}}, the generated Java stubs will not include the changes specified in the AST tranformation. If the changes is relied by the Java compilation, e.g. super class has its own constructors, its sub class should have some of the relevant constructors, otherwise the Java compilation will fail. > Stub generated without the effect of AST transformation makes joint > compilation fail > > > Key: GROOVY-9556 > URL: https://issues.apache.org/jira/browse/GROOVY-9556 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.3 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 10m > Remaining Estimate: 0h > > http://groovy.329449.n5.nabble.com/More-Groovy-3-woes-td5768022.html > {code:java} > === > 194 ocs /tmp> /* > * Copyright 2015 The Apache Software Foundation. > * OC: removed almost all code, leaving just what's needed to crash > */ > package org.apache.pdfbox.examples.signature; > import java.io.IOException; > import java.io.InputStream; > import java.security.KeyStore; > import java.security.KeyStoreException; > import java.security.NoSuchAlgorithmException; > import java.security.UnrecoverableKeyException; > import java.security.cert.CertificateException; > import > org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface; > public abstract class CreateSignatureBase implements SignatureInterface > { > public CreateSignatureBase(KeyStore keystore, char[] pin) > throws KeyStoreException, UnrecoverableKeyException, > NoSuchAlgorithmException, IOException, CertificateException > { } > @Override > public byte[] sign(InputStream content) throws IOException > { > return null; > } > } > 195 ocs /tmp> package cz.ocs.utilities > import groovy.transform.* > import org.apache.pdfbox.pdmodel.* > import org.apache.pdfbox.examples.signature.CreateSignatureBase > @InheritConstructors class CreateSignature extends CreateSignatureBase { > void signPDF(PDDocument pdd, OutputStream out) { > } > } > 196 ocs /tmp> /usr/local/groovy-2.4.17/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > 197 ocs /tmp> /usr/local/groovy-3.0.3/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/zh/h4cv6xjx033frtt9y72ch898gp/T/groovy-generated-8946934250394256568-java-source/cz/ocs/utilities/CreateSignature.java:12: > error: constructor CreateSignatureBase in class CreateSignatureBase cannot > be applied to given types; > @groovy.transform.InheritConstructors() public class CreateSignature >^ > required: KeyStore,char[] > found: no arguments > reason: actual and formal argument lists differ in length > 1 error > 1 error > 198 ocs /tmp> > === > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9556) Stub generated without the effect of AST transformation makes joint compilation fail
[ https://issues.apache.org/jira/browse/GROOVY-9556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9556: --- Component/s: Stub generator / Joint compiler > Stub generated without the effect of AST transformation makes joint > compilation fail > > > Key: GROOVY-9556 > URL: https://issues.apache.org/jira/browse/GROOVY-9556 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.3 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 10m > Remaining Estimate: 0h > > http://groovy.329449.n5.nabble.com/More-Groovy-3-woes-td5768022.html > {code:java} > === > 194 ocs /tmp> /* > * Copyright 2015 The Apache Software Foundation. > * OC: removed almost all code, leaving just what's needed to crash > */ > package org.apache.pdfbox.examples.signature; > import java.io.IOException; > import java.io.InputStream; > import java.security.KeyStore; > import java.security.KeyStoreException; > import java.security.NoSuchAlgorithmException; > import java.security.UnrecoverableKeyException; > import java.security.cert.CertificateException; > import > org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface; > public abstract class CreateSignatureBase implements SignatureInterface > { > public CreateSignatureBase(KeyStore keystore, char[] pin) > throws KeyStoreException, UnrecoverableKeyException, > NoSuchAlgorithmException, IOException, CertificateException > { } > @Override > public byte[] sign(InputStream content) throws IOException > { > return null; > } > } > 195 ocs /tmp> package cz.ocs.utilities > import groovy.transform.* > import org.apache.pdfbox.pdmodel.* > import org.apache.pdfbox.examples.signature.CreateSignatureBase > @InheritConstructors class CreateSignature extends CreateSignatureBase { > void signPDF(PDDocument pdd, OutputStream out) { > } > } > 196 ocs /tmp> /usr/local/groovy-2.4.17/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > 197 ocs /tmp> /usr/local/groovy-3.0.3/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/zh/h4cv6xjx033frtt9y72ch898gp/T/groovy-generated-8946934250394256568-java-source/cz/ocs/utilities/CreateSignature.java:12: > error: constructor CreateSignatureBase in class CreateSignatureBase cannot > be applied to given types; > @groovy.transform.InheritConstructors() public class CreateSignature >^ > required: KeyStore,char[] > found: no arguments > reason: actual and formal argument lists differ in length > 1 error > 1 error > 198 ocs /tmp> > === > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9556) Stub generated without the effect of AST transformation makes joint compilation fail
[ https://issues.apache.org/jira/browse/GROOVY-9556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9556: --- Fix Version/s: 3.0.4 4.0.0-alpha-1 > Stub generated without the effect of AST transformation makes joint > compilation fail > > > Key: GROOVY-9556 > URL: https://issues.apache.org/jira/browse/GROOVY-9556 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 10m > Remaining Estimate: 0h > > http://groovy.329449.n5.nabble.com/More-Groovy-3-woes-td5768022.html > {code:java} > === > 194 ocs /tmp> /* > * Copyright 2015 The Apache Software Foundation. > * OC: removed almost all code, leaving just what's needed to crash > */ > package org.apache.pdfbox.examples.signature; > import java.io.IOException; > import java.io.InputStream; > import java.security.KeyStore; > import java.security.KeyStoreException; > import java.security.NoSuchAlgorithmException; > import java.security.UnrecoverableKeyException; > import java.security.cert.CertificateException; > import > org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface; > public abstract class CreateSignatureBase implements SignatureInterface > { > public CreateSignatureBase(KeyStore keystore, char[] pin) > throws KeyStoreException, UnrecoverableKeyException, > NoSuchAlgorithmException, IOException, CertificateException > { } > @Override > public byte[] sign(InputStream content) throws IOException > { > return null; > } > } > 195 ocs /tmp> package cz.ocs.utilities > import groovy.transform.* > import org.apache.pdfbox.pdmodel.* > import org.apache.pdfbox.examples.signature.CreateSignatureBase > @InheritConstructors class CreateSignature extends CreateSignatureBase { > void signPDF(PDDocument pdd, OutputStream out) { > } > } > 196 ocs /tmp> /usr/local/groovy-2.4.17/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > 197 ocs /tmp> /usr/local/groovy-3.0.3/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/zh/h4cv6xjx033frtt9y72ch898gp/T/groovy-generated-8946934250394256568-java-source/cz/ocs/utilities/CreateSignature.java:12: > error: constructor CreateSignatureBase in class CreateSignatureBase cannot > be applied to given types; > @groovy.transform.InheritConstructors() public class CreateSignature >^ > required: KeyStore,char[] > found: no arguments > reason: actual and formal argument lists differ in length > 1 error > 1 error > 198 ocs /tmp> > === > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9556) Stub generated without the effect of AST transformation makes joint compilation fail
[ https://issues.apache.org/jira/browse/GROOVY-9556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9556: --- Affects Version/s: 3.0.3 > Stub generated without the effect of AST transformation makes joint > compilation fail > > > Key: GROOVY-9556 > URL: https://issues.apache.org/jira/browse/GROOVY-9556 > Project: Groovy > Issue Type: Bug >Affects Versions: 3.0.3 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 10m > Remaining Estimate: 0h > > http://groovy.329449.n5.nabble.com/More-Groovy-3-woes-td5768022.html > {code:java} > === > 194 ocs /tmp> /* > * Copyright 2015 The Apache Software Foundation. > * OC: removed almost all code, leaving just what's needed to crash > */ > package org.apache.pdfbox.examples.signature; > import java.io.IOException; > import java.io.InputStream; > import java.security.KeyStore; > import java.security.KeyStoreException; > import java.security.NoSuchAlgorithmException; > import java.security.UnrecoverableKeyException; > import java.security.cert.CertificateException; > import > org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface; > public abstract class CreateSignatureBase implements SignatureInterface > { > public CreateSignatureBase(KeyStore keystore, char[] pin) > throws KeyStoreException, UnrecoverableKeyException, > NoSuchAlgorithmException, IOException, CertificateException > { } > @Override > public byte[] sign(InputStream content) throws IOException > { > return null; > } > } > 195 ocs /tmp> package cz.ocs.utilities > import groovy.transform.* > import org.apache.pdfbox.pdmodel.* > import org.apache.pdfbox.examples.signature.CreateSignatureBase > @InheritConstructors class CreateSignature extends CreateSignatureBase { > void signPDF(PDDocument pdd, OutputStream out) { > } > } > 196 ocs /tmp> /usr/local/groovy-2.4.17/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > 197 ocs /tmp> /usr/local/groovy-3.0.3/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/zh/h4cv6xjx033frtt9y72ch898gp/T/groovy-generated-8946934250394256568-java-source/cz/ocs/utilities/CreateSignature.java:12: > error: constructor CreateSignatureBase in class CreateSignatureBase cannot > be applied to given types; > @groovy.transform.InheritConstructors() public class CreateSignature >^ > required: KeyStore,char[] > found: no arguments > reason: actual and formal argument lists differ in length > 1 error > 1 error > 198 ocs /tmp> > === > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (GROOVY-9556) Stub generated without the effect of AST transformation makes joint compilation fail
[ https://issues.apache.org/jira/browse/GROOVY-9556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun reassigned GROOVY-9556: -- Assignee: Daniel Sun > Stub generated without the effect of AST transformation makes joint > compilation fail > > > Key: GROOVY-9556 > URL: https://issues.apache.org/jira/browse/GROOVY-9556 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > http://groovy.329449.n5.nabble.com/More-Groovy-3-woes-td5768022.html > {code:java} > === > 194 ocs /tmp> /* > * Copyright 2015 The Apache Software Foundation. > * OC: removed almost all code, leaving just what's needed to crash > */ > package org.apache.pdfbox.examples.signature; > import java.io.IOException; > import java.io.InputStream; > import java.security.KeyStore; > import java.security.KeyStoreException; > import java.security.NoSuchAlgorithmException; > import java.security.UnrecoverableKeyException; > import java.security.cert.CertificateException; > import > org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface; > public abstract class CreateSignatureBase implements SignatureInterface > { > public CreateSignatureBase(KeyStore keystore, char[] pin) > throws KeyStoreException, UnrecoverableKeyException, > NoSuchAlgorithmException, IOException, CertificateException > { } > @Override > public byte[] sign(InputStream content) throws IOException > { > return null; > } > } > 195 ocs /tmp> package cz.ocs.utilities > import groovy.transform.* > import org.apache.pdfbox.pdmodel.* > import org.apache.pdfbox.examples.signature.CreateSignatureBase > @InheritConstructors class CreateSignature extends CreateSignatureBase { > void signPDF(PDDocument pdd, OutputStream out) { > } > } > 196 ocs /tmp> /usr/local/groovy-2.4.17/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > 197 ocs /tmp> /usr/local/groovy-3.0.3/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/zh/h4cv6xjx033frtt9y72ch898gp/T/groovy-generated-8946934250394256568-java-source/cz/ocs/utilities/CreateSignature.java:12: > error: constructor CreateSignatureBase in class CreateSignatureBase cannot > be applied to given types; > @groovy.transform.InheritConstructors() public class CreateSignature >^ > required: KeyStore,char[] > found: no arguments > reason: actual and formal argument lists differ in length > 1 error > 1 error > 198 ocs /tmp> > === > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9556) Stub generated without the effect of AST transformation makes joint compilation fail
[ https://issues.apache.org/jira/browse/GROOVY-9556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17108922#comment-17108922 ] Daniel Sun commented on GROOVY-9556: As Java stubs are generated at the CONVERSION phase, if groovy source code uses AST tranformation which will change the AST at the phases after CONVERSION, e.g. {{@InheritConstructors}}, the generated Java stubs will not include the changes specified in the AST tranformation. If the changes is relied by the Java compilation, e.g. super class has its own constructors, its sub class should have some of the relevant constructors, otherwise the Java compilation will fail. > Stub generated without the effect of AST transformation makes joint > compilation fail > > > Key: GROOVY-9556 > URL: https://issues.apache.org/jira/browse/GROOVY-9556 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Priority: Major > > http://groovy.329449.n5.nabble.com/More-Groovy-3-woes-td5768022.html > {code:java} > === > 194 ocs /tmp> /* > * Copyright 2015 The Apache Software Foundation. > * OC: removed almost all code, leaving just what's needed to crash > */ > package org.apache.pdfbox.examples.signature; > import java.io.IOException; > import java.io.InputStream; > import java.security.KeyStore; > import java.security.KeyStoreException; > import java.security.NoSuchAlgorithmException; > import java.security.UnrecoverableKeyException; > import java.security.cert.CertificateException; > import > org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface; > public abstract class CreateSignatureBase implements SignatureInterface > { > public CreateSignatureBase(KeyStore keystore, char[] pin) > throws KeyStoreException, UnrecoverableKeyException, > NoSuchAlgorithmException, IOException, CertificateException > { } > @Override > public byte[] sign(InputStream content) throws IOException > { > return null; > } > } > 195 ocs /tmp> package cz.ocs.utilities > import groovy.transform.* > import org.apache.pdfbox.pdmodel.* > import org.apache.pdfbox.examples.signature.CreateSignatureBase > @InheritConstructors class CreateSignature extends CreateSignatureBase { > void signPDF(PDDocument pdd, OutputStream out) { > } > } > 196 ocs /tmp> /usr/local/groovy-2.4.17/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > 197 ocs /tmp> /usr/local/groovy-3.0.3/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/zh/h4cv6xjx033frtt9y72ch898gp/T/groovy-generated-8946934250394256568-java-source/cz/ocs/utilities/CreateSignature.java:12: > error: constructor CreateSignatureBase in class CreateSignatureBase cannot > be applied to given types; > @groovy.transform.InheritConstructors() public class CreateSignature >^ > required: KeyStore,char[] > found: no arguments > reason: actual and formal argument lists differ in length > 1 error > 1 error > 198 ocs /tmp> > === > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9556) Stub generated without the effect of AST transformation makes joint compilation fail
[ https://issues.apache.org/jira/browse/GROOVY-9556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9556: --- Summary: Stub generated without the effect of AST transformation makes joint compilation fail (was: Stub generated does not contain the effect of AST transformation during joint compilation) > Stub generated without the effect of AST transformation makes joint > compilation fail > > > Key: GROOVY-9556 > URL: https://issues.apache.org/jira/browse/GROOVY-9556 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Priority: Major > > http://groovy.329449.n5.nabble.com/More-Groovy-3-woes-td5768022.html > {code:java} > === > 194 ocs /tmp> /* > * Copyright 2015 The Apache Software Foundation. > * OC: removed almost all code, leaving just what's needed to crash > */ > package org.apache.pdfbox.examples.signature; > import java.io.IOException; > import java.io.InputStream; > import java.security.KeyStore; > import java.security.KeyStoreException; > import java.security.NoSuchAlgorithmException; > import java.security.UnrecoverableKeyException; > import java.security.cert.CertificateException; > import > org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface; > public abstract class CreateSignatureBase implements SignatureInterface > { > public CreateSignatureBase(KeyStore keystore, char[] pin) > throws KeyStoreException, UnrecoverableKeyException, > NoSuchAlgorithmException, IOException, CertificateException > { } > @Override > public byte[] sign(InputStream content) throws IOException > { > return null; > } > } > 195 ocs /tmp> package cz.ocs.utilities > import groovy.transform.* > import org.apache.pdfbox.pdmodel.* > import org.apache.pdfbox.examples.signature.CreateSignatureBase > @InheritConstructors class CreateSignature extends CreateSignatureBase { > void signPDF(PDDocument pdd, OutputStream out) { > } > } > 196 ocs /tmp> /usr/local/groovy-2.4.17/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > 197 ocs /tmp> /usr/local/groovy-3.0.3/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/zh/h4cv6xjx033frtt9y72ch898gp/T/groovy-generated-8946934250394256568-java-source/cz/ocs/utilities/CreateSignature.java:12: > error: constructor CreateSignatureBase in class CreateSignatureBase cannot > be applied to given types; > @groovy.transform.InheritConstructors() public class CreateSignature >^ > required: KeyStore,char[] > found: no arguments > reason: actual and formal argument lists differ in length > 1 error > 1 error > 198 ocs /tmp> > === > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9556) Stub generated does not contain the effect of AST transformation during joint compilation
[ https://issues.apache.org/jira/browse/GROOVY-9556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9556: --- Summary: Stub generated does not contain the effect of AST transformation during joint compilation (was: Joint compilation is broken in some cases) > Stub generated does not contain the effect of AST transformation during joint > compilation > - > > Key: GROOVY-9556 > URL: https://issues.apache.org/jira/browse/GROOVY-9556 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Priority: Major > > http://groovy.329449.n5.nabble.com/More-Groovy-3-woes-td5768022.html > {code:java} > === > 194 ocs /tmp> /* > * Copyright 2015 The Apache Software Foundation. > * OC: removed almost all code, leaving just what's needed to crash > */ > package org.apache.pdfbox.examples.signature; > import java.io.IOException; > import java.io.InputStream; > import java.security.KeyStore; > import java.security.KeyStoreException; > import java.security.NoSuchAlgorithmException; > import java.security.UnrecoverableKeyException; > import java.security.cert.CertificateException; > import > org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface; > public abstract class CreateSignatureBase implements SignatureInterface > { > public CreateSignatureBase(KeyStore keystore, char[] pin) > throws KeyStoreException, UnrecoverableKeyException, > NoSuchAlgorithmException, IOException, CertificateException > { } > @Override > public byte[] sign(InputStream content) throws IOException > { > return null; > } > } > 195 ocs /tmp> package cz.ocs.utilities > import groovy.transform.* > import org.apache.pdfbox.pdmodel.* > import org.apache.pdfbox.examples.signature.CreateSignatureBase > @InheritConstructors class CreateSignature extends CreateSignatureBase { > void signPDF(PDDocument pdd, OutputStream out) { > } > } > 196 ocs /tmp> /usr/local/groovy-2.4.17/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > 197 ocs /tmp> /usr/local/groovy-3.0.3/bin/groovyc -cp > /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/zh/h4cv6xjx033frtt9y72ch898gp/T/groovy-generated-8946934250394256568-java-source/cz/ocs/utilities/CreateSignature.java:12: > error: constructor CreateSignatureBase in class CreateSignatureBase cannot > be applied to given types; > @groovy.transform.InheritConstructors() public class CreateSignature >^ > required: KeyStore,char[] > found: no arguments > reason: actual and formal argument lists differ in length > 1 error > 1 error > 198 ocs /tmp> > === > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9556) Joint compilation is broken in some cases
Daniel Sun created GROOVY-9556: -- Summary: Joint compilation is broken in some cases Key: GROOVY-9556 URL: https://issues.apache.org/jira/browse/GROOVY-9556 Project: Groovy Issue Type: Bug Reporter: Daniel Sun http://groovy.329449.n5.nabble.com/More-Groovy-3-woes-td5768022.html {code:java} === 194 ocs /tmp> /usr/local/groovy-2.4.17/bin/groovyc -cp /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java 197 ocs /tmp> /usr/local/groovy-3.0.3/bin/groovyc -cp /Extensions/pdfbox-2.0.17.jar -j myclass.groovy CreateSignatureBase.java org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Compile error during compilation with javac. /var/folders/zh/h4cv6xjx033frtt9y72ch898gp/T/groovy-generated-8946934250394256568-java-source/cz/ocs/utilities/CreateSignature.java:12: error: constructor CreateSignatureBase in class CreateSignatureBase cannot be applied to given types; @groovy.transform.InheritConstructors() public class CreateSignature ^ required: KeyStore,char[] found: no arguments reason: actual and formal argument lists differ in length 1 error 1 error 198 ocs /tmp> === {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9542) Illegal reflective access java.lang.AssertionError(java.lang.String)
[ https://issues.apache.org/jira/browse/GROOVY-9542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17108413#comment-17108413 ] Daniel Sun commented on GROOVY-9542: {{AssertionError}} has two constructors to match the argument of {{String}} type: [[private AssertionError(java.lang.String)]] and [[public AssertionError(java.lang.Object)]] The calculated distance of the former constructor is 0, so it is chosen and warning is emitted... But it's dangerous to change the logic of choosing constructor, because constructors may have different logic even if they have compatible parameter types. However we have to change the logic... because the illegal acess will be forbidden in some futher Java release. > Illegal reflective access java.lang.AssertionError(java.lang.String) > > > Key: GROOVY-9542 > URL: https://issues.apache.org/jira/browse/GROOVY-9542 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Priority: Major > > ([https://github.com/apache/groovy/runs/647840451?check_suite_focus=true]) > > WARNING: Illegal reflective access by > org.codehaus.groovy.reflection.ReflectionUtils > ([file:/home/runner/work/groovy/groovy/target/libs/groovy-raw-4.0.0-SNAPSHOT.jar|file://home/runner/work/groovy/groovy/target/libs/groovy-raw-4.0.0-SNAPSHOT.jar]) > to constructor java.lang.AssertionError(java.lang.String) > [397|https://github.com/apache/groovy/runs/647840451#step:5:397]> Task > :groovy-test:test > [398|https://github.com/apache/groovy/runs/647840451#step:5:398]WARNING: > Please consider reporting this to the maintainers of > org.codehaus.groovy.reflection.ReflectionUtils > [399|https://github.com/apache/groovy/runs/647840451#step:5:399]WARNING: Use > --illegal-access=warn to enable warnings of further illegal reflective access > operations > [400|https://github.com/apache/groovy/runs/647840451#step:5:400]WARNING: All > illegal access operations will be denied in a future release -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9522) Throwing NPE when I use ternary operator with something special
[ https://issues.apache.org/jira/browse/GROOVY-9522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9522. Resolution: Fixed > Throwing NPE when I use ternary operator with something special > --- > > Key: GROOVY-9522 > URL: https://issues.apache.org/jira/browse/GROOVY-9522 > Project: Groovy > Issue Type: Bug > Components: parser >Affects Versions: 3.0.3 > Environment: Win10/MacOS > Zulu OpenJDK 11 >Reporter: Huabin Zhang >Assignee: Daniel Sun >Priority: Critical > Fix For: 4.0.0-alpha-1, 3.0.4 > > > Hi, I got NPE instead of empty string when I wrote the following snippet: > > {code:java} > static String a() { > null > } > static String b() { > '' > } > def x = a() ? [b(), a()].join(',') : b() // NPE > //def x = a() ? [b(), a()] : b() // OK > //def x = a() ? ([b(), a()]).join(',') : b() // OK > x == '' > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (GROOVY-9522) Throwing NPE when I use ternary operator with something special
[ https://issues.apache.org/jira/browse/GROOVY-9522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun reassigned GROOVY-9522: -- Assignee: Daniel Sun > Throwing NPE when I use ternary operator with something special > --- > > Key: GROOVY-9522 > URL: https://issues.apache.org/jira/browse/GROOVY-9522 > Project: Groovy > Issue Type: Bug > Components: parser >Affects Versions: 3.0.3 > Environment: Win10/MacOS > Zulu OpenJDK 11 >Reporter: Huabin Zhang >Assignee: Daniel Sun >Priority: Critical > Fix For: 4.0.0-alpha-1, 3.0.4 > > > Hi, I got NPE instead of empty string when I wrote the following snippet: > > {code:java} > static String a() { > null > } > static String b() { > '' > } > def x = a() ? [b(), a()].join(',') : b() // NPE > //def x = a() ? [b(), a()] : b() // OK > //def x = a() ? ([b(), a()]).join(',') : b() // OK > x == '' > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9522) Throwing NPE when I use ternary operator with something special
[ https://issues.apache.org/jira/browse/GROOVY-9522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9522: --- Fix Version/s: 3.0.4 4.0.0-alpha-1 > Throwing NPE when I use ternary operator with something special > --- > > Key: GROOVY-9522 > URL: https://issues.apache.org/jira/browse/GROOVY-9522 > Project: Groovy > Issue Type: Bug > Components: parser >Affects Versions: 3.0.3 > Environment: Win10/MacOS > Zulu OpenJDK 11 >Reporter: Huabin Zhang >Priority: Critical > Fix For: 4.0.0-alpha-1, 3.0.4 > > > Hi, I got NPE instead of empty string when I wrote the following snippet: > > {code:java} > static String a() { > null > } > static String b() { > '' > } > def x = a() ? [b(), a()].join(',') : b() // NPE > //def x = a() ? [b(), a()] : b() // OK > //def x = a() ? ([b(), a()]).join(',') : b() // OK > x == '' > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9522) Throwing NPE when I use ternary operator with something special
[ https://issues.apache.org/jira/browse/GROOVY-9522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17104985#comment-17104985 ] Daniel Sun commented on GROOVY-9522: The following PR should be able to fix the issue: https://github.com/apache/groovy/pull/1246 > Throwing NPE when I use ternary operator with something special > --- > > Key: GROOVY-9522 > URL: https://issues.apache.org/jira/browse/GROOVY-9522 > Project: Groovy > Issue Type: Bug > Components: parser >Affects Versions: 3.0.3 > Environment: Win10/MacOS > Zulu OpenJDK 11 >Reporter: Huabin Zhang >Priority: Critical > > Hi, I got NPE instead of empty string when I wrote the following snippet: > > {code:java} > static String a() { > null > } > static String b() { > '' > } > def x = a() ? [b(), a()].join(',') : b() // NPE > //def x = a() ? [b(), a()] : b() // OK > //def x = a() ? ([b(), a()]).join(',') : b() // OK > x == '' > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9522) Throwing NPE when I use ternary operator with something special
[ https://issues.apache.org/jira/browse/GROOVY-9522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17104071#comment-17104071 ] Daniel Sun commented on GROOVY-9522: Groovy 3 supports the following argument syntax, which is NOT supported by Groovy 2 {code:java} def m(p) { println p } // yield [a:1] m('a') : 1 {code} We should forbidden the syntax in Groovy 3 too, thus the ambiguities of this issue should be eliminated. > Throwing NPE when I use ternary operator with something special > --- > > Key: GROOVY-9522 > URL: https://issues.apache.org/jira/browse/GROOVY-9522 > Project: Groovy > Issue Type: Bug > Components: parser >Affects Versions: 3.0.3 > Environment: Win10/MacOS > Zulu OpenJDK 11 >Reporter: Huabin Zhang >Priority: Critical > > Hi, I got NPE instead of empty string when I wrote the following snippet: > > {code:java} > static String a() { > null > } > static String b() { > '' > } > def x = a() ? [b(), a()].join(',') : b() // NPE > //def x = a() ? [b(), a()] : b() // OK > //def x = a() ? ([b(), a()]).join(',') : b() // OK > x == '' > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (GROOVY-9544) Bump gradle to 6.4
[ https://issues.apache.org/jira/browse/GROOVY-9544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun closed GROOVY-9544. -- Assignee: Daniel Sun Resolution: Fixed > Bump gradle to 6.4 > -- > > Key: GROOVY-9544 > URL: https://issues.apache.org/jira/browse/GROOVY-9544 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9544) Bump gradle to 6.4
Daniel Sun created GROOVY-9544: -- Summary: Bump gradle to 6.4 Key: GROOVY-9544 URL: https://issues.apache.org/jira/browse/GROOVY-9544 Project: Groovy Issue Type: Dependency upgrade Reporter: Daniel Sun Fix For: 4.0.0-alpha-1, 3.0.4 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9543) groovydoc multiple issues with generics
[ https://issues.apache.org/jira/browse/GROOVY-9543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9543. Fix Version/s: 3.0.4 4.0.0-alpha-1 Assignee: Daniel Sun Resolution: Fixed The proposed PR has been merged. Thanks a lot for your contribution! > groovydoc multiple issues with generics > --- > > Key: GROOVY-9543 > URL: https://issues.apache.org/jira/browse/GROOVY-9543 > Project: Groovy > Issue Type: Bug > Components: GroovyDoc >Reporter: Mikko Värri >Assignee: Daniel Sun >Priority: Major > Labels: pull-request-available > Fix For: 4.0.0-alpha-1, 3.0.4 > > Attachments: class-type-param-doc-issue.png, > groovy-method-type-param-issue.png, groovy-title-issue.png, > java-title-issue.png, java-type-param-issue.png, > method-type-param-doc-issue.png > > Time Spent: 20m > Remaining Estimate: 0h > > The HTML output of groovydoc doesn't handle generics very well. > # For Java code, the angle brackets are not shown in the title > !java-title-issue.png! > # For Groovy code, any type param bounds are dropped from the title > !groovy-title-issue.png! > # For both Java and Groovy, angle brackets in class type param docs > ({{@param Blah.}}) are not escaped > !class-type-param-doc-issue.png! > and same for method type param docs > !method-type-param-doc-issue.png! > # For Java code, method type params are not shown (they are shown for Groovy > code) > !java-type-param-issue.png! > # For Groovy code, method params and return types show raw types, even > though it shows method type params, which makes it confusing > !groovy-method-type-param-issue.png! -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9501) MissingPropertyException for access to private static field from inner class when subclassing
[ https://issues.apache.org/jira/browse/GROOVY-9501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9501. Fix Version/s: 3.0.4 4.0.0-alpha-1 Resolution: Fixed > MissingPropertyException for access to private static field from inner class > when subclassing > - > > Key: GROOVY-9501 > URL: https://issues.apache.org/jira/browse/GROOVY-9501 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.5.10 >Reporter: Eric Milles >Assignee: Eric Milles >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 20m > Remaining Estimate: 0h > > Consider the following: > {code:groovy} > class Main extends Outer { > static main(args) { > newInstance().newThread() > } > } > abstract class Outer { > private static volatile boolean flag > protected void newThread() { > Thread thread = new Inner() > thread.start() > thread.join() > } > private final class Inner extends Thread { > void run() { > try { > if (!flag) { > sleep(1000) > } > } catch (Throwable t) { > t.printStackTrace() > } > } > } > } > {code} > In this example, {{Main}} extends {{Outer}} and is the type that is > instantiated and used. {{Inner}} makes reference to private static field > {{flag}} of {{Outer}}. When {{Inner}} is non-static as in this example, it > gets the following error when reading "flag": > {code} > groovy.lang.MissingPropertyException: No such property: flag for class: Main > Possible solutions: class > at > org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:65) > at > org.codehaus.groovy.runtime.callsite.GetEffectivePogoPropertySite.getProperty(GetEffectivePogoPropertySite.java:87) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:309) > at Outer$Inner.run(Script1.groovy:20) > {code} > *Note*: changing {{Inner}} from final to static fixes this specific case. > However, non-static inners that need to be that way are going to have this > problem. > This is possibly related to: GROOVY-8999, et al. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9542) Illegal reflective access java.lang.AssertionError(java.lang.String)
[ https://issues.apache.org/jira/browse/GROOVY-9542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9542: --- Description: ([https://github.com/apache/groovy/runs/647840451?check_suite_focus=true]) WARNING: Illegal reflective access by org.codehaus.groovy.reflection.ReflectionUtils ([file:/home/runner/work/groovy/groovy/target/libs/groovy-raw-4.0.0-SNAPSHOT.jar|file://home/runner/work/groovy/groovy/target/libs/groovy-raw-4.0.0-SNAPSHOT.jar]) to constructor java.lang.AssertionError(java.lang.String) [397|https://github.com/apache/groovy/runs/647840451#step:5:397]> Task :groovy-test:test [398|https://github.com/apache/groovy/runs/647840451#step:5:398]WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.ReflectionUtils [399|https://github.com/apache/groovy/runs/647840451#step:5:399]WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations [400|https://github.com/apache/groovy/runs/647840451#step:5:400]WARNING: All illegal access operations will be denied in a future release was: WARNING: Illegal reflective access by org.codehaus.groovy.reflection.ReflectionUtils (file:/home/runner/work/groovy/groovy/target/libs/groovy-raw-4.0.0-SNAPSHOT.jar) to constructor java.lang.AssertionError(java.lang.String) [397|https://github.com/apache/groovy/runs/647840451#step:5:397]> Task :groovy-test:test [398|https://github.com/apache/groovy/runs/647840451#step:5:398]WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.ReflectionUtils [399|https://github.com/apache/groovy/runs/647840451#step:5:399]WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations [400|https://github.com/apache/groovy/runs/647840451#step:5:400]WARNING: All illegal access operations will be denied in a future release > Illegal reflective access java.lang.AssertionError(java.lang.String) > > > Key: GROOVY-9542 > URL: https://issues.apache.org/jira/browse/GROOVY-9542 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Priority: Major > > ([https://github.com/apache/groovy/runs/647840451?check_suite_focus=true]) > > WARNING: Illegal reflective access by > org.codehaus.groovy.reflection.ReflectionUtils > ([file:/home/runner/work/groovy/groovy/target/libs/groovy-raw-4.0.0-SNAPSHOT.jar|file://home/runner/work/groovy/groovy/target/libs/groovy-raw-4.0.0-SNAPSHOT.jar]) > to constructor java.lang.AssertionError(java.lang.String) > [397|https://github.com/apache/groovy/runs/647840451#step:5:397]> Task > :groovy-test:test > [398|https://github.com/apache/groovy/runs/647840451#step:5:398]WARNING: > Please consider reporting this to the maintainers of > org.codehaus.groovy.reflection.ReflectionUtils > [399|https://github.com/apache/groovy/runs/647840451#step:5:399]WARNING: Use > --illegal-access=warn to enable warnings of further illegal reflective access > operations > [400|https://github.com/apache/groovy/runs/647840451#step:5:400]WARNING: All > illegal access operations will be denied in a future release -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9542) Illegal reflective access java.lang.AssertionError(java.lang.String)
Daniel Sun created GROOVY-9542: -- Summary: Illegal reflective access java.lang.AssertionError(java.lang.String) Key: GROOVY-9542 URL: https://issues.apache.org/jira/browse/GROOVY-9542 Project: Groovy Issue Type: Bug Reporter: Daniel Sun WARNING: Illegal reflective access by org.codehaus.groovy.reflection.ReflectionUtils (file:/home/runner/work/groovy/groovy/target/libs/groovy-raw-4.0.0-SNAPSHOT.jar) to constructor java.lang.AssertionError(java.lang.String) [397|https://github.com/apache/groovy/runs/647840451#step:5:397]> Task :groovy-test:test [398|https://github.com/apache/groovy/runs/647840451#step:5:398]WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.ReflectionUtils [399|https://github.com/apache/groovy/runs/647840451#step:5:399]WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations [400|https://github.com/apache/groovy/runs/647840451#step:5:400]WARNING: All illegal access operations will be denied in a future release -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9529) Static type checking сannot choose between Map#getAt(Object) and Object#getAt(String) methods
[ https://issues.apache.org/jira/browse/GROOVY-9529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9529. Fix Version/s: 3.0.4 4.0.0-alpha-1 Resolution: Fixed > Static type checking сannot choose between Map#getAt(Object) and > Object#getAt(String) methods > - > > Key: GROOVY-9529 > URL: https://issues.apache.org/jira/browse/GROOVY-9529 > Project: Groovy > Issue Type: Bug > Components: Static compilation >Affects Versions: 3.0.3 > Environment: Groovy Version: 3.0.3 JVM: 11.0.7 Vendor: Azul Systems, > Inc. OS: Linux >Reporter: Aleksey >Assignee: Eric Milles >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 0.5h > Remaining Estimate: 0h > > Script: > {code:groovy} > import groovy.transform.CompileStatic > interface SimpleFeatureMap extends Map {} > interface FeatureMap extends SimpleFeatureMap{} > class FeatureMapImpl extends HashMap implements FeatureMap {} > @CompileStatic > class Test { > FeatureMap newMap() { > new FeatureMapImpl() > } > String test() { > FeatureMap map = newMap() > map['asd'] > } > } > new Test().test() > {code} > Result: > {noformat} > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > ideaGroovyConsole.groovy: 14: [Static type checking] - Reference to method is > ambiguous. Cannot choose between [V java.util.Map V>#getAt(java.lang.Object), java.lang.Object > java.lang.Object#getAt(java.lang.String)] > @ line 14, column 9. >map['asd'] >^ > 1 error > at > org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:287) > at > org.codehaus.groovy.control.CompilationUnit$IPrimaryClassNodeOperation.doPhaseOperation(CompilationUnit.java:963) > at > org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:650) > at > org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:627) > at > groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:389) > at > groovy.lang.GroovyClassLoader.lambda$parseClass$3(GroovyClassLoader.java:332) > at > org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163) > at > org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154) > at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:330) > at groovy.lang.GroovyShell.parseClass(GroovyShell.java:526) > at groovy.lang.GroovyShell.run(GroovyShell.java:359) > at groovy.lang.GroovyShell.run(GroovyShell.java:339) > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-8057) Terrible performance when enabling indy
[ https://issues.apache.org/jira/browse/GROOVY-8057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-8057. Resolution: Duplicate > Terrible performance when enabling indy > --- > > Key: GROOVY-8057 > URL: https://issues.apache.org/jira/browse/GROOVY-8057 > Project: Groovy > Issue Type: Bug >Affects Versions: 3.0.0-alpha-1 > Environment: Java 8, TeamCity > instance(http://ci.groovy-lang.org/viewType.html?buildTypeId=Groovy_Antlr4grammar) >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Critical > > When enabling indy by default, running test cases cost much more time than > before(http://ci.groovy-lang.org/viewType.html?buildTypeId=Groovy_Antlr4grammar). > Indy(costs1h:37m): > http://ci.groovy-lang.org/viewLog.html?buildId=37256&tab=buildResultsDiv&buildTypeId=Groovy_Antlr4grammar > no Indy(costs 21m:59s): > http://ci.groovy-lang.org/viewLog.html?buildId=37254&tab=buildResultsDiv&buildTypeId=Groovy_Antlr4grammar -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (GROOVY-8057) Terrible performance when enabling indy
[ https://issues.apache.org/jira/browse/GROOVY-8057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun reassigned GROOVY-8057: -- Assignee: Daniel Sun > Terrible performance when enabling indy > --- > > Key: GROOVY-8057 > URL: https://issues.apache.org/jira/browse/GROOVY-8057 > Project: Groovy > Issue Type: Bug >Affects Versions: 3.0.0-alpha-1 > Environment: Java 8, TeamCity > instance(http://ci.groovy-lang.org/viewType.html?buildTypeId=Groovy_Antlr4grammar) >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Critical > > When enabling indy by default, running test cases cost much more time than > before(http://ci.groovy-lang.org/viewType.html?buildTypeId=Groovy_Antlr4grammar). > Indy(costs1h:37m): > http://ci.groovy-lang.org/viewLog.html?buildId=37256&tab=buildResultsDiv&buildTypeId=Groovy_Antlr4grammar > no Indy(costs 21m:59s): > http://ci.groovy-lang.org/viewLog.html?buildId=37254&tab=buildResultsDiv&buildTypeId=Groovy_Antlr4grammar -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9526) Failed to reload classes with generic parameters
[ https://issues.apache.org/jira/browse/GROOVY-9526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9526. Resolution: Fixed > Failed to reload classes with generic parameters > > > Key: GROOVY-9526 > URL: https://issues.apache.org/jira/browse/GROOVY-9526 > Project: Groovy > Issue Type: Bug > Components: GroovyScriptEngine >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 10m > Remaining Estimate: 0h > > See [https://github.com/apache/groovy/pull/1168] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (GROOVY-9527) Bump javaparser to 3.15.21
[ https://issues.apache.org/jira/browse/GROOVY-9527?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun closed GROOVY-9527. -- Assignee: Daniel Sun Resolution: Fixed > Bump javaparser to 3.15.21 > -- > > Key: GROOVY-9527 > URL: https://issues.apache.org/jira/browse/GROOVY-9527 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9527) Bump javaparser to 3.15.21
Daniel Sun created GROOVY-9527: -- Summary: Bump javaparser to 3.15.21 Key: GROOVY-9527 URL: https://issues.apache.org/jira/browse/GROOVY-9527 Project: Groovy Issue Type: Bug Reporter: Daniel Sun Fix For: 4.0.0-alpha-1, 3.0.4 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9526) Failed to reload classes with generic parameters
[ https://issues.apache.org/jira/browse/GROOVY-9526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17092165#comment-17092165 ] Daniel Sun commented on GROOVY-9526: [~paulk] Yep. The issue should be fixed by [https://github.com/apache/groovy/pull/1232] > Failed to reload classes with generic parameters > > > Key: GROOVY-9526 > URL: https://issues.apache.org/jira/browse/GROOVY-9526 > Project: Groovy > Issue Type: Bug > Components: GroovyScriptEngine >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 10m > Remaining Estimate: 0h > > See [https://github.com/apache/groovy/pull/1168] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9398) GroovyScriptEngine cannot recompile a class that uses generic parameters
[ https://issues.apache.org/jira/browse/GROOVY-9398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9398. Assignee: Daniel Sun Resolution: Duplicate > GroovyScriptEngine cannot recompile a class that uses generic parameters > > > Key: GROOVY-9398 > URL: https://issues.apache.org/jira/browse/GROOVY-9398 > Project: Groovy > Issue Type: Bug >Reporter: JAMIE ECHLIN >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > > The error is: > {code} > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > map://local/SubClass.groovy: 2: The class BaseClass (supplied > with 1 type parameter) refers to the class BaseClass which takes no parameters > {code} > I created a test which demonstrates the problem: > https://github.com/apache/groovy/pull/1168 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9398) GroovyScriptEngine cannot recompile a class that uses generic parameters
[ https://issues.apache.org/jira/browse/GROOVY-9398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9398: --- Fix Version/s: 3.0.4 4.0.0-alpha-1 > GroovyScriptEngine cannot recompile a class that uses generic parameters > > > Key: GROOVY-9398 > URL: https://issues.apache.org/jira/browse/GROOVY-9398 > Project: Groovy > Issue Type: Bug >Reporter: JAMIE ECHLIN >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > > The error is: > {code} > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > map://local/SubClass.groovy: 2: The class BaseClass (supplied > with 1 type parameter) refers to the class BaseClass which takes no parameters > {code} > I created a test which demonstrates the problem: > https://github.com/apache/groovy/pull/1168 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (GROOVY-9526) Failed to reload classes with generic parameters
[ https://issues.apache.org/jira/browse/GROOVY-9526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun reassigned GROOVY-9526: -- Assignee: Daniel Sun > Failed to reload classes with generic parameters > > > Key: GROOVY-9526 > URL: https://issues.apache.org/jira/browse/GROOVY-9526 > Project: Groovy > Issue Type: Bug > Components: GroovyScriptEngine >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 10m > Remaining Estimate: 0h > > See [https://github.com/apache/groovy/pull/1168] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9526) Failed to reload classes with generic parameters
[ https://issues.apache.org/jira/browse/GROOVY-9526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9526: --- Fix Version/s: 3.0.4 4.0.0-alpha-1 > Failed to reload classes with generic parameters > > > Key: GROOVY-9526 > URL: https://issues.apache.org/jira/browse/GROOVY-9526 > Project: Groovy > Issue Type: Bug > Components: GroovyScriptEngine >Reporter: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 10m > Remaining Estimate: 0h > > See [https://github.com/apache/groovy/pull/1168] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9526) Failed to reload classes with generic parameters
Daniel Sun created GROOVY-9526: -- Summary: Failed to reload classes with generic parameters Key: GROOVY-9526 URL: https://issues.apache.org/jira/browse/GROOVY-9526 Project: Groovy Issue Type: Bug Components: GroovyScriptEngine Reporter: Daniel Sun See [https://github.com/apache/groovy/pull/1168] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9522) Throwing NPE when I use ternary operator with something special
[ https://issues.apache.org/jira/browse/GROOVY-9522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17091333#comment-17091333 ] Daniel Sun commented on GROOVY-9522: FYI. http://groovy-lang.org/releasenotes/groovy-3.0.html {code:java} String[] array = ['a', 'b'] assert 'b' == array?[1] // get using normal array index array?[1] = 'c' // set using normal array index assert 'c' == array?[1] array = null assert null == array?[1] // return null for all index values array?[1] = 'c' // quietly ignore attempt to set value assert null == array?[1] def personInfo = [name: 'Daniel.Sun', location: 'Shanghai'] assert 'Daniel.Sun' == personInfo?['name'] // get using normal map index personInfo?['name'] = 'sunlan' // set using normal map index assert 'sunlan' == personInfo?['name'] personInfo = null assert null == personInfo?['name'] // return null for all map values personInfo?['name'] = 'sunlan' // quietly ignore attempt to set value assert null == personInfo?['name'] {code} > Throwing NPE when I use ternary operator with something special > --- > > Key: GROOVY-9522 > URL: https://issues.apache.org/jira/browse/GROOVY-9522 > Project: Groovy > Issue Type: Bug > Components: parser >Affects Versions: 3.0.3 > Environment: Win10/MacOS > Zulu OpenJDK 11 >Reporter: Huabin Zhang >Priority: Critical > > Hi, I got NPE instead of empty string when I wrote the following snippet: > > {code:java} > static String a() { > null > } > static String b() { > '' > } > def x = a() ? [b(), a()].join(',') : b() // NPE > //def x = a() ? [b(), a()] : b() // OK > //def x = a() ? ([b(), a()]).join(',') : b() // OK > x == '' > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9522) Throwing NPE when I use ternary operator with something special
[ https://issues.apache.org/jira/browse/GROOVY-9522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17091257#comment-17091257 ] Daniel Sun commented on GROOVY-9522: [~paulk] How about making {{?[}} a real operator? > Throwing NPE when I use ternary operator with something special > --- > > Key: GROOVY-9522 > URL: https://issues.apache.org/jira/browse/GROOVY-9522 > Project: Groovy > Issue Type: Bug > Components: parser >Affects Versions: 3.0.3 > Environment: Win10/MacOS > Zulu OpenJDK 11 >Reporter: Huabin Zhang >Priority: Critical > > Hi, I got NPE instead of empty string when I wrote the following snippet: > > {code:java} > static String a() { > null > } > static String b() { > '' > } > def x = a() ? [b(), a()].join(',') : b() // NPE > //def x = a() ? [b(), a()] : b() // OK > //def x = a() ? ([b(), a()]).join(',') : b() // OK > x == '' > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9522) Throwing NPE when I use ternary operator with something special
[ https://issues.apache.org/jira/browse/GROOVY-9522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17091256#comment-17091256 ] Daniel Sun commented on GROOVY-9522: You can avoid ambiguities via parentheses: {code:java} def x = a() ? ([b(), a()].join(',')) : b() {code} P.S. {{?[]}} is introduced since 3.0.0 as safe indexing, which introduces some ambiguities too. > Throwing NPE when I use ternary operator with something special > --- > > Key: GROOVY-9522 > URL: https://issues.apache.org/jira/browse/GROOVY-9522 > Project: Groovy > Issue Type: Bug > Components: parser >Affects Versions: 3.0.3 > Environment: Win10/MacOS > Zulu OpenJDK 11 >Reporter: Huabin Zhang >Priority: Critical > > Hi, I got NPE instead of empty string when I wrote the following snippet: > > {code:java} > static String a() { > null > } > static String b() { > '' > } > def x = a() ? [b(), a()].join(',') : b() // NPE > //def x = a() ? [b(), a()] : b() // OK > //def x = a() ? ([b(), a()]).join(',') : b() // OK > x == '' > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9518) Closure argument types not inferred when calling a constructor
[ https://issues.apache.org/jira/browse/GROOVY-9518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9518. Fix Version/s: 3.0.4 4.0.0-alpha-1 Resolution: Fixed > Closure argument types not inferred when calling a constructor > -- > > Key: GROOVY-9518 > URL: https://issues.apache.org/jira/browse/GROOVY-9518 > Project: Groovy > Issue Type: Bug > Components: Static Type Checker >Affects Versions: 2.5.11 >Reporter: Mauro Molinari >Assignee: Eric Milles >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 0.5h > Remaining Estimate: 0h > > Consider this Java class: > {code:java} > package test64; > import java.util.List; > import java.util.function.BiConsumer; > public class Test64J { > public Test64J(String foo, BiConsumer> > bar) { > } > > public void doSomething(String foo, BiConsumer List> bar) { > } > } > {code} > and this Groovy class: > {code:groovy} > package test64 > import groovy.transform.CompileStatic > @CompileStatic > class Test64 { > void foobar() { > Test64J j = new Test64J('hello', { foo, bar -> > println(bar.size()) > }) > > j.doSomething('hello') { foo, bar -> > println(bar.size()) > } > } > } > {code} > The static type checker fails to infer types for {{foo}} and {{bar}} closure > arguments in the constructor call (hence compilation fails on the first > {{println}} call, because it does not know {{bar}} is a {{List}}), while it > succeeds to do the same thing in the method call. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9517) CompileStatic typeCasting runtime error from Class Array to Class List
[ https://issues.apache.org/jira/browse/GROOVY-9517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9517. Fix Version/s: 3.0.4 4.0.0-alpha-1 Resolution: Fixed > CompileStatic typeCasting runtime error from Class Array to Class List > -- > > Key: GROOVY-9517 > URL: https://issues.apache.org/jira/browse/GROOVY-9517 > Project: Groovy > Issue Type: Bug > Components: Static compilation >Affects Versions: 2.4.19, 3.0.3, 2.5.11 > Environment: Java: openjdk version "1.8.0_242" > OS: OS X Catalina 10.15.3 > Groovy: 2.4.19 >Reporter: David Estes >Assignee: Eric Milles >Priority: Major > Labels: CompileStatic > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 20m > Remaining Estimate: 0h > > After upgrading asset-pipeline-core from groovy 2.0.7 to 2.4.15 then 2.4.19 . > A bug was identified with @CompileStatic not properly handling runtime type > casting when sorting an Array instead of a List > > Example > > Create File TestFile.groovy > {code:java} > import groovy.transform.CompileStaticpublic class TestFile { > static void main(String[] args) { > File file = new File('.') > TestFile testFile = new TestFile() > testFile.listSortedFiles(file) > } > @CompileStatic > void listSortedFiles(File directory) { > File[] files = directory.listFiles() > files = files?.sort { File a, File b -> a.name.compareTo b.name } as > File[] > for(File file in files) { > } > } > > > } > {code} > Then simply run: > {code:java} > groovy TestFile.groovy > {code} > > Exception: > > {code:java} > Caught: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to > [Ljava.io.File; > java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to > [Ljava.io.File; > at TestFile.listSortedFiles(TestFile.groovy:15) > at TestFile$listSortedFiles.call(Unknown Source) > at TestFile.main(TestFile.groovy:8) > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9515) MethodHandle with spread args should not be cached
[ https://issues.apache.org/jira/browse/GROOVY-9515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9515: --- Description: {code:java} import org.codehaus.groovy.control.CompilerConfiguration def config = new CompilerConfiguration() config.optimizationOptions.indy = true new GroovyShell(config).evaluate ''' def x(int a) {a} def x(int a, int b) {a + b} def y(p) { x(*p) } assert 1 == y([1]) assert 3 == y([1, 2]) ''' {code} Error message: {code:java} java.lang.IllegalArgumentException: array is not of length 1 at Script1.y(Script1.groovy:5) at Script1.run(Script1.groovy:8) at ConsoleScript1.run(ConsoleScript1:5) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) {code} > MethodHandle with spread args should not be cached > -- > > Key: GROOVY-9515 > URL: https://issues.apache.org/jira/browse/GROOVY-9515 > Project: Groovy > Issue Type: Bug > Components: Compiler >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 20m > Remaining Estimate: 0h > > {code:java} > import org.codehaus.groovy.control.CompilerConfiguration > def config = new CompilerConfiguration() > config.optimizationOptions.indy = true > new GroovyShell(config).evaluate ''' > def x(int a) {a} > def x(int a, int b) {a + b} > def y(p) { > x(*p) > } > assert 1 == y([1]) > assert 3 == y([1, 2]) > ''' > {code} > Error message: > {code:java} > java.lang.IllegalArgumentException: array is not of length 1 > at Script1.y(Script1.groovy:5) > at Script1.run(Script1.groovy:8) > at ConsoleScript1.run(ConsoleScript1:5) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9515) MethodHandle with spread args should not be cached
[ https://issues.apache.org/jira/browse/GROOVY-9515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9515: --- Component/s: Compiler > MethodHandle with spread args should not be cached > -- > > Key: GROOVY-9515 > URL: https://issues.apache.org/jira/browse/GROOVY-9515 > Project: Groovy > Issue Type: Bug > Components: Compiler >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9515) MethodHandle with spread args should not be cached
[ https://issues.apache.org/jira/browse/GROOVY-9515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9515. Resolution: Fixed > MethodHandle with spread args should not be cached > -- > > Key: GROOVY-9515 > URL: https://issues.apache.org/jira/browse/GROOVY-9515 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9515) MethodHandle with spread args should not be cached
Daniel Sun created GROOVY-9515: -- Summary: MethodHandle with spread args should not be cached Key: GROOVY-9515 URL: https://issues.apache.org/jira/browse/GROOVY-9515 Project: Groovy Issue Type: Bug Reporter: Daniel Sun Assignee: Daniel Sun Fix For: 4.0.0-alpha-1, 3.0.4 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (GROOVY-9514) Remove antlr2 parser
[ https://issues.apache.org/jira/browse/GROOVY-9514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun closed GROOVY-9514. -- Fix Version/s: 4.0.0-alpha-1 Resolution: Fixed Fixed by [https://github.com/apache/groovy/commit/fee8d39c539d65d5c851fb7fab4e57cfaa76a5cc] > Remove antlr2 parser > > > Key: GROOVY-9514 > URL: https://issues.apache.org/jira/browse/GROOVY-9514 > Project: Groovy > Issue Type: Improvement > Components: parser-antlr2 >Reporter: Daniel Sun >Assignee: Paul King >Priority: Major > Fix For: 4.0.0-alpha-1 > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9514) Remove antlr2 parser
Daniel Sun created GROOVY-9514: -- Summary: Remove antlr2 parser Key: GROOVY-9514 URL: https://issues.apache.org/jira/browse/GROOVY-9514 Project: Groovy Issue Type: Improvement Components: parser-antlr2 Reporter: Daniel Sun Assignee: Paul King -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9513) Enable indy by default
Daniel Sun created GROOVY-9513: -- Summary: Enable indy by default Key: GROOVY-9513 URL: https://issues.apache.org/jira/browse/GROOVY-9513 Project: Groovy Issue Type: Improvement Reporter: Daniel Sun Assignee: Daniel Sun Fix For: 4.0.0-alpha-1 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9507) JSP style loop in StreamingTemplateEngine template results in TemplateParseException
[ https://issues.apache.org/jira/browse/GROOVY-9507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9507. Resolution: Fixed > JSP style loop in StreamingTemplateEngine template results in > TemplateParseException > > > Key: GROOVY-9507 > URL: https://issues.apache.org/jira/browse/GROOVY-9507 > Project: Groovy > Issue Type: Bug > Components: Templating >Affects Versions: 3.0.3 >Reporter: Christopher Chase >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > > > The example below works as expected when run in Groovy 2.5.8, yet it fails > when run in Groovy 3.0.3 > > > {code:java} > TemplateEngine engine = new StreamingTemplateEngine() > Template template = engine.createTemplate(''' > > <% items.each { %> > ${it} > <% } %> > > ''') > println template.make([items : [1,2,3,4]]) > {code} > > Expected output (and the output 2.5.8 yields): > > {noformat} > > > 1 > > 2 > > 3 > > 4 > > > {noformat} > > Exception 3.0.3 gives: > > {noformat} > Exception in thread "main" groovy.text.TemplateParseException: Template parse > error 'Unexpected input: '{'; Expecting RBRACE ' at line 3, column 27 > 2: > --> 3: <% items.each { %> > 4: ${it}{noformat} > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9507) JSP style loop in StreamingTemplateEngine template results in TemplateParseException
[ https://issues.apache.org/jira/browse/GROOVY-9507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17085887#comment-17085887 ] Daniel Sun commented on GROOVY-9507: Fixed by [https://github.com/apache/groovy/commit/cb05f9acc4696f206e2d804c973edbfc04636c3f] > JSP style loop in StreamingTemplateEngine template results in > TemplateParseException > > > Key: GROOVY-9507 > URL: https://issues.apache.org/jira/browse/GROOVY-9507 > Project: Groovy > Issue Type: Bug > Components: Templating >Affects Versions: 3.0.3 >Reporter: Christopher Chase >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > > > The example below works as expected when run in Groovy 2.5.8, yet it fails > when run in Groovy 3.0.3 > > > {code:java} > TemplateEngine engine = new StreamingTemplateEngine() > Template template = engine.createTemplate(''' > > <% items.each { %> > ${it} > <% } %> > > ''') > println template.make([items : [1,2,3,4]]) > {code} > > Expected output (and the output 2.5.8 yields): > > {noformat} > > > 1 > > 2 > > 3 > > 4 > > > {noformat} > > Exception 3.0.3 gives: > > {noformat} > Exception in thread "main" groovy.text.TemplateParseException: Template parse > error 'Unexpected input: '{'; Expecting RBRACE ' at line 3, column 27 > 2: > --> 3: <% items.each { %> > 4: ${it}{noformat} > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9507) JSP style loop in StreamingTemplateEngine template results in TemplateParseException
[ https://issues.apache.org/jira/browse/GROOVY-9507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9507: --- Description: The example below works as expected when run in Groovy 2.5.8, yet it fails when run in Groovy 3.0.3 {code:java} TemplateEngine engine = new StreamingTemplateEngine() Template template = engine.createTemplate(''' <% items.each { %> ${it} <% } %> ''') println template.make([items : [1,2,3,4]]) {code} Expected output (and the output 2.5.8 yields): {noformat} 1 2 3 4 {noformat} Exception 3.0.3 gives: {noformat} Exception in thread "main" groovy.text.TemplateParseException: Template parse error 'Unexpected input: '{'; Expecting RBRACE ' at line 3, column 27 2: --> 3: <% items.each { %> 4: ${it}{noformat} was: The example below works as expected when run in Groovy 2.5.8, yet it fails when run in Groovy 3.0.3 {code:java} TemplateEngine engine = new StreamingTemplateEngine() Template template = engine.createTemplate(''' <% items.each { %> ${it} <% } %> ''') println template.make([items : [1,2,3,4]]) {code} Expected output (and the output 2.5.8 yields): {noformat} 1 2 3 4 {noformat} Exception 3.0.3 gives: {noformat} Exception in thread "main" groovy.text.TemplateParseException: Template parse error 'Unexpected input: '{'; Expecting RBRACE ' at line 3, column 27 2: --> 3: <% items.each { %> 4: ${it}{noformat} > JSP style loop in StreamingTemplateEngine template results in > TemplateParseException > > > Key: GROOVY-9507 > URL: https://issues.apache.org/jira/browse/GROOVY-9507 > Project: Groovy > Issue Type: Bug > Components: Templating >Affects Versions: 3.0.3 >Reporter: Christopher Chase >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > > > The example below works as expected when run in Groovy 2.5.8, yet it fails > when run in Groovy 3.0.3 > > > {code:java} > TemplateEngine engine = new StreamingTemplateEngine() > Template template = engine.createTemplate(''' > > <% items.each { %> > ${it} > <% } %> > > ''') > println template.make([items : [1,2,3,4]]) > {code} > > Expected output (and the output 2.5.8 yields): > > {noformat} > > > 1 > > 2 > > 3 > > 4 > > > {noformat} > > Exception 3.0.3 gives: > > {noformat} > Exception in thread "main" groovy.text.TemplateParseException: Template parse > error 'Unexpected input: '{'; Expecting RBRACE ' at line 3, column 27 > 2: > --> 3: <% items.each { %> > 4: ${it}{noformat} > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9507) JSP style loop in StreamingTemplateEngine template results in TemplateParseException
[ https://issues.apache.org/jira/browse/GROOVY-9507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9507: --- Fix Version/s: 3.0.4 4.0.0-alpha-1 > JSP style loop in StreamingTemplateEngine template results in > TemplateParseException > > > Key: GROOVY-9507 > URL: https://issues.apache.org/jira/browse/GROOVY-9507 > Project: Groovy > Issue Type: Bug > Components: Templating >Affects Versions: 3.0.3 >Reporter: Christopher Chase >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > > > The example below works as expected when run in Groovy 2.5.8, yet it fails > when run in Groovy 3.0.3 > > > {code:java} > TemplateEngine engine = new StreamingTemplateEngine() > Template template = engine.createTemplate(''' > > <% items.each { %> > ${it} > <% } %> > > ''') > println template.make([items : [1,2,3,4]]) > {code} > > Expected output (and the output 2.5.8 yields): > > {noformat} > > 1 > 2 > 3 > 4 > {noformat} > > Exception 3.0.3 gives: > > {noformat} > Exception in thread "main" groovy.text.TemplateParseException: Template parse > error 'Unexpected input: '{'; Expecting RBRACE ' at line 3, column 27 > 2: > --> 3: <% items.each { %> > 4: ${it}{noformat} > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (GROOVY-9507) JSP style loop in StreamingTemplateEngine template results in TemplateParseException
[ https://issues.apache.org/jira/browse/GROOVY-9507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun reassigned GROOVY-9507: -- Assignee: Daniel Sun > JSP style loop in StreamingTemplateEngine template results in > TemplateParseException > > > Key: GROOVY-9507 > URL: https://issues.apache.org/jira/browse/GROOVY-9507 > Project: Groovy > Issue Type: Bug > Components: Templating >Affects Versions: 3.0.3 >Reporter: Christopher Chase >Assignee: Daniel Sun >Priority: Major > > > The example below works as expected when run in Groovy 2.5.8, yet it fails > when run in Groovy 3.0.3 > > > {code:java} > TemplateEngine engine = new StreamingTemplateEngine() > Template template = engine.createTemplate(''' > > <% items.each { %> > ${it} > <% } %> > > ''') > println template.make([items : [1,2,3,4]]) > {code} > > Expected output (and the output 2.5.8 yields): > > {noformat} > > 1 > 2 > 3 > 4 > {noformat} > > Exception 3.0.3 gives: > > {noformat} > Exception in thread "main" groovy.text.TemplateParseException: Template parse > error 'Unexpected input: '{'; Expecting RBRACE ' at line 3, column 27 > 2: > --> 3: <% items.each { %> > 4: ${it}{noformat} > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9512) Control the fallback threshold of indy with different switch
[ https://issues.apache.org/jira/browse/GROOVY-9512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9512. Fix Version/s: 4.0.0-alpha-1 Resolution: Fixed > Control the fallback threshold of indy with different switch > > > Key: GROOVY-9512 > URL: https://issues.apache.org/jira/browse/GROOVY-9512 > Project: Groovy > Issue Type: Improvement >Affects Versions: 3.0.3 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > Time Spent: 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9511) Annotation spanning lines is not supported by Parrot
[ https://issues.apache.org/jira/browse/GROOVY-9511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17084955#comment-17084955 ] Daniel Sun commented on GROOVY-9511: Should be fixed now: https://github.com/apache/groovy/commit/f955ae8e5f288646365478fa16262c40d9e3968e > Annotation spanning lines is not supported by Parrot > > > Key: GROOVY-9511 > URL: https://issues.apache.org/jira/browse/GROOVY-9511 > Project: Groovy > Issue Type: Bug > Components: parser-antlr4 >Reporter: Paul King >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > > The following code parses correctly in 2.5.x but fails in 3+: > {code} > @interface CollectionOfElements{} > @interface JoinTable{ > Table table() > JoinColumn[] joinColumns() > } > @interface Table{ String name() } > @interface JoinColumn{ String name() } > @interface Column{ > String name() > boolean nullable() > } > class OtherSection { > @CollectionOfElements > @JoinTable > ( > table = @Table(name="gaga"), > joinColumns = @JoinColumn(name="BoyId") > ) > @Column(name="favoritepoupon", > nullable=false) > Set questions = new HashSet () > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9511) Annotation spanning lines is not supported by Parrot
[ https://issues.apache.org/jira/browse/GROOVY-9511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9511. Resolution: Fixed > Annotation spanning lines is not supported by Parrot > > > Key: GROOVY-9511 > URL: https://issues.apache.org/jira/browse/GROOVY-9511 > Project: Groovy > Issue Type: Bug > Components: parser-antlr4 >Reporter: Paul King >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > > The following code parses correctly in 2.5.x but fails in 3+: > {code} > @interface CollectionOfElements{} > @interface JoinTable{ > Table table() > JoinColumn[] joinColumns() > } > @interface Table{ String name() } > @interface JoinColumn{ String name() } > @interface Column{ > String name() > boolean nullable() > } > class OtherSection { > @CollectionOfElements > @JoinTable > ( > table = @Table(name="gaga"), > joinColumns = @JoinColumn(name="BoyId") > ) > @Column(name="favoritepoupon", > nullable=false) > Set questions = new HashSet () > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9511) Annotation spanning lines is not supported by Parrot
[ https://issues.apache.org/jira/browse/GROOVY-9511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9511: --- Summary: Annotation spanning lines is not supported by Parrot (was: Multiline annotations involving other annotations not supported by Parrot) > Annotation spanning lines is not supported by Parrot > > > Key: GROOVY-9511 > URL: https://issues.apache.org/jira/browse/GROOVY-9511 > Project: Groovy > Issue Type: Bug >Reporter: Paul King >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > > The following code parses correctly in 2.5.x but fails in 3+: > {code} > @interface CollectionOfElements{} > @interface JoinTable{ > Table table() > JoinColumn[] joinColumns() > } > @interface Table{ String name() } > @interface JoinColumn{ String name() } > @interface Column{ > String name() > boolean nullable() > } > class OtherSection { > @CollectionOfElements > @JoinTable > ( > table = @Table(name="gaga"), > joinColumns = @JoinColumn(name="BoyId") > ) > @Column(name="favoritepoupon", > nullable=false) > Set questions = new HashSet () > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9511) Annotation spanning lines is not supported by Parrot
[ https://issues.apache.org/jira/browse/GROOVY-9511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9511: --- Component/s: parser-antlr4 > Annotation spanning lines is not supported by Parrot > > > Key: GROOVY-9511 > URL: https://issues.apache.org/jira/browse/GROOVY-9511 > Project: Groovy > Issue Type: Bug > Components: parser-antlr4 >Reporter: Paul King >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > > The following code parses correctly in 2.5.x but fails in 3+: > {code} > @interface CollectionOfElements{} > @interface JoinTable{ > Table table() > JoinColumn[] joinColumns() > } > @interface Table{ String name() } > @interface JoinColumn{ String name() } > @interface Column{ > String name() > boolean nullable() > } > class OtherSection { > @CollectionOfElements > @JoinTable > ( > table = @Table(name="gaga"), > joinColumns = @JoinColumn(name="BoyId") > ) > @Column(name="favoritepoupon", > nullable=false) > Set questions = new HashSet () > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9512) Control the fallback threshold of indy with different switch
Daniel Sun created GROOVY-9512: -- Summary: Control the fallback threshold of indy with different switch Key: GROOVY-9512 URL: https://issues.apache.org/jira/browse/GROOVY-9512 Project: Groovy Issue Type: Improvement Affects Versions: 3.0.3 Reporter: Daniel Sun Assignee: Daniel Sun Fix For: 3.0.4 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (GROOVY-9511) Multiline annotations involving other annotations not supported by Parrot
[ https://issues.apache.org/jira/browse/GROOVY-9511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun reassigned GROOVY-9511: -- Assignee: Daniel Sun > Multiline annotations involving other annotations not supported by Parrot > - > > Key: GROOVY-9511 > URL: https://issues.apache.org/jira/browse/GROOVY-9511 > Project: Groovy > Issue Type: Bug >Reporter: Paul King >Assignee: Daniel Sun >Priority: Major > > The following code parses correctly in 2.5.x but fails in 3+: > {code} > @interface CollectionOfElements{} > @interface JoinTable{ > Table table() > JoinColumn[] joinColumns() > } > @interface Table{ String name() } > @interface JoinColumn{ String name() } > @interface Column{ > String name() > boolean nullable() > } > class OtherSection { > @CollectionOfElements > @JoinTable > ( > table = @Table(name="gaga"), > joinColumns = @JoinColumn(name="BoyId") > ) > @Column(name="favoritepoupon", > nullable=false) > Set questions = new HashSet () > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9511) Multiline annotations involving other annotations not supported by Parrot
[ https://issues.apache.org/jira/browse/GROOVY-9511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9511: --- Fix Version/s: 3.0.4 4.0.0-alpha-1 > Multiline annotations involving other annotations not supported by Parrot > - > > Key: GROOVY-9511 > URL: https://issues.apache.org/jira/browse/GROOVY-9511 > Project: Groovy > Issue Type: Bug >Reporter: Paul King >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > > The following code parses correctly in 2.5.x but fails in 3+: > {code} > @interface CollectionOfElements{} > @interface JoinTable{ > Table table() > JoinColumn[] joinColumns() > } > @interface Table{ String name() } > @interface JoinColumn{ String name() } > @interface Column{ > String name() > boolean nullable() > } > class OtherSection { > @CollectionOfElements > @JoinTable > ( > table = @Table(name="gaga"), > joinColumns = @JoinColumn(name="BoyId") > ) > @Column(name="favoritepoupon", > nullable=false) > Set questions = new HashSet () > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (GROOVY-9511) Multiline annotations involving other annotations not supported by Parrot
[ https://issues.apache.org/jira/browse/GROOVY-9511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17084736#comment-17084736 ] Daniel Sun edited comment on GROOVY-9511 at 4/16/20, 10:32 AM: --- After the newline following the {{@JoinTable}} removed, the Parrot parser is happy: {code:java} class OtherSection { @CollectionOfElements @JoinTable( table = @Table(name="gaga"), joinColumns = @JoinColumn(name="BoyId") ) @Column(name="favoritepoupon", nullable=false) Set questions = new HashSet () } {code} was (Author: daniel_sun): Remove the newline following the {{@JoinTable}}, the parser is happy: {code:java} class OtherSection { @CollectionOfElements @JoinTable( table = @Table(name="gaga"), joinColumns = @JoinColumn(name="BoyId") ) @Column(name="favoritepoupon", nullable=false) Set questions = new HashSet () } {code} > Multiline annotations involving other annotations not supported by Parrot > - > > Key: GROOVY-9511 > URL: https://issues.apache.org/jira/browse/GROOVY-9511 > Project: Groovy > Issue Type: Bug >Reporter: Paul King >Priority: Major > > The following code parses correctly in 2.5.x but fails in 3+: > {code} > @interface CollectionOfElements{} > @interface JoinTable{ > Table table() > JoinColumn[] joinColumns() > } > @interface Table{ String name() } > @interface JoinColumn{ String name() } > @interface Column{ > String name() > boolean nullable() > } > class OtherSection { > @CollectionOfElements > @JoinTable > ( > table = @Table(name="gaga"), > joinColumns = @JoinColumn(name="BoyId") > ) > @Column(name="favoritepoupon", > nullable=false) > Set questions = new HashSet () > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9511) Multiline annotations involving other annotations not supported by Parrot
[ https://issues.apache.org/jira/browse/GROOVY-9511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17084736#comment-17084736 ] Daniel Sun commented on GROOVY-9511: Remove the newline following the {{@JoinTable}}, the parser is happy: {code:java} class OtherSection { @CollectionOfElements @JoinTable( table = @Table(name="gaga"), joinColumns = @JoinColumn(name="BoyId") ) @Column(name="favoritepoupon", nullable=false) Set questions = new HashSet () } {code} > Multiline annotations involving other annotations not supported by Parrot > - > > Key: GROOVY-9511 > URL: https://issues.apache.org/jira/browse/GROOVY-9511 > Project: Groovy > Issue Type: Bug >Reporter: Paul King >Priority: Major > > The following code parses correctly in 2.5.x but fails in 3+: > {code} > @interface CollectionOfElements{} > @interface JoinTable{ > Table table() > JoinColumn[] joinColumns() > } > @interface Table{ String name() } > @interface JoinColumn{ String name() } > @interface Column{ > String name() > boolean nullable() > } > class OtherSection { > @CollectionOfElements > @JoinTable > ( > table = @Table(name="gaga"), > joinColumns = @JoinColumn(name="BoyId") > ) > @Column(name="favoritepoupon", > nullable=false) > Set questions = new HashSet () > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (GROOVY-9504) Add support for Path to slurper classes
[ https://issues.apache.org/jira/browse/GROOVY-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17081872#comment-17081872 ] Daniel Sun edited comment on GROOVY-9504 at 4/12/20, 5:56 PM: -- The proposed PR has been merged. Thanks a lot for your contribution! https://github.com/apache/groovy/commit/829650b148429bcbb08f4d2eb2272a956a4109bb was (Author: daniel_sun): The proposed PR has been merged. Thanks a lot for your contribution! > Add support for Path to slurper classes > --- > > Key: GROOVY-9504 > URL: https://issues.apache.org/jira/browse/GROOVY-9504 > Project: Groovy > Issue Type: Improvement > Components: groovy-yaml, JSON, XML Processing >Reporter: paolo di tommaso >Assignee: Daniel Sun >Priority: Minor > Fix For: 4.0.0-alpha-1, 3.0.4 > > > The classes `JsonSlurper`, `YamlSlurper` and `XmlSlurper` allow the parsing > of the content of a file object specified as `File` object, however, it's > missing a `parse` method taking the > [Path|[https://docs.oracle.com/javase/8/docs/api/java/nio/file/Paths.html]] > interface as a argument. > > As a workaround, it's possible to convert a `File` to a `Path` using the > `toPath()` method however this does not fully support the new API features, > notably the ability to reference and therefore access foreign files e.g. > non-local files such as in-memory, S3, etc. > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9504) Add support for Path to slurper classes
[ https://issues.apache.org/jira/browse/GROOVY-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9504. Fix Version/s: 3.0.4 4.0.0-alpha-1 Assignee: Daniel Sun Resolution: Fixed The proposed PR has been merged. Thanks a lot for your contribution! > Add support for Path to slurper classes > --- > > Key: GROOVY-9504 > URL: https://issues.apache.org/jira/browse/GROOVY-9504 > Project: Groovy > Issue Type: Improvement > Components: groovy-yaml, JSON, XML Processing >Reporter: paolo di tommaso >Assignee: Daniel Sun >Priority: Minor > Fix For: 4.0.0-alpha-1, 3.0.4 > > > The classes `JsonSlurper`, `YamlSlurper` and `XmlSlurper` allow the parsing > of the content of a file object specified as `File` object, however, it's > missing a `parse` method taking the > [Path|[https://docs.oracle.com/javase/8/docs/api/java/nio/file/Paths.html]] > interface as a argument. > > As a workaround, it's possible to convert a `File` to a `Path` using the > `toPath()` method however this does not fully support the new API features, > notably the ability to reference and therefore access foreign files e.g. > non-local files such as in-memory, S3, etc. > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (GROOVY-9503) Bump javaparser to 3.15.18
[ https://issues.apache.org/jira/browse/GROOVY-9503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun closed GROOVY-9503. -- Assignee: Daniel Sun Resolution: Fixed > Bump javaparser to 3.15.18 > -- > > Key: GROOVY-9503 > URL: https://issues.apache.org/jira/browse/GROOVY-9503 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9503) Bump javaparser to 3.15.18
Daniel Sun created GROOVY-9503: -- Summary: Bump javaparser to 3.15.18 Key: GROOVY-9503 URL: https://issues.apache.org/jira/browse/GROOVY-9503 Project: Groovy Issue Type: Dependency upgrade Reporter: Daniel Sun Fix For: 4.0.0-alpha-1, 3.0.4 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (GROOVY-9502) Bump junit to 5.6.2
[ https://issues.apache.org/jira/browse/GROOVY-9502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun reassigned GROOVY-9502: -- Assignee: Daniel Sun > Bump junit to 5.6.2 > --- > > Key: GROOVY-9502 > URL: https://issues.apache.org/jira/browse/GROOVY-9502 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (GROOVY-9502) Bump junit to 5.6.2
[ https://issues.apache.org/jira/browse/GROOVY-9502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun closed GROOVY-9502. -- Resolution: Fixed > Bump junit to 5.6.2 > --- > > Key: GROOVY-9502 > URL: https://issues.apache.org/jira/browse/GROOVY-9502 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.4 > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9502) Bump junit to 5.6.2
Daniel Sun created GROOVY-9502: -- Summary: Bump junit to 5.6.2 Key: GROOVY-9502 URL: https://issues.apache.org/jira/browse/GROOVY-9502 Project: Groovy Issue Type: Dependency upgrade Reporter: Daniel Sun Fix For: 4.0.0-alpha-1, 3.0.4 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (GROOVY-9484) Closure on the next line should not be treated as argument
[ https://issues.apache.org/jira/browse/GROOVY-9484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun closed GROOVY-9484. -- Resolution: Won't Fix > Closure on the next line should not be treated as argument > -- > > Key: GROOVY-9484 > URL: https://issues.apache.org/jira/browse/GROOVY-9484 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Labels: breaking_change > Time Spent: 20m > Remaining Estimate: 0h > > Here is the issue reported by a Spock user: > in groovy 2.5 > {code:java} > modification| expected > { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) > {code} > these were treated as separate expressions > in groovy 3.0 the closure gets merged as argument to the expected above. > {code:java} > modification | this.expected({ Instant i, ZoneId z -> > i.plusSeconds(1) > }) | defaultInstant.plusSeconds(1) > {code} > I propose to unify the grammar of closure arguments: > {code:java} > // 2 expressions: variable and closure > meth > { p -> > } > // 2 expressions: binary expression and closure > a | meth > { p -> > } > {code} > In the old grammar, the following code is parsed as method call with a > closure argument. > {code:java} > meth > { p -> > } > {code} > Luckily, groovy-parser project containing source code of some famous groovy > projects, none of which are broken because of the proposed change. > See the discussion in the dev mailing list: > [http://groovy.329449.n5.nabble.com/About-eliminating-ambiguities-of-method-call-with-closure-argument-tt5766830.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9484) Closure on the next line should not be treated as argument
[ https://issues.apache.org/jira/browse/GROOVY-9484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9484: --- Fix Version/s: (was: 3.0.3) (was: 4.0.0-alpha-1) > Closure on the next line should not be treated as argument > -- > > Key: GROOVY-9484 > URL: https://issues.apache.org/jira/browse/GROOVY-9484 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Labels: breaking_change > Time Spent: 10m > Remaining Estimate: 0h > > Here is the issue reported by a Spock user: > in groovy 2.5 > {code:java} > modification| expected > { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) > {code} > these were treated as separate expressions > in groovy 3.0 the closure gets merged as argument to the expected above. > {code:java} > modification | this.expected({ Instant i, ZoneId z -> > i.plusSeconds(1) > }) | defaultInstant.plusSeconds(1) > {code} > I propose to unify the grammar of closure arguments: > {code:java} > // 2 expressions: variable and closure > meth > { p -> > } > // 2 expressions: binary expression and closure > a | meth > { p -> > } > {code} > In the old grammar, the following code is parsed as method call with a > closure argument. > {code:java} > meth > { p -> > } > {code} > Luckily, groovy-parser project containing source code of some famous groovy > projects, none of which are broken because of the proposed change. > See the discussion in the dev mailing list: > [http://groovy.329449.n5.nabble.com/About-eliminating-ambiguities-of-method-call-with-closure-argument-tt5766830.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (GROOVY-9497) Bump asm to 8.0.1
[ https://issues.apache.org/jira/browse/GROOVY-9497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun closed GROOVY-9497. -- Resolution: Fixed > Bump asm to 8.0.1 > - > > Key: GROOVY-9497 > URL: https://issues.apache.org/jira/browse/GROOVY-9497 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.3 > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9497) Bump asm to 8.0.1
Daniel Sun created GROOVY-9497: -- Summary: Bump asm to 8.0.1 Key: GROOVY-9497 URL: https://issues.apache.org/jira/browse/GROOVY-9497 Project: Groovy Issue Type: Dependency upgrade Reporter: Daniel Sun Assignee: Daniel Sun Fix For: 4.0.0-alpha-1, 3.0.3 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9493) JSR 223 regression: not working under OpenJ9 since version 3.0.0
[ https://issues.apache.org/jira/browse/GROOVY-9493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17072316#comment-17072316 ] Daniel Sun commented on GROOVY-9493: {code:java} true 20 4.0.0-SNAPSHOT 11.0.6 Amazon.com Inc. {code} > JSR 223 regression: not working under OpenJ9 since version 3.0.0 > > > Key: GROOVY-9493 > URL: https://issues.apache.org/jira/browse/GROOVY-9493 > Project: Groovy > Issue Type: Bug > Components: groovy-jsr223 >Affects Versions: 3.0.0, 3.0.1, 3.0.2 >Reporter: Danilo Pianini >Priority: Major > > Since version 3.0.0, Groovy fails at running JSR 223 scripts under OpenJ9. > The issue does not appear under OpenJDK. > > The following is the result of the attempted evaluation of the script `1` > under OpenJ9 12. The failure is reproducible with OpenJ9 11 and OpenJ9 14. > Inside `GroovyScriptEngineImpl`, parameter `script` has value `"1"` (meaning > a string of length 1 with the sole number 1 as content). > > ``` > java.lang.NullPointerExceptionjava.lang.NullPointerException at > groovy.lang.GroovyClassLoader$InnerLoader.setDefaultAssertionStatus(GroovyClassLoader.java:617) > at > java.base/java.lang.ClassLoader.initializeClassLoaderAssertStatus(ClassLoader.java:1990) > at java.base/java.lang.ClassLoader.(ClassLoader.java:344) at > java.base/java.lang.ClassLoader.(ClassLoader.java:284) at > java.base/java.security.SecureClassLoader.(SecureClassLoader.java:77) > at java.base/java.net.URLClassLoader.(URLClassLoader.java:232) at > groovy.lang.GroovyClassLoader.(GroovyClassLoader.java:158) at > groovy.lang.GroovyClassLoader.(GroovyClassLoader.java:147) at > groovy.lang.GroovyClassLoader$InnerLoader.(GroovyClassLoader.java:472) > at > groovy.lang.GroovyClassLoader.lambda$createCollector$4(GroovyClassLoader.java:671) > at groovy.lang.GroovyClassLoader$$Lambda$397.283EE5D0.run(Unknown > Source) at > java.base/java.security.AccessController.doPrivileged(AccessController.java:678) > at groovy.lang.GroovyClassLoader.createCollector(GroovyClassLoader.java:671) > at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:385) at > groovy.lang.GroovyClassLoader.lambda$parseClass$3(GroovyClassLoader.java:332) > at groovy.lang.GroovyClassLoader$$Lambda$345.284B4BF0.provide(Unknown > Source) at > org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163) > at > org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154) > at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:330) at > groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:314) at > groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:257) at > org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getScriptClass(GroovyScriptEngineImpl.java:336) > at > org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:153) > at > java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233) > at > it.unibo.alchemist.loader.variables.JSR223Variable.getWith(JSR223Variable.kt:39) > at it.unibo.alchemist.loader.YamlLoader.(YamlLoader.java:287) at > it.unibo.alchemist.loader.YamlLoader.(YamlLoader.java:220) at > it.unibo.alchemist.SimulationLauncher.launch(SimulationLauncher.kt:42) at > it.unibo.alchemist.Launcher$DefaultImpls.invoke(Launcher.kt:20) at > it.unibo.alchemist.SimulationLauncher.invoke(SimulationLauncher.kt:27) at > it.unibo.alchemist.Alchemist.main(Alchemist.kt:115) at > TestCLIKt$runWithOptions$exit$1.invoke(TestCLI.kt:48) at > TestCLIKt$runWithOptions$exit$1.invoke(TestCLI.kt) at > TestCLIKt.runCatchingExit(TestCLI.kt:38) at > TestCLIKt.runWithOptions(TestCLI.kt:47) at > TestCLI$1$2.invokeSuspend(TestCLI.kt:69) at TestCLI$1$2.invoke(TestCLI.kt) at > io.kotlintest.runner.jvm.TestCaseExecutor$executeTest$supervisorJob$1$invokeSuspend$$inlined$map$lambda$1.invokeSuspend(TestCaseExecutor.kt:121) > at > kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) > at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56) at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) > at java.base/java.lang.Thread.run(Thread.java:831) > ``` -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (GROOVY-9487) Update and check if initialized via same field of metaclass
[ https://issues.apache.org/jira/browse/GROOVY-9487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun closed GROOVY-9487. -- Resolution: Fixed > Update and check if initialized via same field of metaclass > --- > > Key: GROOVY-9487 > URL: https://issues.apache.org/jira/browse/GROOVY-9487 > Project: Groovy > Issue Type: Improvement >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.3 > > Time Spent: 20m > Remaining Estimate: 0h > > {{MetaClassImpl}} has its own *private* field {{initiliazed}}, when > {{initialize()}} is completed, the field will be updated to {{true}}, but > check if metaclass is initialized via method {{protected boolean > isInitialized()}}, which could be overrided by its subclass, e.g. EMC. The > subclasses can not access its base class's private field. As a result, > updating {{MetaClassImpl}}'s private {{initiliazed}} but may check its > subclass's some field like {{initiliazed}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9493) JSR 223 regression: not working under OpenJ9 since version 3.0.0
[ https://issues.apache.org/jira/browse/GROOVY-9493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17071674#comment-17071674 ] Daniel Sun commented on GROOVY-9493: Could you provide a sample code to reproduce the issue? > JSR 223 regression: not working under OpenJ9 since version 3.0.0 > > > Key: GROOVY-9493 > URL: https://issues.apache.org/jira/browse/GROOVY-9493 > Project: Groovy > Issue Type: Bug > Components: JSR / TCK / GLS >Affects Versions: 3.0.0, 3.0.1, 3.0.2 >Reporter: Danilo Pianini >Priority: Major > Fix For: 2.5.x > > > Since version 3.0.0, Groovy fails at running JSR 233 scripts under OpenJ9. > The issue does not appear under OpenJDK. > > The following is the result of the attempted evaluation of the script `1` > under OpenJ9 12. The failure is reproducible with OpenJ9 11 and OpenJ9 14. > Inside `GroovyScriptEngineImpl`, parameter `script` has value `"1"` (meaning > a string of length 1 with the sole number 1 as content). > > ``` > java.lang.NullPointerExceptionjava.lang.NullPointerException at > groovy.lang.GroovyClassLoader$InnerLoader.setDefaultAssertionStatus(GroovyClassLoader.java:617) > at > java.base/java.lang.ClassLoader.initializeClassLoaderAssertStatus(ClassLoader.java:1990) > at java.base/java.lang.ClassLoader.(ClassLoader.java:344) at > java.base/java.lang.ClassLoader.(ClassLoader.java:284) at > java.base/java.security.SecureClassLoader.(SecureClassLoader.java:77) > at java.base/java.net.URLClassLoader.(URLClassLoader.java:232) at > groovy.lang.GroovyClassLoader.(GroovyClassLoader.java:158) at > groovy.lang.GroovyClassLoader.(GroovyClassLoader.java:147) at > groovy.lang.GroovyClassLoader$InnerLoader.(GroovyClassLoader.java:472) > at > groovy.lang.GroovyClassLoader.lambda$createCollector$4(GroovyClassLoader.java:671) > at groovy.lang.GroovyClassLoader$$Lambda$397.283EE5D0.run(Unknown > Source) at > java.base/java.security.AccessController.doPrivileged(AccessController.java:678) > at groovy.lang.GroovyClassLoader.createCollector(GroovyClassLoader.java:671) > at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:385) at > groovy.lang.GroovyClassLoader.lambda$parseClass$3(GroovyClassLoader.java:332) > at groovy.lang.GroovyClassLoader$$Lambda$345.284B4BF0.provide(Unknown > Source) at > org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163) > at > org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154) > at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:330) at > groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:314) at > groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:257) at > org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getScriptClass(GroovyScriptEngineImpl.java:336) > at > org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:153) > at > java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233) > at > it.unibo.alchemist.loader.variables.JSR223Variable.getWith(JSR223Variable.kt:39) > at it.unibo.alchemist.loader.YamlLoader.(YamlLoader.java:287) at > it.unibo.alchemist.loader.YamlLoader.(YamlLoader.java:220) at > it.unibo.alchemist.SimulationLauncher.launch(SimulationLauncher.kt:42) at > it.unibo.alchemist.Launcher$DefaultImpls.invoke(Launcher.kt:20) at > it.unibo.alchemist.SimulationLauncher.invoke(SimulationLauncher.kt:27) at > it.unibo.alchemist.Alchemist.main(Alchemist.kt:115) at > TestCLIKt$runWithOptions$exit$1.invoke(TestCLI.kt:48) at > TestCLIKt$runWithOptions$exit$1.invoke(TestCLI.kt) at > TestCLIKt.runCatchingExit(TestCLI.kt:38) at > TestCLIKt.runWithOptions(TestCLI.kt:47) at > TestCLI$1$2.invokeSuspend(TestCLI.kt:69) at TestCLI$1$2.invoke(TestCLI.kt) at > io.kotlintest.runner.jvm.TestCaseExecutor$executeTest$supervisorJob$1$invokeSuspend$$inlined$map$lambda$1.invokeSuspend(TestCaseExecutor.kt:121) > at > kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) > at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56) at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) > at java.base/java.lang.Thread.run(Thread.java:831) > ``` -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9485) metaclass is not initialized
[ https://issues.apache.org/jira/browse/GROOVY-9485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9485: --- Fix Version/s: 2.5.11 > metaclass is not initialized > > > Key: GROOVY-9485 > URL: https://issues.apache.org/jira/browse/GROOVY-9485 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.3, 2.5.11 > > > [https://github.com/apache/groovy/runs/540932897?check_suite_focus=true] > > {code:java} > org.codehaus.groovy.tools.stubgenerator.ExceptionThrowingSuperConstructorTest > > junit.framework.TestSuite$1.warning FAILED > junit.framework.AssertionFailedError: Exception in constructor: testRun > (java.lang.IllegalStateException: initialize must be called for meta class of > class java.lang.System(class groovy.lang.MetaClassImpl) to complete > initialisation process before any invocation or field/property access can be > done > at groovy.lang.MetaClassImpl.checkInitalised(MetaClassImpl.java:1696) > at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1494) > at > org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:50) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130) > at > org.codehaus.groovy.tools.stubgenerator.StubTestCase.createTempDirectory(StubTestCase.groovy:306) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) > at > org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:149) > at > org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:100) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:55) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:217) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:222) > at > org.codehaus.groovy.tools.stubgenerator.StubTestCase.(StubTestCase.groovy:60) > at > org.codehaus.groovy.tools.stubgenerator.StringSourcesStubTestCase.(StringSourcesStubTestCase.groovy) > at > org.codehaus.groovy.tools.stubgenerator.ExceptionThrowingSuperConstructorTest.(ExceptionThrowingSuperConstructorTest.groovy) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (GROOVY-9488) Bump javaparser to 3.15.17
[ https://issues.apache.org/jira/browse/GROOVY-9488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun closed GROOVY-9488. -- Resolution: Fixed > Bump javaparser to 3.15.17 > -- > > Key: GROOVY-9488 > URL: https://issues.apache.org/jira/browse/GROOVY-9488 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.3 > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9484) Closure on the next line should not be treated as argument
[ https://issues.apache.org/jira/browse/GROOVY-9484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9484: --- Fix Version/s: 3.0.3 4.0.0-alpha-1 > Closure on the next line should not be treated as argument > -- > > Key: GROOVY-9484 > URL: https://issues.apache.org/jira/browse/GROOVY-9484 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Priority: Major > Labels: breaking_change > Fix For: 4.0.0-alpha-1, 3.0.3 > > Time Spent: 10m > Remaining Estimate: 0h > > Here is the issue reported by a Spock user: > in groovy 2.5 > {code:java} > modification| expected > { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) > {code} > these were treated as separate expressions > in groovy 3.0 the closure gets merged as argument to the expected above. > {code:java} > modification | this.expected({ Instant i, ZoneId z -> > i.plusSeconds(1) > }) | defaultInstant.plusSeconds(1) > {code} > I propose to unify the grammar of closure arguments: > {code:java} > // 2 expressions: variable and closure > meth > { p -> > } > // 2 expressions: binary expression and closure > a | meth > { p -> > } > {code} > In the old grammar, the following code is parsed as method call with a > closure argument. > {code:java} > meth > { p -> > } > {code} > Luckily, groovy-parser project containing source code of some famous groovy > projects, none of which are broken because of the proposed change. > See the discussion in the dev mailing list: > [http://groovy.329449.n5.nabble.com/About-eliminating-ambiguities-of-method-call-with-closure-argument-tt5766830.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (GROOVY-9484) Closure on the next line should not be treated as argument
[ https://issues.apache.org/jira/browse/GROOVY-9484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun reassigned GROOVY-9484: -- Assignee: Daniel Sun > Closure on the next line should not be treated as argument > -- > > Key: GROOVY-9484 > URL: https://issues.apache.org/jira/browse/GROOVY-9484 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Labels: breaking_change > Fix For: 4.0.0-alpha-1, 3.0.3 > > Time Spent: 10m > Remaining Estimate: 0h > > Here is the issue reported by a Spock user: > in groovy 2.5 > {code:java} > modification| expected > { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) > {code} > these were treated as separate expressions > in groovy 3.0 the closure gets merged as argument to the expected above. > {code:java} > modification | this.expected({ Instant i, ZoneId z -> > i.plusSeconds(1) > }) | defaultInstant.plusSeconds(1) > {code} > I propose to unify the grammar of closure arguments: > {code:java} > // 2 expressions: variable and closure > meth > { p -> > } > // 2 expressions: binary expression and closure > a | meth > { p -> > } > {code} > In the old grammar, the following code is parsed as method call with a > closure argument. > {code:java} > meth > { p -> > } > {code} > Luckily, groovy-parser project containing source code of some famous groovy > projects, none of which are broken because of the proposed change. > See the discussion in the dev mailing list: > [http://groovy.329449.n5.nabble.com/About-eliminating-ambiguities-of-method-call-with-closure-argument-tt5766830.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9488) Bump javaparser to 3.15.17
Daniel Sun created GROOVY-9488: -- Summary: Bump javaparser to 3.15.17 Key: GROOVY-9488 URL: https://issues.apache.org/jira/browse/GROOVY-9488 Project: Groovy Issue Type: Dependency upgrade Reporter: Daniel Sun Assignee: Daniel Sun Fix For: 4.0.0-alpha-1, 3.0.3 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9486) Remove redundant code `Sentinel`
[ https://issues.apache.org/jira/browse/GROOVY-9486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9486. Resolution: Fixed > Remove redundant code `Sentinel` > > > Key: GROOVY-9486 > URL: https://issues.apache.org/jira/browse/GROOVY-9486 > Project: Groovy > Issue Type: Improvement >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.3 > > Time Spent: 20m > Remaining Estimate: 0h > > See > [https://github.com/apache/groovy/blob/GROOVY_3_0_2/src/main/java/org/codehaus/groovy/reflection/ClassInfo.java#L81-L91] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9487) Update and check if initialized via same field of metaclass
[ https://issues.apache.org/jira/browse/GROOVY-9487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9487: --- Fix Version/s: 3.0.3 4.0.0-alpha-1 > Update and check if initialized via same field of metaclass > --- > > Key: GROOVY-9487 > URL: https://issues.apache.org/jira/browse/GROOVY-9487 > Project: Groovy > Issue Type: Improvement >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.3 > > > {{MetaClassImpl}} has its own *private* field {{initiliazed}}, when > {{initialize()}} is completed, the field will be updated to {{true}}, but > check if metaclass is initialized via method {{protected boolean > isInitialized()}}, which could be overrided by its subclass, e.g. EMC. The > subclasses can not access its base class's private field. As a result, > updating {{MetaClassImpl}}'s private {{initiliazed}} but may check its > subclass's some field like {{initiliazed}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9487) Update and check if initialized via same field of metaclass
[ https://issues.apache.org/jira/browse/GROOVY-9487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9487: --- Summary: Update and check if initialized via same field of metaclass (was: Check same field of metaclass) > Update and check if initialized via same field of metaclass > --- > > Key: GROOVY-9487 > URL: https://issues.apache.org/jira/browse/GROOVY-9487 > Project: Groovy > Issue Type: Improvement >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > > {{MetaClassImpl}} has its own *private* field {{initiliazed}}, when > {{initialize()}} is completed, the field will be updated to {{true}}, but > check if metaclass is initialized via method {{protected boolean > isInitialized()}}, which could be overrided by its subclass, e.g. EMC. The > subclasses can not access its base class's private field. As a result, > updating {{MetaClassImpl}}'s private {{initiliazed}} but may check its > subclass's some field like {{initiliazed}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9487) Check same field of metaclass
Daniel Sun created GROOVY-9487: -- Summary: Check same field of metaclass Key: GROOVY-9487 URL: https://issues.apache.org/jira/browse/GROOVY-9487 Project: Groovy Issue Type: Improvement Reporter: Daniel Sun Assignee: Daniel Sun {{MetaClassImpl}} has its own *private* field {{initiliazed}}, when {{initialize()}} is completed, the field will be updated to {{true}}, but check if metaclass is initialized via method {{protected boolean isInitialized()}}, which could be overrided by its subclass, e.g. EMC. The subclasses can not access its base class's private field. As a result, updating {{MetaClassImpl}}'s private {{initiliazed}} but may check its subclass's some field like {{initiliazed}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9486) Remove redundant code `Sentinel`
Daniel Sun created GROOVY-9486: -- Summary: Remove redundant code `Sentinel` Key: GROOVY-9486 URL: https://issues.apache.org/jira/browse/GROOVY-9486 Project: Groovy Issue Type: Improvement Reporter: Daniel Sun Assignee: Daniel Sun Fix For: 4.0.0-alpha-1, 3.0.3 See [https://github.com/apache/groovy/blob/GROOVY_3_0_2/src/main/java/org/codehaus/groovy/reflection/ClassInfo.java#L81-L91] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9310) Groovy does not ignore second bash directive
[ https://issues.apache.org/jira/browse/GROOVY-9310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9310: --- Component/s: (was: command line processing) parser-antlr4 > Groovy does not ignore second bash directive > > > Key: GROOVY-9310 > URL: https://issues.apache.org/jira/browse/GROOVY-9310 > Project: Groovy > Issue Type: Bug > Components: parser-antlr4 >Reporter: John Mercier >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.3 > > > When creating a groovy script for nixos I ran into an issue. Here is the > script. > > {code:java} > #! /usr/bin/env nix-shell > #! nix-shell -i groovy -p groovy > println "hello" > {code} > The script uses a second bash directive which tells nix-shell to run the > script using groovy. Groovy gives the following error. > > {code:java} > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > /home/john/projects/netbeans/update-nix-dependencies.groovy: 2: unexpected > char: '#' @ line 2, column 1. >#! nix-shell -i groovy -p groovy >^ > 1 error > {code} > This seems to be a groovy issue and I was wondering how it could be fixed. > There is a workaround for nix-shell described > [here|https://discourse.nixos.org/t/how-to-use-nix-shell-with-groovy/4779/2?u=moaxcp]. > I'm willing to submit a pull request for this but I'm not sure where to > start. Thanks! -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9310) Groovy does not ignore second bash directive
[ https://issues.apache.org/jira/browse/GROOVY-9310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9310. Fix Version/s: 3.0.3 4.0.0-alpha-1 Assignee: Daniel Sun Resolution: Fixed The proposed PR has been merged. Thanks! > Groovy does not ignore second bash directive > > > Key: GROOVY-9310 > URL: https://issues.apache.org/jira/browse/GROOVY-9310 > Project: Groovy > Issue Type: Bug > Components: command line processing >Reporter: John Mercier >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.3 > > > When creating a groovy script for nixos I ran into an issue. Here is the > script. > > {code:java} > #! /usr/bin/env nix-shell > #! nix-shell -i groovy -p groovy > println "hello" > {code} > The script uses a second bash directive which tells nix-shell to run the > script using groovy. Groovy gives the following error. > > {code:java} > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > /home/john/projects/netbeans/update-nix-dependencies.groovy: 2: unexpected > char: '#' @ line 2, column 1. >#! nix-shell -i groovy -p groovy >^ > 1 error > {code} > This seems to be a groovy issue and I was wondering how it could be fixed. > There is a workaround for nix-shell described > [here|https://discourse.nixos.org/t/how-to-use-nix-shell-with-groovy/4779/2?u=moaxcp]. > I'm willing to submit a pull request for this but I'm not sure where to > start. Thanks! -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9485) metaclass is not initialized
[ https://issues.apache.org/jira/browse/GROOVY-9485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-9485. Resolution: Fixed Fixed by [https://github.com/apache/groovy/commit/6c7b4e193d12fcc793401e0bb9097bca30dd2c65] > metaclass is not initialized > > > Key: GROOVY-9485 > URL: https://issues.apache.org/jira/browse/GROOVY-9485 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.3 > > > [https://github.com/apache/groovy/runs/540932897?check_suite_focus=true] > > {code:java} > org.codehaus.groovy.tools.stubgenerator.ExceptionThrowingSuperConstructorTest > > junit.framework.TestSuite$1.warning FAILED > junit.framework.AssertionFailedError: Exception in constructor: testRun > (java.lang.IllegalStateException: initialize must be called for meta class of > class java.lang.System(class groovy.lang.MetaClassImpl) to complete > initialisation process before any invocation or field/property access can be > done > at groovy.lang.MetaClassImpl.checkInitalised(MetaClassImpl.java:1696) > at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1494) > at > org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:50) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130) > at > org.codehaus.groovy.tools.stubgenerator.StubTestCase.createTempDirectory(StubTestCase.groovy:306) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) > at > org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:149) > at > org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:100) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:55) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:217) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:222) > at > org.codehaus.groovy.tools.stubgenerator.StubTestCase.(StubTestCase.groovy:60) > at > org.codehaus.groovy.tools.stubgenerator.StringSourcesStubTestCase.(StringSourcesStubTestCase.groovy) > at > org.codehaus.groovy.tools.stubgenerator.ExceptionThrowingSuperConstructorTest.(ExceptionThrowingSuperConstructorTest.groovy) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9485) metaclass is not initialized
Daniel Sun created GROOVY-9485: -- Summary: metaclass is not initialized Key: GROOVY-9485 URL: https://issues.apache.org/jira/browse/GROOVY-9485 Project: Groovy Issue Type: Bug Reporter: Daniel Sun Assignee: Daniel Sun Fix For: 4.0.0-alpha-1, 3.0.3 [https://github.com/apache/groovy/runs/540932897?check_suite_focus=true] {code:java} org.codehaus.groovy.tools.stubgenerator.ExceptionThrowingSuperConstructorTest > junit.framework.TestSuite$1.warning FAILED junit.framework.AssertionFailedError: Exception in constructor: testRun (java.lang.IllegalStateException: initialize must be called for meta class of class java.lang.System(class groovy.lang.MetaClassImpl) to complete initialisation process before any invocation or field/property access can be done at groovy.lang.MetaClassImpl.checkInitalised(MetaClassImpl.java:1696) at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1494) at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:50) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130) at org.codehaus.groovy.tools.stubgenerator.StubTestCase.createTempDirectory(StubTestCase.groovy:306) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107) at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:149) at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:100) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:55) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:217) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:222) at org.codehaus.groovy.tools.stubgenerator.StubTestCase.(StubTestCase.groovy:60) at org.codehaus.groovy.tools.stubgenerator.StringSourcesStubTestCase.(StringSourcesStubTestCase.groovy) at org.codehaus.groovy.tools.stubgenerator.ExceptionThrowingSuperConstructorTest.(ExceptionThrowingSuperConstructorTest.groovy) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9484) Closure on the next line should not be treated as argument
[ https://issues.apache.org/jira/browse/GROOVY-9484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9484: --- Description: Here is the issue reported by a Groovy user: in groovy 2.5 {code:java} modification| expected { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) {code} these were treated as separate expressions in groovy 3.0 the closure gets merged as argument to the expected above. {code:java} modification | this.expected({ Instant i, ZoneId z -> i.plusSeconds(1) }) | defaultInstant.plusSeconds(1) {code} I propose to unify the grammar of closure arguments: {code:java} // 2 expressions: variable and closure meth { p -> } // 2 expressions: binary expression and closure a | meth { p -> } {code} In the old grammar, the following code is parsed as method call with a closure argument. {code:java} meth { p -> } {code} Luckily, groovy-parser project containing source code of some famous groovy projects, none of which are broken because of the proposed change. See the discussion in the dev mailing list: [http://groovy.329449.n5.nabble.com/About-eliminating-ambiguities-of-method-call-with-closure-argument-tt5766830.html] was: Here is the issue reported by a Groovy user: in groovy 2.5 {code:java} modification| expected { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) {code} these were treated as separate expressions in groovy 3.0 the closure gets merged as argument to the expected above. {code:java} modification | this.expected({ Instant i, ZoneId z -> i.plusSeconds(1) }) | defaultInstant.plusSeconds(1) {code} I propose to unify the grammar of closure arguments: {code:java} // 2 expressions: variable and closure meth { p -> } // 2 expressions: binary expression and closure a | meth { p -> } {code} In the old grammar, the following code is parsed as method call with a closure argument. {code:java} meth { p -> } {code} Luckily, groovy-parser project containing source code of some famous groovy projects, none of which are broken because of the proposed change > Closure on the next line should not be treated as argument > -- > > Key: GROOVY-9484 > URL: https://issues.apache.org/jira/browse/GROOVY-9484 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Priority: Major > Labels: breaking_change > Time Spent: 10m > Remaining Estimate: 0h > > Here is the issue reported by a Groovy user: > in groovy 2.5 > {code:java} > modification| expected > { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) > {code} > these were treated as separate expressions > in groovy 3.0 the closure gets merged as argument to the expected above. > {code:java} > modification | this.expected({ Instant i, ZoneId z -> > i.plusSeconds(1) > }) | defaultInstant.plusSeconds(1) > {code} > I propose to unify the grammar of closure arguments: > {code:java} > // 2 expressions: variable and closure > meth > { p -> > } > // 2 expressions: binary expression and closure > a | meth > { p -> > } > {code} > In the old grammar, the following code is parsed as method call with a > closure argument. > {code:java} > meth > { p -> > } > {code} > Luckily, groovy-parser project containing source code of some famous groovy > projects, none of which are broken because of the proposed change. > See the discussion in the dev mailing list: > [http://groovy.329449.n5.nabble.com/About-eliminating-ambiguities-of-method-call-with-closure-argument-tt5766830.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9484) Closure on the next line should not be treated as argument
[ https://issues.apache.org/jira/browse/GROOVY-9484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9484: --- Description: Here is the issue reported by a Spock user: in groovy 2.5 {code:java} modification| expected { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) {code} these were treated as separate expressions in groovy 3.0 the closure gets merged as argument to the expected above. {code:java} modification | this.expected({ Instant i, ZoneId z -> i.plusSeconds(1) }) | defaultInstant.plusSeconds(1) {code} I propose to unify the grammar of closure arguments: {code:java} // 2 expressions: variable and closure meth { p -> } // 2 expressions: binary expression and closure a | meth { p -> } {code} In the old grammar, the following code is parsed as method call with a closure argument. {code:java} meth { p -> } {code} Luckily, groovy-parser project containing source code of some famous groovy projects, none of which are broken because of the proposed change. See the discussion in the dev mailing list: [http://groovy.329449.n5.nabble.com/About-eliminating-ambiguities-of-method-call-with-closure-argument-tt5766830.html] was: Here is the issue reported by a Groovy user: in groovy 2.5 {code:java} modification| expected { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) {code} these were treated as separate expressions in groovy 3.0 the closure gets merged as argument to the expected above. {code:java} modification | this.expected({ Instant i, ZoneId z -> i.plusSeconds(1) }) | defaultInstant.plusSeconds(1) {code} I propose to unify the grammar of closure arguments: {code:java} // 2 expressions: variable and closure meth { p -> } // 2 expressions: binary expression and closure a | meth { p -> } {code} In the old grammar, the following code is parsed as method call with a closure argument. {code:java} meth { p -> } {code} Luckily, groovy-parser project containing source code of some famous groovy projects, none of which are broken because of the proposed change. See the discussion in the dev mailing list: [http://groovy.329449.n5.nabble.com/About-eliminating-ambiguities-of-method-call-with-closure-argument-tt5766830.html] > Closure on the next line should not be treated as argument > -- > > Key: GROOVY-9484 > URL: https://issues.apache.org/jira/browse/GROOVY-9484 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Priority: Major > Labels: breaking_change > Time Spent: 10m > Remaining Estimate: 0h > > Here is the issue reported by a Spock user: > in groovy 2.5 > {code:java} > modification| expected > { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) > {code} > these were treated as separate expressions > in groovy 3.0 the closure gets merged as argument to the expected above. > {code:java} > modification | this.expected({ Instant i, ZoneId z -> > i.plusSeconds(1) > }) | defaultInstant.plusSeconds(1) > {code} > I propose to unify the grammar of closure arguments: > {code:java} > // 2 expressions: variable and closure > meth > { p -> > } > // 2 expressions: binary expression and closure > a | meth > { p -> > } > {code} > In the old grammar, the following code is parsed as method call with a > closure argument. > {code:java} > meth > { p -> > } > {code} > Luckily, groovy-parser project containing source code of some famous groovy > projects, none of which are broken because of the proposed change. > See the discussion in the dev mailing list: > [http://groovy.329449.n5.nabble.com/About-eliminating-ambiguities-of-method-call-with-closure-argument-tt5766830.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9484) Closure on the next line should not be treated as argument
[ https://issues.apache.org/jira/browse/GROOVY-9484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9484: --- Description: Here is the issue reported by a Groovy user: in groovy 2.5 {code:java} modification| expected { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) {code} these were treated as separate expressions in groovy 3.0 the closure gets merged as argument to the expected above. {code:java} modification | this.expected({ Instant i, ZoneId z -> i.plusSeconds(1) }) | defaultInstant.plusSeconds(1) {code} I propose to unify the grammar of closure arguments: {code:java} // 2 expressions: variable and closure meth { p -> } // 2 expressions: binary expression and closure a | meth { p -> } {code} In the old grammar, the following code is parsed as method call with a closure argument. {code:java} meth { p -> } {code} Luckily, groovy-parser project containing source code of some famous groovy projects, none of which are broken because of the proposed change was: Here is the issue reported by a Groovy user: in groovy 2.5 {code:java} modification| expected { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) {code} these were treated as separate expressions in groovy 3.0 the closure gets merged as argument to the expected above. {code:java} modification | this.expected({ Instant i, ZoneId z -> i.plusSeconds(1) }) | defaultInstant.plusSeconds(1) {code} I propose to unify the grammar of closure arguments: {code:java} // 2 expressions: variable and closure meth { p -> } // 2 expressions: binary expression and closure a | meth { p -> } {code} In the old grammar, the following code is parsed as method call with a closure argument. {code:java} meth { p -> } {code} Luckily, in the groovy-parser project containing source code of some famous groovy projects, none of them are broken because of the proposed change. > Closure on the next line should not be treated as argument > -- > > Key: GROOVY-9484 > URL: https://issues.apache.org/jira/browse/GROOVY-9484 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Priority: Major > Labels: breaking_change > Time Spent: 10m > Remaining Estimate: 0h > > Here is the issue reported by a Groovy user: > in groovy 2.5 > {code:java} > modification| expected > { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) > {code} > these were treated as separate expressions > in groovy 3.0 the closure gets merged as argument to the expected above. > {code:java} > modification | this.expected({ Instant i, ZoneId z -> > i.plusSeconds(1) > }) | defaultInstant.plusSeconds(1) > {code} > I propose to unify the grammar of closure arguments: > {code:java} > // 2 expressions: variable and closure > meth > { p -> > } > // 2 expressions: binary expression and closure > a | meth > { p -> > } > {code} > In the old grammar, the following code is parsed as method call with a > closure argument. > {code:java} > meth > { p -> > } > {code} > Luckily, groovy-parser project containing source code of some famous groovy > projects, none of which are broken because of the proposed change -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9484) Closure on the next line should not be treated as argument
[ https://issues.apache.org/jira/browse/GROOVY-9484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9484: --- Description: Here is the issue reported by a Groovy user: in groovy 2.5 {code:java} modification| expected { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) {code} these were treated as separate expressions in groovy 3.0 the closure gets merged as argument to the expected above. {code:java} modification | this.expected({ Instant i, ZoneId z -> i.plusSeconds(1) }) | defaultInstant.plusSeconds(1) {code} I propose to unify the grammar of closure arguments: {code:java} // 2 expressions: variable and closure meth { p -> } // 2 expressions: binary expression and closure a | meth { p -> } {code} In the old grammar, the following code is parsed as method call with a closure argument. {code:java} meth { p -> } {code} Luckily, in the groovy-parser project containing source code of some famous groovy projects, none of them are broken because of the proposed change. was: in groovy 2.5 {code:java} modification| expected { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) {code} these were treated as separate expressions in groovy 3.0 the closure gets merged as argument to the expected above. {code:java} modification | this.expected({ Instant i, ZoneId z -> i.plusSeconds(1) }) | defaultInstant.plusSeconds(1) {code} > Closure on the next line should not be treated as argument > -- > > Key: GROOVY-9484 > URL: https://issues.apache.org/jira/browse/GROOVY-9484 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Priority: Major > Labels: breaking_change > > Here is the issue reported by a Groovy user: > in groovy 2.5 > {code:java} > modification| expected > { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) > {code} > these were treated as separate expressions > in groovy 3.0 the closure gets merged as argument to the expected above. > {code:java} > modification | this.expected({ Instant i, ZoneId z -> > i.plusSeconds(1) > }) | defaultInstant.plusSeconds(1) > {code} > I propose to unify the grammar of closure arguments: > {code:java} > // 2 expressions: variable and closure > meth > { p -> > } > // 2 expressions: binary expression and closure > a | meth > { p -> > } > {code} > In the old grammar, the following code is parsed as method call with a > closure argument. > {code:java} > meth > { p -> > } > {code} > Luckily, in the groovy-parser project containing source code of some famous > groovy projects, none of them are broken because of the proposed change. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9484) Closure on the next line should not be treated as argument
[ https://issues.apache.org/jira/browse/GROOVY-9484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-9484: --- Labels: breaking_change (was: ) > Closure on the next line should not be treated as argument > -- > > Key: GROOVY-9484 > URL: https://issues.apache.org/jira/browse/GROOVY-9484 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Priority: Major > Labels: breaking_change > > in groovy 2.5 > {code:java} > modification| expected > { Instant i, ZoneId z -> i.plusSeconds(1) } | defaultInstant.plusSeconds(1) > {code} > these were treated as separate expressions > in groovy 3.0 the closure gets merged as argument to the expected above. > {code:java} > modification | this.expected({ Instant i, ZoneId z -> > i.plusSeconds(1) > }) | defaultInstant.plusSeconds(1) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)