[jira] [Resolved] (GROOVY-8632) Groovy 2.5.0 fails to compile Google Java Client sample code

2018-06-14 Thread John Wagenleitner (JIRA)


 [ 
https://issues.apache.org/jira/browse/GROOVY-8632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Wagenleitner resolved GROOVY-8632.
---
   Resolution: Fixed
Fix Version/s: 2.5.1

Thanks for reporting the issue.

> Groovy 2.5.0 fails to compile Google Java Client sample code
> 
>
> Key: GROOVY-8632
> URL: https://issues.apache.org/jira/browse/GROOVY-8632
> Project: Groovy
>  Issue Type: Bug
>  Components: Compiler
>Affects Versions: 2.5.0
> Environment: Ubuntu 18.04, Oracle Java 1.8.0_171-b11, Groovy 2.5.0
>Reporter: Robert Kasanicky
>Assignee: John Wagenleitner
>Priority: Major
> Fix For: 2.5.1
>
>
> I have been using Google Java Client libraries with Groovy 2.4.x successfully 
> but now I'm getting multiple compilation errors when trying to upgrade to 
> Groovy 2.5.0. Note that none of the classes mentioned are actually abstract 
> although the 2.5.0 compiler clearly thinks they are.
> {code}
> @Grab('com.google.apis:google-api-services-analyticsreporting:v4-rev124-1.23.0')
> import com.google.api.services.analyticsreporting.v4.AnalyticsReporting
> @Grab('com.google.apis:google-api-services-sheets:v4-rev525-1.23.0')
> import com.google.api.services.sheets.v4.Sheets
> @Grab('com.google.apis:google-api-services-drive:v3-rev120-1.23.0')
> import com.google.api.services.drive.Drive
> final HTTP_TRANSPORT = null
> final JSON_FACTORY = null
> def requestInitializer = null
> def credential = null
> def builderAnalytics = new AnalyticsReporting.Builder(HTTP_TRANSPORT, 
> JSON_FACTORY, requestInitializer)
> def builderSheets = new Sheets.Builder(HTTP_TRANSPORT, JSON_FACTORY, 
> credential)
> def builderDrive = new Drive.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential)
> {code}
> {code}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed:
> /home/edited/bug25.groovy: 13: You cannot create an instance from the 
> abstract class 
> 'com.google.api.services.analyticsreporting.v4.AnalyticsReporting$Builder'.
>  @ line 13, column 24.
>    def builderAnalytics = new AnalyticsReporting.Builder(HTTP_TRANSPORT, 
> JSON_FACTORY, requestInitializer)
>   ^
> /home/edited/bug25.groovy: 15: You cannot create an instance from the 
> abstract class 'com.google.api.services.sheets.v4.Sheets$Builder'.
>  @ line 15, column 21.
>    def builderSheets = new Sheets.Builder(HTTP_TRANSPORT, JSON_FACTORY, 
> credential)
>    ^
> /home/edited/bug25.groovy: 17: You cannot create an instance from the 
> abstract class 'com.google.api.services.drive.Drive$Builder'.
>  @ line 17, column 20.
>    def builderDrive = new Drive.Builder(HTTP_TRANSPORT, JSON_FACTORY, 
> credential)
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-8505) ArrayIndexOutOfBoundsException with @Nullable change

2018-06-14 Thread John Wagenleitner (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16513256#comment-16513256
 ] 

John Wagenleitner commented on GROOVY-8505:
---

This is the same issue as GROOVY-8008.

> ArrayIndexOutOfBoundsException with @Nullable change
> 
>
> Key: GROOVY-8505
> URL: https://issues.apache.org/jira/browse/GROOVY-8505
> Project: Groovy
>  Issue Type: Bug
>  Components: Compiler
>Affects Versions: 2.4.12
> Environment: See 
> https://scans.gradle.com/s/gr3dszv44wkfg/console-log#L476 for execution 
> details.
>Reporter: Lóránt Pintér
>Priority: Major
>
> *Steps to reproduce:*
> {code}
> $ git clone [https://github.com/gradle/gradle
> $ cd gradle
> $ git checkout c8e7ac4adb2f72390ed681eb8bfdaa4baa8e
> $ ./gradlew :core:compileTestGroovy
> $ # ^ This version works
> $ git revert --no-commit head
> $ ./gradlew :core:compileTestGroovy
> $ # ^ This will fail
> {code}
> The reverted commit is this:
> https://github.com/gradle/gradle/pull/4682/commits/c8e7ac4adb2f72390ed681eb8bfdaa4baa8e
> It removes a {{@Nullable}} annotation from a constructor parameter. If the 
> annotation is present (i.e. the commit is reverted), {{./gradlew 
> :core:compileTestGroovy}} will produce the following exception:
> {code}
> java.lang.ArrayIndexOutOfBoundsException: 1
> at 
> org.codehaus.groovy.vmplugin.v5.Java5.makeParameters(Java5.java:451)
> at 
> org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:382)
> at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:280)
> at 
> org.codehaus.groovy.ast.ClassNode.getUnresolvedSuperClass(ClassNode.java:1009)
> at 
> org.codehaus.groovy.ast.ClassNode.getUnresolvedSuperClass(ClassNode.java:1004)
> at org.codehaus.groovy.ast.ClassNode.getSuperClass(ClassNode.java:998)
> at org.codehaus.groovy.ast.ClassNode.isDerivedFrom(ClassNode.java:941)
> at 
> org.codehaus.groovy.classgen.asm.InvocationWriter.castToNonPrimitiveIfNecessary(InvocationWriter.java:863)
> at 
> org.codehaus.groovy.classgen.asm.OperandStack.doConvertAndCast(OperandStack.java:345)
> at 
> org.codehaus.groovy.classgen.asm.OperandStack.doGroovyCast(OperandStack.java:282)
> at 
> org.codehaus.groovy.classgen.asm.BinaryExpressionHelper.evaluateEqual(BinaryExpressionHelper.java:344)
> at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitDeclarationExpression(AsmClassGenerator.java:637)
> at 
> org.codehaus.groovy.ast.expr.DeclarationExpression.visit(DeclarationExpression.java:89)
> at 
> org.codehaus.groovy.classgen.asm.StatementWriter.writeExpressionStatement(StatementWriter.java:613)
> at 
> org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeExpressionStatement(OptimizingStatementWriter.java:366)
> at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitExpressionStatement(AsmClassGenerator.java:624)
> at 
> org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:42)
> at 
> org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:85)
> at 
> org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:159)
> at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:570)
> at 
> org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71)
> at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:104)
> at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:115)
> at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitStdMethod(AsmClassGenerator.java:434)
> at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:387)
> at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:126)
> at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:511)
> at 
> org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1081)
> at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:53)
> at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:233)
> at 
> org.codehaus.groovy.control.CompilationUnit.call(CompilationUnit.java:825)
> at 
> org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1065)
> at 
> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603

[jira] [Commented] (GROOVY-8008) @CompileStatic causes failure to compile Groovy class that calls overloaded Java method

2018-06-14 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16513255#comment-16513255
 ] 

ASF GitHub Bot commented on GROOVY-8008:


GitHub user jwagenleitner opened a pull request:

https://github.com/apache/groovy/pull/757

GROOVY-8008: AIOOB inner class ctor params with runtime annotations

Should also address 
[GROOVY-8505](https://issues.apache.org/jira/browse/GROOVY-8505) which is the 
same issue.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jwagenleitner/groovy 
8008-aioob-inner-class-ctor-param-annos

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/groovy/pull/757.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #757


commit e5e8da40dc3e2d1d141280ee5162247da7ed3083
Author: John Wagenleitner 
Date:   2018-06-15T02:37:56Z

GROOVY-8008: AIOOB inner class ctor params with runtime annotations




> @CompileStatic causes failure to compile Groovy class that calls overloaded 
> Java method
> ---
>
> Key: GROOVY-8008
> URL: https://issues.apache.org/jira/browse/GROOVY-8008
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.4.5, 2.4.7, 2.4.8
> Environment: Mac OS / Java 8_u112
>Reporter: Renato Athaydes
>Priority: Major
>
> This bug is not making sense to me, but I want to report it because it's 
> incredibly frustrating to get an error message that won't even tell me which 
> file the compiler was trying to compile before throwing an Exception.
> Here's the stacktrace:
> Error:Groovyc: While compiling osgiaas-cli-groovy_main: 
> java.lang.ArrayIndexOutOfBoundsException: 2
>   at org.codehaus.groovy.vmplugin.v5.Java5.makeParameters(Java5.java:443)
>   at 
> org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:376)
>   at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:265)
>   at org.codehaus.groovy.ast.ClassNode.getAnnotations(ClassNode.java:1431)
>   at org.codehaus.groovy.ast.ClassNode.getAnnotations(ClassNode.java:1430)
>   at 
> org.codehaus.groovy.transform.trait.Traits.isAnnotatedWithTrait(Traits.java:170)
>   at org.codehaus.groovy.transform.trait.Traits.isTrait(Traits.java:149)
>   at 
> org.codehaus.groovy.transform.trait.Traits.collectSelfTypes(Traits.java:309)
>   at 
> org.codehaus.groovy.transform.trait.Traits.collectSelfTypes(Traits.java:291)
>   at 
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.addSelfTypes(StaticTypeCheckingVisitor.java:3102)
>   at 
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.makeOwnerList(StaticTypeCheckingVisitor.java:3083)
>   at 
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:2852)
>   at 
> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:297)
>   at 
> org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:66)
>   at 
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:2735)
>   at 
> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:297)
>   at 
> org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:66)
>   at 
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:2735)
>   at 
> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:297)
>   at 
> org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:66)
>   at 
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:2735)
>   at 
> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:297)
>   at 
> org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:66)
>   at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitProperty(ClassCodeVisitorSupport.java:144)
>   at 
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitProperty(StaticTypeCheckingVisitor.java:1518)
>   at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1074)
>   at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:53)
>   at 
> org.codehaus.groovy.transform.s

[GitHub] groovy pull request #757: GROOVY-8008: AIOOB inner class ctor params with ru...

2018-06-14 Thread jwagenleitner
GitHub user jwagenleitner opened a pull request:

https://github.com/apache/groovy/pull/757

GROOVY-8008: AIOOB inner class ctor params with runtime annotations

Should also address 
[GROOVY-8505](https://issues.apache.org/jira/browse/GROOVY-8505) which is the 
same issue.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jwagenleitner/groovy 
8008-aioob-inner-class-ctor-param-annos

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/groovy/pull/757.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #757


commit e5e8da40dc3e2d1d141280ee5162247da7ed3083
Author: John Wagenleitner 
Date:   2018-06-15T02:37:56Z

GROOVY-8008: AIOOB inner class ctor params with runtime annotations




---


[jira] [Commented] (GROOVY-8614) Invalid reference generated in InnerClasses attribute for nested interface

2018-06-14 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16513249#comment-16513249
 ] 

ASF GitHub Bot commented on GROOVY-8614:


GitHub user jwagenleitner opened a pull request:

https://github.com/apache/groovy/pull/756

GROOVY-8614: Invalid reference generated in InnerClasses attribute fo…

…r nested interface

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jwagenleitner/groovy 
8614-invalid-inner-nested-interface

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/groovy/pull/756.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #756


commit 97c9d108de7197dcdc1aa55a8fc9af18a8880e17
Author: John Wagenleitner 
Date:   2018-06-15T02:31:59Z

GROOVY-8614: Invalid reference generated in InnerClasses attribute for 
nested interface




> Invalid reference generated in InnerClasses attribute for nested interface
> --
>
> Key: GROOVY-8614
> URL: https://issues.apache.org/jira/browse/GROOVY-8614
> Project: Groovy
>  Issue Type: Bug
>  Components: class generator
>Affects Versions: 2.4.15
>Reporter: Tony Abbott
>Priority: Minor
>
> Compiling a class with a nested interface results in a reference to a 
> non-existent inner class "X$Y$1" in the InnerClasses attribute of the 
> resultant class file. Nested classes and inner classes do not exhibit this 
> problem, only nested interfaces.
> Sample class that demonstrates the problem:
> {code:java}
> class X {
> interface Y {}
> }
> {code}
> Examining the resultant class file:
> {noformat}
> $ javap -v -cp . X.class
> ...
> SourceFile: "X.groovy"
> InnerClasses:
>  public #139= #138 of #2; //Y=class X$Y of class X
>  static #142= #141 of #2; //1=class X$Y$1 of class X
> {noformat}
> There is a reference to "X$Y$1" which does not exist. This breaks some tools, 
> for example JUnit 5 test discovery.
>  
> It looks to me like this is related to 
> https://issues.apache.org/jira/browse/GROOVY-5082, being the same bug just 
> manifesting for nested interfaces.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] groovy pull request #756: GROOVY-8614: Invalid reference generated in InnerC...

2018-06-14 Thread jwagenleitner
GitHub user jwagenleitner opened a pull request:

https://github.com/apache/groovy/pull/756

GROOVY-8614: Invalid reference generated in InnerClasses attribute fo…

…r nested interface

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jwagenleitner/groovy 
8614-invalid-inner-nested-interface

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/groovy/pull/756.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #756


commit 97c9d108de7197dcdc1aa55a8fc9af18a8880e17
Author: John Wagenleitner 
Date:   2018-06-15T02:31:59Z

GROOVY-8614: Invalid reference generated in InnerClasses attribute for 
nested interface




---


[jira] [Commented] (GROOVY-8632) Groovy 2.5.0 fails to compile Google Java Client sample code

2018-06-14 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16513246#comment-16513246
 ] 

ASF GitHub Bot commented on GROOVY-8632:


Github user asfgit closed the pull request at:

https://github.com/apache/groovy/pull/753


> Groovy 2.5.0 fails to compile Google Java Client sample code
> 
>
> Key: GROOVY-8632
> URL: https://issues.apache.org/jira/browse/GROOVY-8632
> Project: Groovy
>  Issue Type: Bug
>  Components: Compiler
>Affects Versions: 2.5.0
> Environment: Ubuntu 18.04, Oracle Java 1.8.0_171-b11, Groovy 2.5.0
>Reporter: Robert Kasanicky
>Assignee: John Wagenleitner
>Priority: Major
>
> I have been using Google Java Client libraries with Groovy 2.4.x successfully 
> but now I'm getting multiple compilation errors when trying to upgrade to 
> Groovy 2.5.0. Note that none of the classes mentioned are actually abstract 
> although the 2.5.0 compiler clearly thinks they are.
> {code}
> @Grab('com.google.apis:google-api-services-analyticsreporting:v4-rev124-1.23.0')
> import com.google.api.services.analyticsreporting.v4.AnalyticsReporting
> @Grab('com.google.apis:google-api-services-sheets:v4-rev525-1.23.0')
> import com.google.api.services.sheets.v4.Sheets
> @Grab('com.google.apis:google-api-services-drive:v3-rev120-1.23.0')
> import com.google.api.services.drive.Drive
> final HTTP_TRANSPORT = null
> final JSON_FACTORY = null
> def requestInitializer = null
> def credential = null
> def builderAnalytics = new AnalyticsReporting.Builder(HTTP_TRANSPORT, 
> JSON_FACTORY, requestInitializer)
> def builderSheets = new Sheets.Builder(HTTP_TRANSPORT, JSON_FACTORY, 
> credential)
> def builderDrive = new Drive.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential)
> {code}
> {code}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed:
> /home/edited/bug25.groovy: 13: You cannot create an instance from the 
> abstract class 
> 'com.google.api.services.analyticsreporting.v4.AnalyticsReporting$Builder'.
>  @ line 13, column 24.
>    def builderAnalytics = new AnalyticsReporting.Builder(HTTP_TRANSPORT, 
> JSON_FACTORY, requestInitializer)
>   ^
> /home/edited/bug25.groovy: 15: You cannot create an instance from the 
> abstract class 'com.google.api.services.sheets.v4.Sheets$Builder'.
>  @ line 15, column 21.
>    def builderSheets = new Sheets.Builder(HTTP_TRANSPORT, JSON_FACTORY, 
> credential)
>    ^
> /home/edited/bug25.groovy: 17: You cannot create an instance from the 
> abstract class 'com.google.api.services.drive.Drive$Builder'.
>  @ line 17, column 20.
>    def builderDrive = new Drive.Builder(HTTP_TRANSPORT, JSON_FACTORY, 
> credential)
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] groovy pull request #753: GROOVY-8632: Groovy 2.5.0 fails to compile Google ...

2018-06-14 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/groovy/pull/753


---


[jira] [Commented] (GROOVY-8612) sql query with empty parameter list returns errors

2018-06-14 Thread John Wagenleitner (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16512827#comment-16512827
 ] 

John Wagenleitner commented on GROOVY-8612:
---

A work-around in Groovy 2.4.15 would be to set the following prior to executing 
the sql:
{code}
sql.enableMetaDataChecking = true{code}
In 2.5.0 it's turned on by default.

> sql query with empty parameter list returns errors
> --
>
> Key: GROOVY-8612
> URL: https://issues.apache.org/jira/browse/GROOVY-8612
> Project: Groovy
>  Issue Type: Bug
>  Components: SQL processing
>Affects Versions: 2.4.15
>Reporter: Ludger Wolter
>Priority: Major
>
> {code:java}
> import groovy.sql.Sql
> import oracle.jdbc.driver.OracleConnection
> def sql = Sql.newInstance("jdbc:oracle:thin:@dev6418:1521:l101", "allcus", 
> "allcus", "oracle.jdbc.OracleDriver")
> def sqlParams = [:]
> def row = sql.firstRow('select count(*) icount from all_tables', 
> Arrays.asList(sqlParams))
> println row.icount
> {code}
> {code:java}
> Mai 28, 2018 4:08:36 PM groovy.sql.Sql$AbstractQueryCommand execute
> WARNUNG: Failed to execute: select count(*) icount from all_tables because: 
> Ungültiger Spaltentyp
> Mai 28, 2018 4:08:36 PM groovy.sql.Sql$AbstractQueryCommand execute
> WARNUNG: Failed to execute: select count(*) icount from all_tables because: 
> Ungültiger Spaltentyp
> Exception thrown
> java.sql.SQLException: Ungültiger Spaltentyp
>   at 
> oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:10495)
>   at 
> oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:9974)
>   at 
> oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:10799)
>   at 
> oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:10776)
>   at 
> oracle.jdbc.driver.OraclePreparedStatementWrapper.setObject(OraclePreparedStatementWrapper.java:241)
>   at ConsoleScript8.run(ConsoleScript8:8)
> {code}
> {code:java}
> def sqlParams = [a:1]{code}
> also provides an error but following works
>  {code}
> def sqlParams = [a:1, b:1]
> def row = sql.firstRow('select count(*) icount from all_tables where 1=:a', 
> Arrays.asList(sqlParams))
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-8644) Groovy 2.5 binary JARs not available at Maven Central

2018-06-14 Thread Paul King (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16512582#comment-16512582
 ] 

Paul King commented on GROOVY-8644:
---

In most cases there should be no change. Some builds however seem to be more 
temperamental than others. 

> Groovy 2.5 binary JARs not available at Maven Central
> -
>
> Key: GROOVY-8644
> URL: https://issues.apache.org/jira/browse/GROOVY-8644
> Project: Groovy
>  Issue Type: Bug
>  Components: release
>Affects Versions: 2.5.0
>Reporter: Alexander Veit
>Priority: Critical
>
> See [http://central.maven.org/maven2/org/codehaus/groovy/groovy-all/2.5.0/]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-8644) Groovy 2.5 binary JARs not available at Maven Central

2018-06-14 Thread Alexander Veit (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16512524#comment-16512524
 ] 

Alexander Veit commented on GROOVY-8644:


Is the a documentation how to migrate existing applications from groovy-all.jar 
to the split JARs?

> Groovy 2.5 binary JARs not available at Maven Central
> -
>
> Key: GROOVY-8644
> URL: https://issues.apache.org/jira/browse/GROOVY-8644
> Project: Groovy
>  Issue Type: Bug
>  Components: release
>Affects Versions: 2.5.0
>Reporter: Alexander Veit
>Priority: Critical
>
> See [http://central.maven.org/maven2/org/codehaus/groovy/groovy-all/2.5.0/]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (GROOVY-8645) ClassCastException after checking of instanceOf

2018-06-14 Thread Aram Arabyan (JIRA)


 [ 
https://issues.apache.org/jira/browse/GROOVY-8645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aram Arabyan updated GROOVY-8645:
-
Description: 
 Have grails (version 3.2.11) application (it includes groovy-2.4.11.jar). And 
following code

{code:groovy}
 @CompileStatic
def removeAllErrors(DomainClass domainInstance) {
newAssociationOperationRunnerBuilder(domainInstance)
.setSkipChain({DomainObjectDetails 
domainObjectDetails ->
skipValidation(domainObjectDetails.currentDomain.domainObject, 
domainObjectDetails.associationProp?.name)})
.build().run({DomainObjectDetails 
domainObjectDetails ->
DomainClass domain = domainObjectDetails.currentDomain.domainObject
if (domain instanceof GormValidateable) {
((GormValidateable)domain).clearErrors()
}
if(domain instanceof WarningsHolder) {
WarningsHolder warningsHolder = domain as WarningsHolder 
//<--line 120
Warnings warnings = warningsHolder.getWarnings()
warnings.clearWarnings(false, true)
}
})
}
{code}

And I am getting following exception

{code}
java.lang.IllegalArgumentException: java.lang.ClassCastException@58798bfb
at sun.reflect.GeneratedMethodAccessor5958.invoke(Unknown Source)
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:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1125)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at 
org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:925)
at 
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:908)
at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:168)
at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.asType(ScriptBytecodeAdapter.java:591)
at 
com.webbfontaine.grails.plugins.validation.rules.DocVerificationService$_removeAllErrors_closure5.doCall(DocVerificationService.groovy:120)
at sun.reflect.GeneratedMethodAccessor2559.invoke(Unknown Source)
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:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325){code}

Any idea what can be the reason ? Pay attention that I have @CompileStatic 
there also.

= 
Previous version of this code was without @CompileStatic

{code:groovy}
 def removeAllErrors(def domainInstance) {
newAssociationOperationRunnerBuilder(domainInstance)
.setSkipChain({DomainObjectDetails 
domainObjectDetails ->
skipValidation(domainObjectDetails.currentDomain.domainObject, 
domainObjectDetails.associationProp?.name)})
.build().run({DomainObjectDetails 
domainObjectDetails ->
domainObjectDetails.currentDomain.domainObject.clearErrors()
if(domainObjectDetails.currentDomain.domainObject instanceof 
WarningsHolder) {
Warnings warnings = 
domainObjectDetails.currentDomain.domainObject.getWarnings()
warnings.clearWarnings(false, true)
}
})
}
{code}

And I was getting this exception

{code}
com.webbfontaine.sw.sad.ci.Item cannot be cast to 
com.webbfontaine.sw.sad.ci.Item_$$_jvst840_3. Stacktrace follows: 
java.lang.ClassCastException: com.webbfontaine.sw.sad.ci.Item cannot be cast to 
com.webbfontaine.sw.sad.ci.Item_$$_jvst840_3 at 
com.webbfontaine.grails.plugins.validation.rules.DocVerificationService$_removeAllErrors_closure5.doCall(DocVerificationService.groovy:111){code}

  was:
 Have grails (version 3.2.11) application (it includes groovy-2.4.11.jar). And 
following code

{code:groovy}
 @CompileStatic
def removeAllErrors(DomainClass domainInstance) {
newAssociationOperationRunnerBuilder(domainInstance)
.setSkipChain({DomainObjectDetails 
domainObjectDetails ->
skipValidation(domainObjectDetails.currentDomain.domainObject, 
domainObjectDetails.associationProp?.name)})
.build().run({DomainObjectDetails 
domainObjectDetails ->
DomainClass domain = domainObjectDetails.currentDomain.domainObject
if (domain instanceof GormValidateable) {
((GormValidateable)domain).clearErrors()
}
if(doma

[jira] [Updated] (GROOVY-8645) ClassCastException after checking of instanceOf

2018-06-14 Thread Aram Arabyan (JIRA)


 [ 
https://issues.apache.org/jira/browse/GROOVY-8645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aram Arabyan updated GROOVY-8645:
-
Description: 
 Have grails (version 3.2.11) application (it includes groovy-2.4.11.jar). And 
following code

{code:groovy}
 @CompileStatic
def removeAllErrors(DomainClass domainInstance) {
newAssociationOperationRunnerBuilder(domainInstance)
.setSkipChain({DomainObjectDetails 
domainObjectDetails ->
skipValidation(domainObjectDetails.currentDomain.domainObject, 
domainObjectDetails.associationProp?.name)})
.build().run({DomainObjectDetails 
domainObjectDetails ->
DomainClass domain = domainObjectDetails.currentDomain.domainObject
if (domain instanceof GormValidateable) {
((GormValidateable)domain).clearErrors()
}
if(domain instanceof WarningsHolder) {
WarningsHolder warningsHolder = domain as WarningsHolder 
//<--line 120
Warnings warnings = warningsHolder.getWarnings()
warnings.clearWarnings(false, true)
}
})
}
{code}

And I am getting following exception

{code}
java.lang.IllegalArgumentException: java.lang.ClassCastException@58798bfb
at sun.reflect.GeneratedMethodAccessor5958.invoke(Unknown Source)
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:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1125)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at 
org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:925)
at 
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:908)
at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:168)
at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.asType(ScriptBytecodeAdapter.java:591)
at 
com.webbfontaine.grails.plugins.validation.rules.DocVerificationService$_removeAllErrors_closure5.doCall(DocVerificationService.groovy:120)
at sun.reflect.GeneratedMethodAccessor2559.invoke(Unknown Source)
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:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325){code}

Any idea what can be the reason ? Pay attention that I have @CompileStatic 
there also.

= 
Previous version of this code was without @CompileStatic

{code}
 def removeAllErrors(def domainInstance) {
newAssociationOperationRunnerBuilder(domainInstance)
.setSkipChain({DomainObjectDetails 
domainObjectDetails ->
skipValidation(domainObjectDetails.currentDomain.domainObject, 
domainObjectDetails.associationProp?.name)})
.build().run({DomainObjectDetails 
domainObjectDetails ->
domainObjectDetails.currentDomain.domainObject.clearErrors()
if(domainObjectDetails.currentDomain.domainObject instanceof 
WarningsHolder) {
Warnings warnings = 
domainObjectDetails.currentDomain.domainObject.getWarnings()
warnings.clearWarnings(false, true)
}
})
}
{code}

And I was getting this exception

{code}
{{com.webbfontaine.sw.sad.ci.Item cannot be cast to 
com.webbfontaine.sw.sad.ci.Item_$$_jvst840_3. Stacktrace follows: 
java.lang.ClassCastException: com.webbfontaine.sw.sad.ci.Item cannot be cast to 
com.webbfontaine.sw.sad.ci.Item_$$_jvst840_3 at 
com.webbfontaine.grails.plugins.validation.rules.DocVerificationService$_removeAllErrors_closure5.doCall(DocVerificationService.groovy:111)\{code}}}

  was:
 Have grails (version 3.2.11) application (it includes groovy-2.4.11.jar). And 
following code

{code}
 @CompileStatic
def removeAllErrors(DomainClass domainInstance) {
newAssociationOperationRunnerBuilder(domainInstance)
.setSkipChain({DomainObjectDetails 
domainObjectDetails ->
skipValidation(domainObjectDetails.currentDomain.domainObject, 
domainObjectDetails.associationProp?.name)})
.build().run({DomainObjectDetails 
domainObjectDetails ->
DomainClass domain = domainObjectDetails.currentDomain.domainObject
if (domain instanceof GormValidateable) {
((GormValidateable)domain).clearErrors()
}
if(domain instan

[jira] [Updated] (GROOVY-8645) ClassCastException after checking of instanceOf

2018-06-14 Thread Aram Arabyan (JIRA)


 [ 
https://issues.apache.org/jira/browse/GROOVY-8645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aram Arabyan updated GROOVY-8645:
-
Description: 
 Have grails (version 3.2.11) application (it includes groovy-2.4.11.jar). And 
following code

{code}
 @CompileStatic
def removeAllErrors(DomainClass domainInstance) {
newAssociationOperationRunnerBuilder(domainInstance)
.setSkipChain({DomainObjectDetails 
domainObjectDetails ->
skipValidation(domainObjectDetails.currentDomain.domainObject, 
domainObjectDetails.associationProp?.name)})
.build().run({DomainObjectDetails 
domainObjectDetails ->
DomainClass domain = domainObjectDetails.currentDomain.domainObject
if (domain instanceof GormValidateable) {
((GormValidateable)domain).clearErrors()
}
if(domain instanceof WarningsHolder) {
WarningsHolder warningsHolder = domain as WarningsHolder 
//<--line 120
Warnings warnings = warningsHolder.getWarnings()
warnings.clearWarnings(false, true)
}
})
}
{code}

And I am getting following exception

{code}
java.lang.IllegalArgumentException: java.lang.ClassCastException@58798bfb
at sun.reflect.GeneratedMethodAccessor5958.invoke(Unknown Source)
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:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1125)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at 
org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:925)
at 
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:908)
at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:168)
at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.asType(ScriptBytecodeAdapter.java:591)
at 
com.webbfontaine.grails.plugins.validation.rules.DocVerificationService$_removeAllErrors_closure5.doCall(DocVerificationService.groovy:120)
at sun.reflect.GeneratedMethodAccessor2559.invoke(Unknown Source)
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:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325){code}

Any idea what can be the reason ? Pay attention that I have @CompileStatic 
there also.

= 
Previous version of this code was without @CompileStatic

{code}
 def removeAllErrors(def domainInstance) {
newAssociationOperationRunnerBuilder(domainInstance)
.setSkipChain({DomainObjectDetails 
domainObjectDetails ->
skipValidation(domainObjectDetails.currentDomain.domainObject, 
domainObjectDetails.associationProp?.name)})
.build().run({DomainObjectDetails 
domainObjectDetails ->
domainObjectDetails.currentDomain.domainObject.clearErrors()
if(domainObjectDetails.currentDomain.domainObject instanceof 
WarningsHolder) {
Warnings warnings = 
domainObjectDetails.currentDomain.domainObject.getWarnings()
warnings.clearWarnings(false, true)
}
})
}
{code}

And I was getting this exception

{code}
{{com.webbfontaine.sw.sad.ci.Item cannot be cast to 
com.webbfontaine.sw.sad.ci.Item_$$_jvst840_3. Stacktrace follows: 
java.lang.ClassCastException: com.webbfontaine.sw.sad.ci.Item cannot be cast to 
com.webbfontaine.sw.sad.ci.Item_$$_jvst840_3 at 
com.webbfontaine.grails.plugins.validation.rules.DocVerificationService$_removeAllErrors_closure5.doCall(DocVerificationService.groovy:111)\{code}}}

  was:
 Have grails (version 3.2.11) application (it includes groovy-2.4.11.jar). And 
following code

{code}
{{ @CompileStatic def removeAllErrors(DomainClass domainInstance) { 
newAssociationOperationRunnerBuilder(domainInstance) 
.setSkipChain({DomainObjectDetails domainObjectDetails 
-> skipValidation(domainObjectDetails.currentDomain.domainObject, 
domainObjectDetails.associationProp?.name)}) 
.build().run({DomainObjectDetails domainObjectDetails 
-> DomainClass domain = domainObjectDetails.currentDomain.domainObject if 
(domain instanceof GormValidateable) { ((GormValidateable)domain).clearErrors() 
} if(domain instanceof WarningsHolder) { WarningsHolder warningsHolder = domain 
as WarningsHolder //<--- line 120 Warning

[jira] [Created] (GROOVY-8645) ClassCastException after checking of instanceOf

2018-06-14 Thread Aram Arabyan (JIRA)
Aram Arabyan created GROOVY-8645:


 Summary: ClassCastException after checking of instanceOf
 Key: GROOVY-8645
 URL: https://issues.apache.org/jira/browse/GROOVY-8645
 Project: Groovy
  Issue Type: Bug
  Components: groovy-runtime
Affects Versions: 2.4.11
Reporter: Aram Arabyan


 Have grails (version 3.2.11) application (it includes groovy-2.4.11.jar). And 
following code

{code}
{{ @CompileStatic def removeAllErrors(DomainClass domainInstance) { 
newAssociationOperationRunnerBuilder(domainInstance) 
.setSkipChain({DomainObjectDetails domainObjectDetails 
-> skipValidation(domainObjectDetails.currentDomain.domainObject, 
domainObjectDetails.associationProp?.name)}) 
.build().run({DomainObjectDetails domainObjectDetails 
-> DomainClass domain = domainObjectDetails.currentDomain.domainObject if 
(domain instanceof GormValidateable) { ((GormValidateable)domain).clearErrors() 
} if(domain instanceof WarningsHolder) { WarningsHolder warningsHolder = domain 
as WarningsHolder //<--- line 120 Warnings warnings = 
warningsHolder.getWarnings() warnings.clearWarnings(false, true) } }) }}}
{code}

And I am getting following exception

{code}
{{}}
{{2018-06-14 10:16:41,647 ERROR StackTrace - Full Stack Trace: 
java.lang.IllegalArgumentException: java.lang.ClassCastException@3f6e3869 at 
sun.reflect.GeneratedMethodAccessor5958.invoke(Unknown Source) 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:93) at 
groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at 
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) at 
groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1125) at 
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at 
org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:925)
 at 
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:908) 
at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:168)
 at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.asType(ScriptBytecodeAdapter.java:591)
 at 
com.webbfontaine.grails.plugins.validation.rules.DocVerificationService$_removeAllErrors_closure5.doCall(DocVerificationService.groovy:120)}}
{code}

Any idea what can be the reason ? Pay attention that I have @CompileStatic 
there also.

= 
Previous version of this code was without @CompileStatic

{code}
{{ def removeAllErrors(def domainInstance) { 
newAssociationOperationRunnerBuilder(domainInstance) 
.setSkipChain({DomainObjectDetails domainObjectDetails 
-> skipValidation(domainObjectDetails.currentDomain.domainObject, 
domainObjectDetails.associationProp?.name)}) 
.build().run({DomainObjectDetails domainObjectDetails 
-> domainObjectDetails.currentDomain.domainObject.clearErrors() 
if(domainObjectDetails.currentDomain.domainObject instanceof WarningsHolder) { 
Warnings warnings = 
domainObjectDetails.currentDomain.domainObject.getWarnings() 
warnings.clearWarnings(false, true) } }) }}}
{code}

And I was getting this exception

{code}
{{com.webbfontaine.sw.sad.ci.Item cannot be cast to 
com.webbfontaine.sw.sad.ci.Item_$$_jvst840_3. Stacktrace follows: 
java.lang.ClassCastException: com.webbfontaine.sw.sad.ci.Item cannot be cast to 
com.webbfontaine.sw.sad.ci.Item_$$_jvst840_3 at 
com.webbfontaine.grails.plugins.validation.rules.DocVerificationService$_removeAllErrors_closure5.doCall(DocVerificationService.groovy:111)\{code}}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-8637) @NamedVariant processing error

2018-06-14 Thread Paul King (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16512377#comment-16512377
 ] 

Paul King commented on GROOVY-8637:
---

Yes, I believe we can now check for @Generated annotated methods and skip if 
found.

> @NamedVariant processing error
> --
>
> Key: GROOVY-8637
> URL: https://issues.apache.org/jira/browse/GROOVY-8637
> Project: Groovy
>  Issue Type: Bug
>  Components: Compiler
>Reporter: Alexey Afanasiev
>Priority: Critical
>
> Example about @NamedVariant from 
> http://groovy-lang.org/releasenotes/groovy-2.5.html works perfectly well as 
> far as all @NamedDelegate type are compiling in the same compilation unit.
> {code:java}
> class Animal {
> String type, name
> }
> @ToString(includeNames=true)
> class Color {
> Integer r, g, b
> }
> @NamedVariant
> String foo(String s1, @NamedParam String s2,
>@NamedDelegate Color shade,
>@NamedDelegate Animal pet) {
> "$s1 $s2 ${pet.type?.toUpperCase()}:$pet.name $shade"
> }
> {code}
> But let's modify this example. If you have Animal an Color classes compiled 
> beforehand and passed to the compiler with classpath, you will receive 'Error 
> during @NamedVariant processing. Duplicate property 'metaClass' found.' 
> NamedVariantASTTransformation treats 'setMetaClass' method as set method of 
> some property with ''metaClass' name. Obviously these names are clashed at 
> compile time.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-8634) New warning messages for 2.5 and Java7

2018-06-14 Thread Paul King (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16512374#comment-16512374
 ] 

Paul King commented on GROOVY-8634:
---

Changed priority since this is expected and desired behavior as far as the 
\{{groovy-datetime}} module is concerned, and the bridge loading order is more 
or less out of our control.

> New warning messages for 2.5 and Java7
> --
>
> Key: GROOVY-8634
> URL: https://issues.apache.org/jira/browse/GROOVY-8634
> Project: Groovy
>  Issue Type: Bug
> Environment: -bash-4.1$ uname -a
> Linux xx 2.6.32-696.20.1.el6.x86_64 #1 SMP Thu Jan 25 
> 15:32:38 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
>Reporter: Erick Nelson
>Priority: Minor
>
> On a server we still have Java7 installed, I'm getting these warning 
> messages. They look like JUL logging but I'm not sure. I have the 
> jul-to-slf4j bridge installed but these messages don't seem to be rerouted so 
> I'm not sure what the source is at the moment.  I don't mind the warnings, as 
> long as I can capture and properly log them.
>  
> -bash-4.1$ /opt/apps/tools/groovy/bin/groovy -v
> Jun 04, 2018 7:03:01 AM 
> org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
> WARNING: Module [groovy-datetime] - Unable to load extension class 
> [org.apache.groovy.datetime.extensions.DateTimeExtensions]
> Jun 04, 2018 7:03:01 AM 
> org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
> WARNING: Module [groovy-datetime] - Unable to load extension class 
> [org.apache.groovy.datetime.extensions.DateTimeStaticExtensions]
> Groovy Version: *2.5.0* JVM*: 1.7.0_161* Vendor: Oracle Corporation OS: Linux
>  
> The bridge that I am using is...
>     
>     org.slf4j
>     jul-to-slf4j
>     1.7.9
>     
>  
> And I'm invoking it in my startup with...
>     static void createJulBridge (BaseScript script) {
>         try {
>             java.util.logging.LogManager.getLogManager().reset()
>             SLF4JBridgeHandler.removeHandlersForRootLogger()
>             SLF4JBridgeHandler.install()
>         }
>         catch (Exception e) {
>             script._warn << "jul->slf4j bridge install error [${e.message}]"
>         }
>     }
>  
> I think my problem might be that those messages are coming up before I can 
> hookup the bridge.
>  
> Any insight on this you can give me?
> It would be nice if there was a way to suppress or delay these warnings. As 
> it is , this is keeping me from using 2.5.0.
> In the meantime I am trying to get our admins to upgrade to at least Java8... 
> but that might take some time.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (GROOVY-8634) New warning messages for 2.5 and Java7

2018-06-14 Thread Paul King (JIRA)


 [ 
https://issues.apache.org/jira/browse/GROOVY-8634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King updated GROOVY-8634:
--
Priority: Minor  (was: Blocker)

> New warning messages for 2.5 and Java7
> --
>
> Key: GROOVY-8634
> URL: https://issues.apache.org/jira/browse/GROOVY-8634
> Project: Groovy
>  Issue Type: Bug
> Environment: -bash-4.1$ uname -a
> Linux xx 2.6.32-696.20.1.el6.x86_64 #1 SMP Thu Jan 25 
> 15:32:38 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
>Reporter: Erick Nelson
>Priority: Minor
>
> On a server we still have Java7 installed, I'm getting these warning 
> messages. They look like JUL logging but I'm not sure. I have the 
> jul-to-slf4j bridge installed but these messages don't seem to be rerouted so 
> I'm not sure what the source is at the moment.  I don't mind the warnings, as 
> long as I can capture and properly log them.
>  
> -bash-4.1$ /opt/apps/tools/groovy/bin/groovy -v
> Jun 04, 2018 7:03:01 AM 
> org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
> WARNING: Module [groovy-datetime] - Unable to load extension class 
> [org.apache.groovy.datetime.extensions.DateTimeExtensions]
> Jun 04, 2018 7:03:01 AM 
> org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
> WARNING: Module [groovy-datetime] - Unable to load extension class 
> [org.apache.groovy.datetime.extensions.DateTimeStaticExtensions]
> Groovy Version: *2.5.0* JVM*: 1.7.0_161* Vendor: Oracle Corporation OS: Linux
>  
> The bridge that I am using is...
>     
>     org.slf4j
>     jul-to-slf4j
>     1.7.9
>     
>  
> And I'm invoking it in my startup with...
>     static void createJulBridge (BaseScript script) {
>         try {
>             java.util.logging.LogManager.getLogManager().reset()
>             SLF4JBridgeHandler.removeHandlersForRootLogger()
>             SLF4JBridgeHandler.install()
>         }
>         catch (Exception e) {
>             script._warn << "jul->slf4j bridge install error [${e.message}]"
>         }
>     }
>  
> I think my problem might be that those messages are coming up before I can 
> hookup the bridge.
>  
> Any insight on this you can give me?
> It would be nice if there was a way to suppress or delay these warnings. As 
> it is , this is keeping me from using 2.5.0.
> In the meantime I am trying to get our admins to upgrade to at least Java8... 
> but that might take some time.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-8634) New warning messages for 2.5 and Java7

2018-06-14 Thread Paul King (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16512372#comment-16512372
 ] 

Paul King commented on GROOVY-8634:
---

Or just exclude {{groovy-datetime}} in your pom.

> New warning messages for 2.5 and Java7
> --
>
> Key: GROOVY-8634
> URL: https://issues.apache.org/jira/browse/GROOVY-8634
> Project: Groovy
>  Issue Type: Bug
> Environment: -bash-4.1$ uname -a
> Linux xx 2.6.32-696.20.1.el6.x86_64 #1 SMP Thu Jan 25 
> 15:32:38 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
>Reporter: Erick Nelson
>Priority: Blocker
>
> On a server we still have Java7 installed, I'm getting these warning 
> messages. They look like JUL logging but I'm not sure. I have the 
> jul-to-slf4j bridge installed but these messages don't seem to be rerouted so 
> I'm not sure what the source is at the moment.  I don't mind the warnings, as 
> long as I can capture and properly log them.
>  
> -bash-4.1$ /opt/apps/tools/groovy/bin/groovy -v
> Jun 04, 2018 7:03:01 AM 
> org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
> WARNING: Module [groovy-datetime] - Unable to load extension class 
> [org.apache.groovy.datetime.extensions.DateTimeExtensions]
> Jun 04, 2018 7:03:01 AM 
> org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
> WARNING: Module [groovy-datetime] - Unable to load extension class 
> [org.apache.groovy.datetime.extensions.DateTimeStaticExtensions]
> Groovy Version: *2.5.0* JVM*: 1.7.0_161* Vendor: Oracle Corporation OS: Linux
>  
> The bridge that I am using is...
>     
>     org.slf4j
>     jul-to-slf4j
>     1.7.9
>     
>  
> And I'm invoking it in my startup with...
>     static void createJulBridge (BaseScript script) {
>         try {
>             java.util.logging.LogManager.getLogManager().reset()
>             SLF4JBridgeHandler.removeHandlersForRootLogger()
>             SLF4JBridgeHandler.install()
>         }
>         catch (Exception e) {
>             script._warn << "jul->slf4j bridge install error [${e.message}]"
>         }
>     }
>  
> I think my problem might be that those messages are coming up before I can 
> hookup the bridge.
>  
> Any insight on this you can give me?
> It would be nice if there was a way to suppress or delay these warnings. As 
> it is , this is keeping me from using 2.5.0.
> In the meantime I am trying to get our admins to upgrade to at least Java8... 
> but that might take some time.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (GROOVY-8644) Groovy 2.5 binary JARs not available at Maven Central

2018-06-14 Thread Paul King (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16512364#comment-16512364
 ] 

Paul King edited comment on GROOVY-8644 at 6/14/18 11:49 AM:
-

For improved Java 9+ compatibility (avoiding split package issues), there is no 
longer a "fat jar" just a "fat pom" which brings in all the component jars.


was (Author: paulk):
For improved Java 9+ compatibility (avoiding split package issues), there is no 
longer a fat jar, just a fat pom which brings in all the component jars.

> Groovy 2.5 binary JARs not available at Maven Central
> -
>
> Key: GROOVY-8644
> URL: https://issues.apache.org/jira/browse/GROOVY-8644
> Project: Groovy
>  Issue Type: Bug
>  Components: release
>Affects Versions: 2.5.0
>Reporter: Alexander Veit
>Priority: Critical
>
> See [http://central.maven.org/maven2/org/codehaus/groovy/groovy-all/2.5.0/]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-8644) Groovy 2.5 binary JARs not available at Maven Central

2018-06-14 Thread Paul King (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16512364#comment-16512364
 ] 

Paul King commented on GROOVY-8644:
---

For improved Java 9+ compatibility (avoiding split package issues), there is no 
longer a fat jar, just a fat pom which brings in all the component jars.

> Groovy 2.5 binary JARs not available at Maven Central
> -
>
> Key: GROOVY-8644
> URL: https://issues.apache.org/jira/browse/GROOVY-8644
> Project: Groovy
>  Issue Type: Bug
>  Components: release
>Affects Versions: 2.5.0
>Reporter: Alexander Veit
>Priority: Critical
>
> See [http://central.maven.org/maven2/org/codehaus/groovy/groovy-all/2.5.0/]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (GROOVY-8644) Groovy 2.5 binary JARs not available at Maven Central

2018-06-14 Thread Alexander Veit (JIRA)


 [ 
https://issues.apache.org/jira/browse/GROOVY-8644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexander Veit updated GROOVY-8644:
---
Summary: Groovy 2.5 binary JARs not available at Maven Central  (was: 
Groovy 2.5 binary JARS not available at Maven Central)

> Groovy 2.5 binary JARs not available at Maven Central
> -
>
> Key: GROOVY-8644
> URL: https://issues.apache.org/jira/browse/GROOVY-8644
> Project: Groovy
>  Issue Type: Bug
>  Components: release
>Affects Versions: 2.5.0
>Reporter: Alexander Veit
>Priority: Critical
>
> See [http://central.maven.org/maven2/org/codehaus/groovy/groovy-all/2.5.0/]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (GROOVY-8644) Groovy 2.5 binary JARS not available at Maven Central

2018-06-14 Thread Alexander Veit (JIRA)
Alexander Veit created GROOVY-8644:
--

 Summary: Groovy 2.5 binary JARS not available at Maven Central
 Key: GROOVY-8644
 URL: https://issues.apache.org/jira/browse/GROOVY-8644
 Project: Groovy
  Issue Type: Bug
  Components: release
Affects Versions: 2.5.0
Reporter: Alexander Veit


See [http://central.maven.org/maven2/org/codehaus/groovy/groovy-all/2.5.0/]

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] groovy pull request #755: Fix inferring return type issues

2018-06-14 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/groovy/pull/755


---


[jira] [Created] (GROOVY-8643) Make for-in null safe for CompileStatic

2018-06-14 Thread Sergiy (JIRA)
Sergiy created GROOVY-8643:
--

 Summary: Make for-in null safe for CompileStatic
 Key: GROOVY-8643
 URL: https://issues.apache.org/jira/browse/GROOVY-8643
 Project: Groovy
  Issue Type: Bug
  Components: Static compilation
Affects Versions: 3.x, 2.4.x
Reporter: Sergiy


See following simple script:
{code:java}
import groovy.transform.CompileStatic;

@CompileStatic
void printList(List l){
println "List:"
for (Object o in l) {println o}
println "Done"
}

printList(null)
{code}
It crashes with null pointer exception due to list being null in the for loop. 
However it works perfectly fine when CompileStatic annotation is removed. I 
believe this inconsistency is a bug as the whole point of introducing a new 
for-in construct in groovy appeared to be to make it a null safe construct 
(unlike _for (Object o: l)_ construct in java). However, when compiling 
statically, it seems to be compiled as the java iterator it replaces, breaking 
away from groovy convention without even a warning.

Any chance to have it fixed in 3.x?

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] groovy pull request #755: Fix inferring return type issues

2018-06-14 Thread danielsun1106
GitHub user danielsun1106 opened a pull request:

https://github.com/apache/groovy/pull/755

Fix inferring return type issues

When methods are mixed with other expressions in the return statement, 
`isNestedOrSandwichedMethodCall` fails to handle all cases and the source of 
issues. As `isNestedOrSandwichedMethodCall` is a temporary solution, it's 
useless and can be removed now.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/danielsun1106/groovy infer-return-type

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/groovy/pull/755.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #755


commit 09a8aa7c3db575be529e860d068e2702262970a0
Author: Daniel Sun 
Date:   2018-06-14T06:39:17Z

Fix inferreing return type issues




---