[jira] [Updated] (GROOVY-8582) CLONE - Support `var` keyword of Java10 (documentation)

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-8582:
--
Issue Type: Documentation  (was: New Feature)

> CLONE - Support `var` keyword of Java10 (documentation)
> ---
>
> Key: GROOVY-8582
> URL: https://issues.apache.org/jira/browse/GROOVY-8582
> Project: Groovy
>  Issue Type: Documentation
>Reporter: Daniel Sun
>Priority: Major
> Fix For: 3.x
>
>
> As part of GROOVY-8498 there is now support for the {{var}} keyword to 
> provide compatibility with:
> http://openjdk.java.net/jeps/286 (Java 10)
> http://openjdk.java.net/jeps/323 (targeted for Java 11)
> We need to document this new behavior in the Groovy documentation and release 
> notes.



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


[jira] [Updated] (GROOVY-8290) Bump Ant version to 1.10.1

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-8290:
--
Issue Type: Dependency upgrade  (was: Task)

> Bump Ant version to 1.10.1
> --
>
> Key: GROOVY-8290
> URL: https://issues.apache.org/jira/browse/GROOVY-8290
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Paul King
>Assignee: Daniel Sun
>Priority: Minor
> Fix For: 3.0.0-alpha-1
>
>




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


[jira] [Updated] (GROOVY-8619) Update docs for Groovy Shell

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-8619:
--
Issue Type: Documentation  (was: Task)

> Update docs for Groovy Shell
> 
>
> Key: GROOVY-8619
> URL: https://issues.apache.org/jira/browse/GROOVY-8619
> Project: Groovy
>  Issue Type: Documentation
>  Components: command line processing
>Affects Versions: 2.5.0
>Reporter: Remko Popma
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 2.6.0-alpha-4, 3.0.0-alpha-3, 2.5.1
>
>
> The [Groovy Shell|http://groovy-lang.org/groovysh.html] documentation page 
> shows out of date output for {{./bin/groovysh --help}}



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


[jira] [Updated] (GROOVY-8620) Update docs for Grape dependency manager

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-8620:
--
Issue Type: Documentation  (was: Task)

> Update docs for Grape dependency manager
> 
>
> Key: GROOVY-8620
> URL: https://issues.apache.org/jira/browse/GROOVY-8620
> Project: Groovy
>  Issue Type: Documentation
>  Components: command line processing
>Affects Versions: 2.5.0
>Reporter: Remko Popma
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 2.6.0-alpha-4, 3.0.0-alpha-3, 2.5.1
>
>
> The [Grape dependency manager|http://groovy-lang.org/grape.html] 
> documentation page, especially the [Command Line Tool 
> section|http://groovy-lang.org/grape.html#Grape-CommandLineTool] is out of 
> date:
> * install synopsis should be {{grape install [-hv]   
> [] []}}
> * list synopsis should be {{grape list [-hv]}}
> * resolve synopsis should be {{grape resolve [-adhisv] ( 
>  )+}}
> * the {{uninstall}} command is not mentioned. It should be added. Synopsis: 
> {{grape uninstall [-hv]   }}



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


[jira] [Updated] (GROOVY-8618) Update docs for GroovyConsole

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-8618:
--
Issue Type: Documentation  (was: Task)

> Update docs for GroovyConsole
> -
>
> Key: GROOVY-8618
> URL: https://issues.apache.org/jira/browse/GROOVY-8618
> Project: Groovy
>  Issue Type: Documentation
>  Components: command line processing
>Affects Versions: 2.5.0
>Reporter: Remko Popma
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 2.6.0-alpha-4, 3.0.0-alpha-3, 2.5.1
>
>
> The [groovyConsole|http://groovy-lang.org/groovyconsole.html] documentation 
> page shows out of date output for {{./bin/groovyConsole --help}}



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


[jira] [Updated] (GROOVY-9085) Add INOUT stored procedure example to asciidoc doc for groovy-sql

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-9085:
--
Issue Type: Documentation  (was: Improvement)

> Add INOUT stored procedure example to asciidoc doc for groovy-sql
> -
>
> Key: GROOVY-9085
> URL: https://issues.apache.org/jira/browse/GROOVY-9085
> Project: Groovy
>  Issue Type: Documentation
>  Components: SQL processing
>Reporter: Paul King
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> See: https://github.com/apache/groovy/pull/893



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


[jira] [Updated] (GROOVY-8794) Add optional groovy-yaml subproject to support parsing and building yaml

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-8794:
--
Summary: Add optional groovy-yaml subproject to support parsing and 
building yaml  (was: Add groovy-yaml subproject to support parsing and building 
yaml)

> Add optional groovy-yaml subproject to support parsing and building yaml
> 
>
> Key: GROOVY-8794
> URL: https://issues.apache.org/jira/browse/GROOVY-8794
> Project: Groovy
>  Issue Type: New Feature
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-alpha-4
>
>




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


[jira] [Updated] (GROOVY-9132) Improve type inference for method reference

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-9132:
--
Component/s: Static Type Checker

> Improve type inference for method reference
> ---
>
> Key: GROOVY-9132
> URL: https://issues.apache.org/jira/browse/GROOVY-9132
> Project: Groovy
>  Issue Type: Improvement
>  Components: Static Type Checker
>Reporter: Paul King
>Priority: Major
>
> Compiling this code:
> {code}
> assert 'Hi'.transform(String::length) * 3 == 6 // transform is JDK12
> {code}
> with type checking gives:
> {noformat}
> [Static type checking] - Cannot find matching method 
> java.lang.Object#multiply(int). Please check if the declared type is correct 
> and if the method exists.
> {noformat}
> We can close as duplicate if this overlaps with an existing issue. It might 
> not be anything to do with method references but an existing limitation in 
> the type checker around supporting generics involving bounded parameters. For 
> reference, the definition of {{transform}} is:
> {code}
> public  R transform​(Function f)
> {code}



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


[jira] [Updated] (GROOVY-9132) Improve type inference for method reference

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-9132:
--
Description: 
Compiling this code:
{code}
assert 'Hi'.transform(String::length) * 3 == 6 // transform is JDK12
{code}
with type checking gives:
{noformat}
[Static type checking] - Cannot find matching method 
java.lang.Object#multiply(int). Please check if the declared type is correct 
and if the method exists.
{noformat}
We can close as duplicate if this overlaps with an existing issue. It might not 
be anything to do with method references but an existing limitation in the type 
checker around supporting generics involving bounded parameters. For reference, 
the definition of {{transform}} is:
{code}
public  R transform​(Function f)
{code}

  was:
Compiling this code:
{code}
assert 'Hi'.transform(String::length) * 3 == 6 // transform is JDK12
{code}
with type checking gives:
{noformat}
[Static type checking] - Cannot find matching method 
java.lang.Object#multiply(int). Please check if the declared type is correct 
and if the method exists.
{noformat}
We can close as duplicate if this overlaps with an existing issue. It might not 
be anything to do with method references but an existing limitation in the type 
checker around supporting generics. For reference, the definition of 
{{transform}} is:
{code}
public  R transform​(Function f)
{code}


> Improve type inference for method reference
> ---
>
> Key: GROOVY-9132
> URL: https://issues.apache.org/jira/browse/GROOVY-9132
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Paul King
>Priority: Major
>
> Compiling this code:
> {code}
> assert 'Hi'.transform(String::length) * 3 == 6 // transform is JDK12
> {code}
> with type checking gives:
> {noformat}
> [Static type checking] - Cannot find matching method 
> java.lang.Object#multiply(int). Please check if the declared type is correct 
> and if the method exists.
> {noformat}
> We can close as duplicate if this overlaps with an existing issue. It might 
> not be anything to do with method references but an existing limitation in 
> the type checker around supporting generics involving bounded parameters. For 
> reference, the definition of {{transform}} is:
> {code}
> public  R transform​(Function f)
> {code}



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


[jira] [Created] (GROOVY-9132) Improve type inference for method reference

2019-05-20 Thread Paul King (JIRA)
Paul King created GROOVY-9132:
-

 Summary: Improve type inference for method reference
 Key: GROOVY-9132
 URL: https://issues.apache.org/jira/browse/GROOVY-9132
 Project: Groovy
  Issue Type: Improvement
Reporter: Paul King


Compiling this code:
{code}
assert 'Hi'.transform(String::length) * 3 == 6 // transform is JDK12
{code}
with type checking gives:
{noformat}
[Static type checking] - Cannot find matching method 
java.lang.Object#multiply(int). Please check if the declared type is correct 
and if the method exists.
{noformat}
We can close as duplicate if this overlaps with an existing issue. It might not 
be anything to do with method references but an existing limitation in the type 
checker around supporting generics. For reference, the definition of 
{{transform}} is:
{code}
public  R transform​(Function f)
{code}



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


[jira] [Updated] (GROOVY-9131) Extension method support for native method references

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-9131:
--
Description: 
The following two method reference statements compile and execute successfully 
with and without @CS (and with CS produce the correct native bytecode):
{code}
assert 'Hi'.transform(String::length) == 2 // transform is JDK12
assert 'Hi'.transform(StringGroovyMethods::size) == 2
{code}
This statement (using the extension method from StringGroovyMethods) works for 
dynamic Groovy:
{code}
assert 'Hi'.transform(String::size) == 2
{code}
But for static Groovy fails compilation with:
{noformat}
1 compilation error:
org.codehaus.groovy.syntax.RuntimeParserException: Failed to find the expected 
method[size(java.lang.String)] in the type[java.lang.String]
{noformat}

  was:
The following two method reference statements compile and execute successfully 
with and without @CS (and with CS produce the correct native bytecode):
{code}
assert 'Hi'.transform(String::length) == 2
assert 'Hi'.transform(StringGroovyMethods::size) == 2
{code}
This statement (using the extension method from StringGroovyMethods) works for 
dynamic Groovy:
{code}
assert 'Hi'.transform(String::size) == 2
{code}
But for static Groovy fails compilation with:
{noformat}
1 compilation error:
org.codehaus.groovy.syntax.RuntimeParserException: Failed to find the expected 
method[size(java.lang.String)] in the type[java.lang.String]
{noformat}


> Extension method support for native method references
> -
>
> Key: GROOVY-9131
> URL: https://issues.apache.org/jira/browse/GROOVY-9131
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Paul King
>Priority: Major
>
> The following two method reference statements compile and execute 
> successfully with and without @CS (and with CS produce the correct native 
> bytecode):
> {code}
> assert 'Hi'.transform(String::length) == 2 // transform is JDK12
> assert 'Hi'.transform(StringGroovyMethods::size) == 2
> {code}
> This statement (using the extension method from StringGroovyMethods) works 
> for dynamic Groovy:
> {code}
> assert 'Hi'.transform(String::size) == 2
> {code}
> But for static Groovy fails compilation with:
> {noformat}
> 1 compilation error:
> org.codehaus.groovy.syntax.RuntimeParserException: Failed to find the 
> expected method[size(java.lang.String)] in the type[java.lang.String]
> {noformat}



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


[jira] [Updated] (GROOVY-9131) Extension method support for native method references

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-9131:
--
Description: 
The following two method reference statements compile and execute successfully 
with and without @CS (and with CS produce the correct native bytecode):
{code}
assert 'Hi'.transform(String::length) == 2
assert 'Hi'.transform(StringGroovyMethods::size) == 2
{code}
This statement (using the extension method from StringGroovyMethods) works for 
dynamic Groovy:
{code}
assert 'Hi'.transform(String::size) == 2
{code}
But for static Groovy fails compilation with:
{noformat}
1 compilation error:
org.codehaus.groovy.syntax.RuntimeParserException: Failed to find the expected 
method[size(java.lang.String)] in the type[java.lang.String]
{noformat}

  was:
The following two method reference statements compile and execute successfully 
with and without @CS (and with CS produce the correct native bytecode):
{code}
assert 'Hi'.transform(String::length) == 2
assert 'Hi'.transform(StringGroovyMethods::size) == 2
{code}
This statement (using the extension method from StringGroovyMethods) works for 
dynamic Groovy:
{code}
//assert 'Hi'.transform(String::size) == 2
{code}
But for static Groovy fails compilation with:
{noformat}
1 compilation error:
org.codehaus.groovy.syntax.RuntimeParserException: Failed to find the expected 
method[size(java.lang.String)] in the type[java.lang.String]
{noformat}


> Extension method support for native method references
> -
>
> Key: GROOVY-9131
> URL: https://issues.apache.org/jira/browse/GROOVY-9131
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Paul King
>Priority: Major
>
> The following two method reference statements compile and execute 
> successfully with and without @CS (and with CS produce the correct native 
> bytecode):
> {code}
> assert 'Hi'.transform(String::length) == 2
> assert 'Hi'.transform(StringGroovyMethods::size) == 2
> {code}
> This statement (using the extension method from StringGroovyMethods) works 
> for dynamic Groovy:
> {code}
> assert 'Hi'.transform(String::size) == 2
> {code}
> But for static Groovy fails compilation with:
> {noformat}
> 1 compilation error:
> org.codehaus.groovy.syntax.RuntimeParserException: Failed to find the 
> expected method[size(java.lang.String)] in the type[java.lang.String]
> {noformat}



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


[jira] [Created] (GROOVY-9131) Extension method support for native method references

2019-05-20 Thread Paul King (JIRA)
Paul King created GROOVY-9131:
-

 Summary: Extension method support for native method references
 Key: GROOVY-9131
 URL: https://issues.apache.org/jira/browse/GROOVY-9131
 Project: Groovy
  Issue Type: Improvement
Reporter: Paul King


The following two method reference statements compile and execute successfully 
with and without @CS (and with CS produce the correct native bytecode):
{code}
assert 'Hi'.transform(String::length) == 2
assert 'Hi'.transform(StringGroovyMethods::size) == 2
{code}
This statement (using the extension method from StringGroovyMethods) works for 
dynamic Groovy:
{code}
//assert 'Hi'.transform(String::size) == 2
{code}
But for static Groovy fails compilation with:
{noformat}
1 compilation error:
org.codehaus.groovy.syntax.RuntimeParserException: Failed to find the expected 
method[size(java.lang.String)] in the type[java.lang.String]
{noformat}



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


[jira] [Created] (GROOVY-9130) Native optimisation for callable method references

2019-05-20 Thread Paul King (JIRA)
Paul King created GROOVY-9130:
-

 Summary: Native optimisation for callable method references
 Key: GROOVY-9130
 URL: https://issues.apache.org/jira/browse/GROOVY-9130
 Project: Groovy
  Issue Type: Improvement
Reporter: Paul King


We currently do a native optimisation for this:
{code}
println 'hi'.transform(String::toUpperCase) // JDK12
{code}
but default back to a closure method ref for this:
{code}
println String::toUpperCase('hi')
{code}




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


[jira] [Updated] (GROOVY-8851) [PARROT] Refine safe indexing for maps/named parameters

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-8851:
--
Summary: [PARROT] Refine safe indexing for maps/named parameters  (was: 
[PARROT] Refine safe indexing for maps/named properties)

> [PARROT] Refine safe indexing for maps/named parameters
> ---
>
> Key: GROOVY-8851
> URL: https://issues.apache.org/jira/browse/GROOVY-8851
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Minor
> Fix For: 3.0.0-alpha-4
>
>
> Groovy can create instance via some syntax like {{SpecialSafeIndex[name: 
> 'Daniel.Sun', location: 'Shanghai']}}, but it does not allow the safe 
> indexing, e.g. {{SpecialSafeIndex?[name: 'Daniel.Sun', location: 
> 'Shanghai']}}. We should refine it for consistence in syntax.
> P.S. The topic was discussed in the mailing list before.



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


[jira] [Updated] (GROOVY-8851) [PARROT] Refine safe indexing for maps/named properties

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-8851:
--
Summary: [PARROT] Refine safe indexing for maps/named properties  (was: 
Refine safe indexing for named properties)

> [PARROT] Refine safe indexing for maps/named properties
> ---
>
> Key: GROOVY-8851
> URL: https://issues.apache.org/jira/browse/GROOVY-8851
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Minor
> Fix For: 3.0.0-alpha-4
>
>
> Groovy can create instance via some syntax like {{SpecialSafeIndex[name: 
> 'Daniel.Sun', location: 'Shanghai']}}, but it does not allow the safe 
> indexing, e.g. {{SpecialSafeIndex?[name: 'Daniel.Sun', location: 
> 'Shanghai']}}. We should refine it for consistence in syntax.
> P.S. The topic was discussed in the mailing list before.



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


[jira] [Updated] (GROOVY-9129) [PARROT] Support safe index operations for lists/arrays including multi-dimensional array/nested list access

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-9129:
--
Summary: [PARROT] Support safe index operations for lists/arrays including 
multi-dimensional array/nested list access  (was: [PARROT] Support safe index 
operations for lists)

> [PARROT] Support safe index operations for lists/arrays including 
> multi-dimensional array/nested list access
> 
>
> Key: GROOVY-9129
> URL: https://issues.apache.org/jira/browse/GROOVY-9129
> Project: Groovy
>  Issue Type: New Feature
>Reporter: Paul King
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-alpha-1
>
>




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


[jira] [Closed] (GROOVY-9129) [PARROT] Support safe index operations for lists/arrays including multi-dimensional array/nested list access

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9129.
-
Resolution: Fixed

> [PARROT] Support safe index operations for lists/arrays including 
> multi-dimensional array/nested list access
> 
>
> Key: GROOVY-9129
> URL: https://issues.apache.org/jira/browse/GROOVY-9129
> Project: Groovy
>  Issue Type: New Feature
>Reporter: Paul King
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-alpha-1
>
>




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


[jira] [Created] (GROOVY-9129) [PARROT] Support safe index operations for lists

2019-05-20 Thread Paul King (JIRA)
Paul King created GROOVY-9129:
-

 Summary: [PARROT] Support safe index operations for lists
 Key: GROOVY-9129
 URL: https://issues.apache.org/jira/browse/GROOVY-9129
 Project: Groovy
  Issue Type: New Feature
Reporter: Paul King
Assignee: Daniel Sun
 Fix For: 3.0.0-alpha-1






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


[jira] [Closed] (GROOVY-9128) [PARROT] Provide proper support for the identical (===) and not identical (!==) operators

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9128.
-
Resolution: Fixed

> [PARROT] Provide proper support for the identical (===) and not identical 
> (!==) operators
> -
>
> Key: GROOVY-9128
> URL: https://issues.apache.org/jira/browse/GROOVY-9128
> Project: Groovy
>  Issue Type: New Feature
>Reporter: Paul King
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-alpha-1
>
>
> These are allowed as operators in the antlr2 grammar but treated as an error 
> after initial parsing.



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


[jira] [Created] (GROOVY-9128) [PARROT] Provide proper support for the identical (===) and not identical (!==) operators

2019-05-20 Thread Paul King (JIRA)
Paul King created GROOVY-9128:
-

 Summary: [PARROT] Provide proper support for the identical (===) 
and not identical (!==) operators
 Key: GROOVY-9128
 URL: https://issues.apache.org/jira/browse/GROOVY-9128
 Project: Groovy
  Issue Type: New Feature
Reporter: Paul King
Assignee: Daniel Sun
 Fix For: 3.0.0-alpha-1


These are allowed as operators in the antlr2 grammar but treated as an error 
after initial parsing.



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


[jira] [Created] (GROOVY-9127) Cannot set protected field from subclass

2019-05-20 Thread paolo di tommaso (JIRA)
paolo di tommaso created GROOVY-9127:


 Summary: Cannot set protected field from subclass
 Key: GROOVY-9127
 URL: https://issues.apache.org/jira/browse/GROOVY-9127
 Project: Groovy
  Issue Type: Bug
Affects Versions: 2.5.6
Reporter: paolo di tommaso


Consider the following code 

{code}
@CompileStatic
abstract class Foo {

protected String field1

String getField1() {
field1
}
}

@CompileStatic
class Bar extends Foo {

void changeField1()  {
this.field1 = 'foo'
}

@Override
String getField1() { return 'bar command' }
}
{code}

It fails to compile with the following error message: 

{code}
[Static type checking] - Cannot set read-only property: field1
 @ line 29, column 9.
   this.field1 = 'foo'
   ^
{code}

Which does not make much sense to me because protected field should be 
accessible to subclasses by definition. Tested also with 2.5.8-SNAPSHOT 
reporting the same issue.



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


[jira] [Closed] (GROOVY-9125) Static block is not annotateable with @Generated

2019-05-20 Thread Stephan Classen (JIRA)


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

Stephan Classen closed GROOVY-9125.
---
Resolution: Not A Problem

The current behaviour of both jacoco and groovy are correct.
The static block must not be marked as generated since it can contain user code

{code:java}
@Sortable
public class SomeClass {
String first

static {
// some user code
}
{code}


> Static block is not annotateable with @Generated
> 
>
> Key: GROOVY-9125
> URL: https://issues.apache.org/jira/browse/GROOVY-9125
> Project: Groovy
>  Issue Type: Bug
>Reporter: Stephan Classen
>Priority: Major
> Attachments: jacoco_report.png
>
>
> The {{groovy.transform.Sortable}} annotation generates a static block
> {code:java}
> static {
> Object var0 = 
> $getCallSiteArray()[5].callConstructor(GroovySortableClassTarget.FirstComparator.class);
> this$FirstComparator = 
> (Comparator)ScriptBytecodeAdapter.castToType(var0, Comparator.class);
> Object var1 = 
> $getCallSiteArray()[6].callConstructor(GroovySortableClassTarget.LastComparator.class);
> this$LastComparator = 
> (Comparator)ScriptBytecodeAdapter.castToType(var1, Comparator.class);
> Object var2 = 
> $getCallSiteArray()[7].callConstructor(GroovySortableClassTarget.BornComparator.class);
> this$BornComparator = 
> (Comparator)ScriptBytecodeAdapter.castToType(var2, Comparator.class);
> }
> {code}
> This static block shows up in the jacoco report (see attached screenshot).
> It would be nice if this block would be marked as generated.
> Maybe this needs coordination with jacoco in case it is not possible to use 
> the {{@Generated}} annotation on static blocks.
> See also GROOVY-9050



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


[jira] [Created] (GROOVY-9126) Unreachable line numbers after ARETURN in bytecode

2019-05-20 Thread Adam Estabrook (JIRA)
Adam Estabrook created GROOVY-9126:
--

 Summary: Unreachable line numbers after ARETURN in bytecode
 Key: GROOVY-9126
 URL: https://issues.apache.org/jira/browse/GROOVY-9126
 Project: Groovy
  Issue Type: Bug
  Components: bytecode
Affects Versions: 2.5.7, 2.5.6, 2.5.5
Reporter: Adam Estabrook


Starting with Groovy 2.5.5, unreachable line numbers were added to the byte 
code. This causes tools like JaCoCo to report uncovered lines. Removing these 
line numbers after the ARETURN would be helpful.

[https://github.com/jacoco/jacoco/issues/884]

ARETURN
 L1
 LINENUMBER 16 L1 <-- new line number that cant be hit after ARETURN
 FRAME FULL [] [java/lang/Throwable]
 NOP
 ATHROW
 LOCALVARIABLE this Lcom/company/Form; L0 L1 0
 MAXSTACK = 2
 MAXLOCALS = 1

 



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


[jira] [Updated] (GROOVY-5306) [PARROT] Add "a ?= 2" support (Elvis assignment): should be expanded to "a = a == null ? 2 : a"

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-5306:
--
Issue Type: New Feature  (was: Improvement)

> [PARROT] Add "a ?= 2" support (Elvis assignment): should be expanded to "a = 
> a == null ? 2 : a"
> ---
>
> Key: GROOVY-5306
> URL: https://issues.apache.org/jira/browse/GROOVY-5306
> Project: Groovy
>  Issue Type: New Feature
>  Components: syntax
>Reporter: Rodrigo Rosenfeld Rosas
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-alpha-1, 2.6.0-alpha-1
>
>
> I've suggested last week the creation of the "?:=" constructor in Groovy:
> https://jira.codehaus.org/browse/GROOVY-5291
> It was rejected and a new JIRA was requested to be created with a new 
> operator.
> Then, I've talked to the Grails users in their mailing list to get some 
> feedback, which can be read here:
> http://grails.1312388.n4.nabble.com/Help-improving-Groovy-syntax-tt4384137.html
> Then, Phil DeJarnett has suggested using "?=" instead of "?:=". Not only I 
> preferred this suggestion, but I was changed my mind about its meaning too.
> It would be used as a caching/memoization operator mostly. It would be 
> similar to Ruby's "||=", except for this specific situation:
> Ruby:
> {code}
> a = nil
> a ||= false # a will be false
> a ||= true # a will be true
> {code}
> That is why "a ||= value" is expanded to "a = a || value"
> But for caching/memoization, I'd prefer "a ?= value" to be expanded to "a = a 
> == null ? value : a". This way we would have:
> Proposed Groovy syntax:
> {code}
> def a = null
> a ?= false; assert a == false
> a ?= true; assert a == true
> a = null; a ?= new Object(); assert a instanceof Object
> {code}
> I'll actually fill a new ticket on Ruby Redmine too for proposing the same 
> syntax and semanthics :)



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


[jira] [Commented] (GROOVY-9125) Static block is not annotateable with @Generated

2019-05-20 Thread Stephan Classen (JIRA)


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

Stephan Classen commented on GROOVY-9125:
-

There is a pull request for the jacoco project adding a testcase which 
reproduces this behavior
https://github.com/jacoco/jacoco/pull/883

> Static block is not annotateable with @Generated
> 
>
> Key: GROOVY-9125
> URL: https://issues.apache.org/jira/browse/GROOVY-9125
> Project: Groovy
>  Issue Type: Bug
>Reporter: Stephan Classen
>Priority: Major
> Attachments: jacoco_report.png
>
>
> The {{groovy.transform.Sortable}} annotation generates a static block
> {code:java}
> static {
> Object var0 = 
> $getCallSiteArray()[5].callConstructor(GroovySortableClassTarget.FirstComparator.class);
> this$FirstComparator = 
> (Comparator)ScriptBytecodeAdapter.castToType(var0, Comparator.class);
> Object var1 = 
> $getCallSiteArray()[6].callConstructor(GroovySortableClassTarget.LastComparator.class);
> this$LastComparator = 
> (Comparator)ScriptBytecodeAdapter.castToType(var1, Comparator.class);
> Object var2 = 
> $getCallSiteArray()[7].callConstructor(GroovySortableClassTarget.BornComparator.class);
> this$BornComparator = 
> (Comparator)ScriptBytecodeAdapter.castToType(var2, Comparator.class);
> }
> {code}
> This static block shows up in the jacoco report (see attached screenshot).
> It would be nice if this block would be marked as generated.
> Maybe this needs coordination with jacoco in case it is not possible to use 
> the {{@Generated}} annotation on static blocks.
> See also GROOVY-9050



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


[jira] [Updated] (GROOVY-9125) Static block is not annotateable with @Generated

2019-05-20 Thread Stephan Classen (JIRA)


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

Stephan Classen updated GROOVY-9125:

Description: 
The {{groovy.transform.Sortable}} annotation generates a static block
{code:java}
static {
Object var0 = 
$getCallSiteArray()[5].callConstructor(GroovySortableClassTarget.FirstComparator.class);
this$FirstComparator = 
(Comparator)ScriptBytecodeAdapter.castToType(var0, Comparator.class);
Object var1 = 
$getCallSiteArray()[6].callConstructor(GroovySortableClassTarget.LastComparator.class);
this$LastComparator = 
(Comparator)ScriptBytecodeAdapter.castToType(var1, Comparator.class);
Object var2 = 
$getCallSiteArray()[7].callConstructor(GroovySortableClassTarget.BornComparator.class);
this$BornComparator = 
(Comparator)ScriptBytecodeAdapter.castToType(var2, Comparator.class);
}
{code}

This static block shows up in the jacoco report (see attached screenshot).
It would be nice if this block would be marked as generated.
Maybe this needs coordination with jacoco in case it is not possible to use the 
{{@Generated}} annotation on static blocks.

See also GROOVY-9050

  was:
The {{groovy.transform.Sortable}} annotation generates a static block
{code:java}
static {
Object var0 = 
$getCallSiteArray()[5].callConstructor(GroovySortableClassTarget.FirstComparator.class);
this$FirstComparator = 
(Comparator)ScriptBytecodeAdapter.castToType(var0, Comparator.class);
Object var1 = 
$getCallSiteArray()[6].callConstructor(GroovySortableClassTarget.LastComparator.class);
this$LastComparator = 
(Comparator)ScriptBytecodeAdapter.castToType(var1, Comparator.class);
Object var2 = 
$getCallSiteArray()[7].callConstructor(GroovySortableClassTarget.BornComparator.class);
this$BornComparator = 
(Comparator)ScriptBytecodeAdapter.castToType(var2, Comparator.class);
}
{code}

This static block is shown by jacoco as not covered with test.

See also GROOVY-9050


> Static block is not annotateable with @Generated
> 
>
> Key: GROOVY-9125
> URL: https://issues.apache.org/jira/browse/GROOVY-9125
> Project: Groovy
>  Issue Type: Bug
>Reporter: Stephan Classen
>Priority: Major
> Attachments: jacoco_report.png
>
>
> The {{groovy.transform.Sortable}} annotation generates a static block
> {code:java}
> static {
> Object var0 = 
> $getCallSiteArray()[5].callConstructor(GroovySortableClassTarget.FirstComparator.class);
> this$FirstComparator = 
> (Comparator)ScriptBytecodeAdapter.castToType(var0, Comparator.class);
> Object var1 = 
> $getCallSiteArray()[6].callConstructor(GroovySortableClassTarget.LastComparator.class);
> this$LastComparator = 
> (Comparator)ScriptBytecodeAdapter.castToType(var1, Comparator.class);
> Object var2 = 
> $getCallSiteArray()[7].callConstructor(GroovySortableClassTarget.BornComparator.class);
> this$BornComparator = 
> (Comparator)ScriptBytecodeAdapter.castToType(var2, Comparator.class);
> }
> {code}
> This static block shows up in the jacoco report (see attached screenshot).
> It would be nice if this block would be marked as generated.
> Maybe this needs coordination with jacoco in case it is not possible to use 
> the {{@Generated}} annotation on static blocks.
> See also GROOVY-9050



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


[jira] [Updated] (GROOVY-9125) Static block is not annotateable with @Generated

2019-05-20 Thread Stephan Classen (JIRA)


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

Stephan Classen updated GROOVY-9125:

Attachment: jacoco_report.png

> Static block is not annotateable with @Generated
> 
>
> Key: GROOVY-9125
> URL: https://issues.apache.org/jira/browse/GROOVY-9125
> Project: Groovy
>  Issue Type: Bug
>Reporter: Stephan Classen
>Priority: Major
> Attachments: jacoco_report.png
>
>
> The {{groovy.transform.Sortable}} annotation generates a static block
> {code:java}
> static {
> Object var0 = 
> $getCallSiteArray()[5].callConstructor(GroovySortableClassTarget.FirstComparator.class);
> this$FirstComparator = 
> (Comparator)ScriptBytecodeAdapter.castToType(var0, Comparator.class);
> Object var1 = 
> $getCallSiteArray()[6].callConstructor(GroovySortableClassTarget.LastComparator.class);
> this$LastComparator = 
> (Comparator)ScriptBytecodeAdapter.castToType(var1, Comparator.class);
> Object var2 = 
> $getCallSiteArray()[7].callConstructor(GroovySortableClassTarget.BornComparator.class);
> this$BornComparator = 
> (Comparator)ScriptBytecodeAdapter.castToType(var2, Comparator.class);
> }
> {code}
> This static block shows up in the jacoco report (see attached screenshot).
> It would be nice if this block would be marked as generated.
> Maybe this needs coordination with jacoco in case it is not possible to use 
> the {{@Generated}} annotation on static blocks.
> See also GROOVY-9050



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


[jira] [Created] (GROOVY-9125) Static block is not annotateable with @Generated

2019-05-20 Thread Stephan Classen (JIRA)
Stephan Classen created GROOVY-9125:
---

 Summary: Static block is not annotateable with @Generated
 Key: GROOVY-9125
 URL: https://issues.apache.org/jira/browse/GROOVY-9125
 Project: Groovy
  Issue Type: Bug
Reporter: Stephan Classen


The {{groovy.transform.Sortable}} annotation generates a static block
{code:java}
static {
Object var0 = 
$getCallSiteArray()[5].callConstructor(GroovySortableClassTarget.FirstComparator.class);
this$FirstComparator = 
(Comparator)ScriptBytecodeAdapter.castToType(var0, Comparator.class);
Object var1 = 
$getCallSiteArray()[6].callConstructor(GroovySortableClassTarget.LastComparator.class);
this$LastComparator = 
(Comparator)ScriptBytecodeAdapter.castToType(var1, Comparator.class);
Object var2 = 
$getCallSiteArray()[7].callConstructor(GroovySortableClassTarget.BornComparator.class);
this$BornComparator = 
(Comparator)ScriptBytecodeAdapter.castToType(var2, Comparator.class);
}
{code}

This static block is shown by jacoco as not covered with test.

See also GROOVY-9050



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


[jira] [Updated] (GROOVY-8586) [PARROT] Support Java 9 ARM blocks

2019-05-20 Thread Paul King (JIRA)


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

Paul King updated GROOVY-8586:
--
Summary: [PARROT] Support Java 9 ARM blocks  (was: Support Java 9 ARM 
blocks)

> [PARROT] Support Java 9 ARM blocks
> --
>
> Key: GROOVY-8586
> URL: https://issues.apache.org/jira/browse/GROOVY-8586
> Project: Groovy
>  Issue Type: Improvement
>  Components: Compiler
>Affects Versions: 3.x
>Reporter: Jesper Steen Møller
>Assignee: Daniel Sun
>Priority: Minor
> Fix For: 3.0.0-alpha-4, 2.6.0-alpha-5
>
>
> Java 9 introduces a ARM-with-existing-resources construct, like this:
> {code:java}
> OutputStream stream = foo();
> try (stream) {
>stream.write(whatever());
> }
> {code}
> In other words, the resource need not be in the form of an initialization, 
> but can just be a variable.
> Now that we have ARM in Groovy, we should be able to add this form as well.
>  



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


[jira] [Closed] (GROOVY-9098) Bump gradle to 5.4.1

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9098.
-

> Bump gradle to 5.4.1
> 
>
> Key: GROOVY-9098
> URL: https://issues.apache.org/jira/browse/GROOVY-9098
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Paul King
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>




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


[jira] [Closed] (GROOVY-9050) Missing @Generated annotation in @Sortable

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9050.
-

> Missing @Generated annotation in @Sortable 
> ---
>
> Key: GROOVY-9050
> URL: https://issues.apache.org/jira/browse/GROOVY-9050
> Project: Groovy
>  Issue Type: Bug
>  Components: Compiler
>Affects Versions: 2.5.6
>Reporter: Vadimo
>Assignee: Paul King
>Priority: Minor
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> jacoco is reporting incorrect code coverage results for @Sortable annotated 
> classes. 
> The generated internal classes should probably be annotated with @generated 
> as well as their default constructor.
> For the example from 6 methods are detected as not covered.
> [http://docs.groovy-lang.org/2.5.6/html/gapi/groovy/transform/Sortable.html]
> {code:java}
>  @Sortable class Person {
>  String first
>  String last
>  Integer born
>  }
> {code}
> This bug was found during Hackergarten Zürich 



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


[jira] [Closed] (GROOVY-8943) @CompileStatic with getAt(int) and getAt(String)

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8943.
-

> @CompileStatic with getAt(int) and getAt(String)
> 
>
> Key: GROOVY-8943
> URL: https://issues.apache.org/jira/browse/GROOVY-8943
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Endre Stølsvik
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> It seems like if I use @CompileStatic, a construct like
> {code:java}
> Car specificCar = somethingWithAGetAtMethod[129]
> .. or ..
> Car specificCar = somethingWithAGetAtMethod["AZ1235"]
> {code}
> doesn't work. The compiler says: Groovyc: [Static type checking] - Cannot 
> assign value of type java.lang.Object to variable of type com.example.Car
> This seems strange. The getAt(..)-method in question obviously return a "Car" 
> here.
> This email thread has evidently experienced the same: 
> [http://groovy.329449.n5.nabble.com/Unexpected-behaviour-for-getAt-operator-operloading-with-static-compilation-td5744122.html]
> .. and the theory is that since this is specified on Groovy's extension of 
> Object, which specifies Object getAt(String), then that might be the culprit. 
> Interesting, though, that Object does not seemingly specify getAt(int), but 
> it still gives the exact same compiler error with both int and String.
> I had this idea that the subscript-operator was "syntactic sugar", which then 
> makes the compiler error hard to understand.
>  
>  



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


[jira] [Closed] (GROOVY-8975) GroovyCastException on the result of CliBuilder.parseFromSpec

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8975.
-

> GroovyCastException on the result of CliBuilder.parseFromSpec
> -
>
> Key: GROOVY-8975
> URL: https://issues.apache.org/jira/browse/GROOVY-8975
> Project: Groovy
>  Issue Type: Bug
>  Components: groovy-runtime
>Affects Versions: 2.5.5
>Reporter: Mauro Molinari
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
> Attachments: GROOVY-8975.zip, TestGroovy8975.zip
>
>
> I'm trying to follow the tutorial about the use of CliBuilder in Groovy with 
> Groovy 2.5.5. Copying the code at [Annotating methods of an 
> interface|https://github.com/remkop/picocli/wiki/Groovy-2.5-CliBuilder-Renewal#annotating-methods-of-an-interface]
>  paragraph, at runtime I have the following Exception:
> {noformat}
> Exception in thread "main" 
> org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast 
> object 
> '{help=groovy.cli.picocli.CliBuilder$_extractAttributesFromMethod_closure12@3bb9a3ff}'
>  with class 'java.util.LinkedHashMap' to class 'mypackage.IHello' due to: 
> groovy.lang.GroovyRuntimeException: Could not find matching constructor for: 
> mypackage.IHello(LinkedHashMap)
>     at 
> org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnSAM(DefaultTypeTransformation.java:412)
>     at 
> org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnNumber(DefaultTypeTransformation.java:328)
>     at 
> org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:242)
>     at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:617)
>     at mypackage.MyMain.main(MyMain.groovy:20)Exception in thread "main" 
> org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast 
> object 
> '{help=groovy.cli.picocli.CliBuilder$_extractAttributesFromMethod_closure12@3bb9a3ff}'
>  with class 'java.util.LinkedHashMap' to class 'mypackage.IHello' due to: 
> groovy.lang.GroovyRuntimeException: Could not find matching constructor for: 
> mypackage.IHello(LinkedHashMap)
>     at 
> org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnSAM(DefaultTypeTransformation.java:412)
>     at 
> org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnNumber(DefaultTypeTransformation.java:328)
>     at 
> org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:242)
>     at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:617)
>     at mypackage.MyMain.main(MyMain.groovy:20){noformat}
> The exception occurs at this line:
>  {{IHello hello = cli.parseFromSpec(IHello, argz)}}
> The exception goes away (and all works fine) if I replace it with:
>  {{def hello = cli.parseFromSpec(IHello, argz)}}
> I tried to downgrade Groovy down to version 2.5.0 and I always get the 
> exception. So this really puzzles me, since the mentioned tutorial is quite 
> simple and straight to follow...



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


[jira] [Closed] (GROOVY-8947) Fail to resolve non-static inner class outside of outer class

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8947.
-

> Fail to resolve non-static inner class outside of outer class
> -
>
> Key: GROOVY-8947
> URL: https://issues.apache.org/jira/browse/GROOVY-8947
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.0-alpha-4
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> {code:java}
> public class Computer {
> public class Cpu {
> int coreNumber
> public Cpu(int coreNumber) {
> this.coreNumber = coreNumber
> }
> }
> public static newInstance() {
> return new Computer().new Cpu(4)
> }
> }
> assert 4 == new Computer().new Cpu(4).coreNumber // unable to resolve class 
> Cpu 
> // assert 4 == Computer.newInstance().coreNumber // resolve class Cpu 
> successfully
> {code}



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


[jira] [Closed] (GROOVY-9087) Bump gradle to 5.4

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9087.
-

> Bump gradle to 5.4
> --
>
> Key: GROOVY-9087
> URL: https://issues.apache.org/jira/browse/GROOVY-9087
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>




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


[jira] [Closed] (GROOVY-8913) Parrot Parser: partially-parenthesized binary expression parsed as cast and unary plus

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8913.
-

> Parrot Parser: partially-parenthesized binary expression parsed as cast and 
> unary plus
> --
>
> Key: GROOVY-8913
> URL: https://issues.apache.org/jira/browse/GROOVY-8913
> Project: Groovy
>  Issue Type: Bug
>  Components: parser-antlr4
>Affects Versions: 2.6.0-alpha-4
>Reporter: Eric Milles
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Groovy 2.6 (and possibly/probably 3.0) is parsing this expression differently 
> from 2.5:
> {code:groovy}
> def x = (a.b) + c()
> {code}
> In Groovy 2.5, this is a DeclarationExpression with a VariableExpression for 
> the left expression and a BinaryExpression (with PLUS operator) for the right 
> expression.  Parrot Parser is seeing the right expression as a CastExpression 
> with a UnaryPlusExpression.



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


[jira] [Closed] (GROOVY-9010) MissingMethodException during ASTTest annotation assert execution

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9010.
-

> MissingMethodException during ASTTest annotation assert execution
> -
>
> Key: GROOVY-9010
> URL: https://issues.apache.org/jira/browse/GROOVY-9010
> Project: Groovy
>  Issue Type: Bug
>  Components: Compiler, groovy-jdk
>Affects Versions: 2.5.2
> Environment: windows10
>Reporter: hwasin
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7, 2.4.17
>
> Attachments: test_fail.groovy, test_success.groovy
>
>
> When i try to run following groovy script: 
> {noformat}
> groovy test_fail.groovy
>  {noformat}
> i get following syntax error:
> {noformat}
> Caught: groovy.lang.MissingMethodException: No signature of method: 
> Script1.ssert() is applicable for argument types: (Boolean) values: [true]
> Possible solutions: every(), grep(), split(groovy.lang.Closure), sleep(long), 
> every(groovy.lang.Closure), use([Ljava.lang.Object;)
> groovy.lang.MissingMethodException: No signature of method: Script1.ssert() 
> is applicable for argument types: (Boolean) values: [true]
> Possible solutions: every(), grep(), split(groovy.lang.Closure), sleep(long), 
> every(groovy.lang.Closure), use([Ljava.lang.Object;)
> at Script1.run(Script1.groovy:1)
> at Main.main(test_fail.groovy:6)
> {noformat}
> adding an empty space between "{" and "assert" keyword helps (see 
> test_success.groovy)
> Looks like groovy "assert" token is fetched wrongly and "ssert" part is read 
> only



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


[jira] [Closed] (GROOVY-8953) Imported enum causes compilation bug preventing tests from compiling

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8953.
-

> Imported enum causes compilation bug preventing tests from compiling
> 
>
> Key: GROOVY-8953
> URL: https://issues.apache.org/jira/browse/GROOVY-8953
> Project: Groovy
>  Issue Type: Bug
> Environment: JDK 8
> groovy-all:2.4.+
>Reporter: Rhys Cox
>Assignee: Paul King
>Priority: Minor
> Fix For: 3.0.0-beta-1, 2.5.7, 2.4.17
>
> Attachments: groovy-8953.zip
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> In early December our spock tests were compiling fine, but at the start of 
> this year they're all breaking with the following error:
> Error:Groovyc: While compiling tests of REDACTED: BUG! exception in phase 
> 'semantic analysis' in source unit 'REDACTEDSpec.groovy' Constructor 
> parameter annotations length [5] does not match the parameter length: private 
> REDACTEDENUMCLASS(java.lang.String,int,int,java.lang.String,ANOTHERREDACTEDENUMCLASS,java.lang.String,java.util.regex.Pattern)
>     at 
> org.codehaus.groovy.vmplugin.v5.Java5.getConstructorParameterAnnotations(Java5.java:438)
>     at 
> org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:386)
>     at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:280)
>     at 
> org.codehaus.groovy.ast.ClassNode.getDeclaredMethods(ClassNode.java:877)
>     at org.codehaus.groovy.ast.ClassNode.getMethods(ClassNode.java:892)
>     at 
> org.codehaus.groovy.ast.ClassNode.hasPossibleStaticMethod(ClassNode.java:1313)
>     at 
> org.codehaus.groovy.control.StaticImportVisitor.findStaticMethod(StaticImportVisitor.java:597)
>     at 
> org.codehaus.groovy.control.StaticImportVisitor.findStaticPropertyAccessorByFullName(StaticImportVisitor.java:565)
>     at 
> org.codehaus.groovy.control.StaticImportVisitor.findStaticPropertyAccessor(StaticImportVisitor.java:532)
>     at 
> org.codehaus.groovy.control.StaticImportVisitor.findStaticFieldOrPropAccessorImportFromModule(StaticImportVisitor.java:440)
>     at 
> org.codehaus.groovy.control.StaticImportVisitor.transformVariableExpression(StaticImportVisitor.java:198)
>     at 
> org.codehaus.groovy.control.StaticImportVisitor.transform(StaticImportVisitor.java:99)
>     at 
> org.codehaus.groovy.ast.expr.Expression.transformExpressions(Expression.java:51)
>     at 
> org.codehaus.groovy.ast.expr.ArgumentListExpression.transformExpression(ArgumentListExpression.java:69)
>     at 
> org.codehaus.groovy.control.StaticImportVisitor.transform(StaticImportVisitor.java:117)
>     at 
> org.codehaus.groovy.ast.expr.ConstructorCallExpression.transformExpression(ConstructorCallExpression.java:50)
>     at 
> org.codehaus.groovy.control.StaticImportVisitor.transformConstructorCallExpression(StaticImportVisitor.java:339)
>     at 
> org.codehaus.groovy.control.StaticImportVisitor.transform(StaticImportVisitor.java:114)
>     at 
> org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitField(ClassCodeExpressionTransformer.java:70)
>     at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1073)
>     at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:53)
>     at 
> org.codehaus.groovy.control.StaticImportVisitor.visitClass(StaticImportVisitor.java:78)
>     at 
> org.codehaus.groovy.control.CompilationUnit$13.call(CompilationUnit.java:692)
>     at 
> org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1087)
>     at 
> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:624)
>     at 
> org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:602)
>     at 
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:579)
>     at 
> org.jetbrains.groovy.compiler.rt.GroovyCompilerWrapper.compile(GroovyCompilerWrapper.java:62)
>     at 
> org.jetbrains.groovy.compiler.rt.DependentGroovycRunner.runGroovyc(DependentGroovycRunner.java:118)
>     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.jetbrains.groovy.compiler.rt.GroovycRunner.intMain2(GroovycRunner.java:91)
>     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)
>     

[jira] [Closed] (GROOVY-9047) bump gradle to 5.3

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9047.
-

> bump gradle to 5.3
> --
>
> Key: GROOVY-9047
> URL: https://issues.apache.org/jira/browse/GROOVY-9047
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Paul King
>Assignee: Paul King
>Priority: Minor
> Fix For: 3.0.0-beta-1
>
>




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


[jira] [Closed] (GROOVY-9028) @EqualsAndHashCode can't recognize final field

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9028.
-

> @EqualsAndHashCode can't recognize final field
> --
>
> Key: GROOVY-9028
> URL: https://issues.apache.org/jira/browse/GROOVY-9028
> Project: Groovy
>  Issue Type: Bug
>  Components: ast builder
>Affects Versions: 2.5.3
> Environment: Groovy Version: 2.5.3 JVM: 11.0.2 Vendor: Oracle 
> Corporation OS: Mac OS X
>Reporter: zhb
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> {code:java}
> import groovy.transform.EqualsAndHashCode
> @EqualsAndHashCode(includes = ["name"])
> class Test {
> private final String name
> Test(String name) {
> this.name = name
> }
> String getName() {
> return name
> }
> }
> {code}
> Groovy 2.5.3 complains: 
> {noformat}
> /Users/zhb/Projects/tmp/Main.groovy: 3: Error during @EqualsAndHashCode 
> processing: 'includes' property 'name' does not exist.
> @ line 3, column 1.
> @EqualsAndHashCode(includes = ["name"])
> ^
> 1 error
> {noformat}
> But Groovy 2.4.16 works fine.



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


[jira] [Closed] (GROOVY-8908) Bump gradle to 5.2.1

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8908.
-

> Bump gradle to 5.2.1
> 
>
> Key: GROOVY-8908
> URL: https://issues.apache.org/jira/browse/GROOVY-8908
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Daniel Sun
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>




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


[jira] [Closed] (GROOVY-9084) Add the missing delegate methods to `InnerLoader`

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9084.
-

> Add the missing delegate methods to `InnerLoader`
> -
>
> Key: GROOVY-9084
> URL: https://issues.apache.org/jira/browse/GROOVY-9084
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>




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


[jira] [Closed] (GROOVY-9096) Repeatable annotation not wrapped with container type in class file

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9096.
-

> Repeatable annotation not wrapped with container type in class file
> ---
>
> Key: GROOVY-9096
> URL: https://issues.apache.org/jira/browse/GROOVY-9096
> Project: Groovy
>  Issue Type: Bug
>  Components: Compiler
>Affects Versions: 2.5.6
>Reporter: Eric Milles
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> Consider the following:
> Anno.java
> {code:java}
> import java.lang.annotation.*;
> @Retention(RetentionPolicy.CLASS)
> @Repeatable(Annos.class)
> @interface Anno {
>   String value() default "";
> }
> @Retention(RetentionPolicy.CLASS)
> @interface Annos {
>   Anno[] value();
> }
> {code}
> Pogo.groovy
> {code:groovy}
> @Anno @Anno('x')
> class Pogo {}
> {code}
> When this is compiled, the annotations in the class file are incorrect:
> {code}
> // Compiled from Pogo.groovy (version 1.8 : 52.0, super bit)
> @a...@pack.anno(value="x")
> public class Pogo implements groovy.lang.GroovyObject {
> {code}
> vs.
> {code}
> // Compiled from Pojo.java (version 1.8 : 52.0, super bit)
> @Annos(value={@Anno,@Anno(value="x")})
> public class Pojo {
> {code}
> See GROOVY-8234 for initial support for {{@Repeatable}}.



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


[jira] [Closed] (GROOVY-8942) Highlight matched parentheses, brackets and curly braces in Groovy Console when caret touching them

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8942.
-

> Highlight matched parentheses, brackets and curly braces in Groovy Console 
> when caret touching them 
> 
>
> Key: GROOVY-8942
> URL: https://issues.apache.org/jira/browse/GROOVY-8942
> Project: Groovy
>  Issue Type: Improvement
>  Components: Groovy Console
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
> Attachments: highlightmatchedparentheses.png
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> !highlightmatchedparentheses.png!



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


[jira] [Closed] (GROOVY-9108) Make Interpreter changeable in Groovysh

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9108.
-

> Make Interpreter changeable in Groovysh
> ---
>
> Key: GROOVY-9108
> URL: https://issues.apache.org/jira/browse/GROOVY-9108
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Paul King
>Assignee: Paul King
>Priority: Minor
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> See [https://github.com/apache/groovy/pull/884]



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


[jira] [Closed] (GROOVY-8995) Improve the performance of creating list

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8995.
-

> Improve the performance of creating list
> 
>
> Key: GROOVY-8995
> URL: https://issues.apache.org/jira/browse/GROOVY-8995
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> See the javadoc of 
> [https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#addAll(java.util.Collection,%20T...)]
>  :
> "The behavior of this convenience method is identical to that of 
> {{c.addAll(Arrays.asList(elements))}}, but this method is likely to run 
> significantly faster under most implementations."



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


[jira] [Closed] (GROOVY-8907) StringGroovyMethods.findAll(String, Pattern, Closure) and StringGroovyMethods.findAll(CharSequence, Pattern, Closure) is with @ClosureParams incorrect

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8907.
-

> StringGroovyMethods.findAll(String, Pattern, Closure) and 
> StringGroovyMethods.findAll(CharSequence, Pattern, Closure) is with 
> @ClosureParams incorrect
> --
>
> Key: GROOVY-8907
> URL: https://issues.apache.org/jira/browse/GROOVY-8907
> Project: Groovy
>  Issue Type: Bug
>  Components: groovy-runtime
>Affects Versions: 3.0.0-alpha-4, 2.5.6
>Reporter: Henrique Mota
>Assignee: Paul King
>Priority: Minor
> Fix For: 3.0.0-beta-1, 2.5.7
>
> Attachments: image.png
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> StringGroovyMethods.find(arg1, arg2, Closure) and  
> StringGroovyMethods.findAll(arg1, arg2, Closure) is with 
> @ClosureParams(value=SimpleType.class, options="java.lang.String[]") but the 
> Closure receive a instance of List from 
> DefaultGroovyMethods.collect(matcher, closure), this cause a Exception
> {code:java}
> Caught: java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to 
> java.util.List
> java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to 
> java.util.List
> at CLass.m(brasileiro.groovy:7)
> at CLass$m.call(Unknown Source)
> at brasileiro.run(brasileiro.groovy:13)
> {code}
> Exemple:
> {code:java}
> import groovy.transform.CompileStatic
> @CompileStatic
> class CLass {
> List m(){
> String string = 'ABCD'
> //ClassCastException here
> return string.findAll(/(A)(B)(C)/) { String[] group->
>  return group[2]
> }
> }
> }
> new CLass().m(){code}
>  



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


[jira] [Closed] (GROOVY-8949) Run dependency management call as privileged action

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8949.
-

> Run dependency management call as privileged action 
> 
>
> Key: GROOVY-8949
> URL: https://issues.apache.org/jira/browse/GROOVY-8949
> Project: Groovy
>  Issue Type: Improvement
>  Components: Grape
>Affects Versions: 3.0.0-alpha-4, 2.5.5
>Reporter: Dimitry Polivaev
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>
> Because we run scripts with restricted permissions it would be nice if grape 
> could run within a privileged action. Currently we use a metaclass based work 
> around 
> https://github.com/freeplane/freeplane/blob/b11727f6297c7b2beb75786dcdd177c3d087fae3/freeplane_plugin_script/src/main/java/groovy/runtime/metaclass/groovy/grape/GrapeMetaClass.java
>  , however it relies on implementation details of Grape and may be broken one 
> day.
> https://github.com/apache/groovy/pull/848



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


[jira] [Closed] (GROOVY-9019) triple-single and triple-double quotes handle backslash escapes equally

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9019.
-

> triple-single and triple-double quotes handle backslash escapes equally
> ---
>
> Key: GROOVY-9019
> URL: https://issues.apache.org/jira/browse/GROOVY-9019
> Project: Groovy
>  Issue Type: Documentation
>  Components: Documentation
>Reporter: Ilguiz Latypov
>Assignee: Paul King
>Priority: Minor
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> The documentation implies that triple-single quotes treat only escaping of 
> single quotes with backslashes. 
> {code:java}
>  315 |'\''
>  316 |single quote (for single quoted and triple single quoted strings)
>  317
>  318 |'\"'
>  319 |double quote (for double quoted and triple double quoted strings)
> {code}
> [https://gitbox.apache.org/repos/asf?p=groovy.git;a=blob;f=src/spec/doc/core-syntax.adoc;h=30b48fdfb4caafacae343f5dac9dde3372da65b2;hb=HEAD#l315]
>  
> My quick tests show that regardless of the surrounding triple quotes, 
> backslash escaping works equally on single and double quotes.
>  
> {code:java}
> s = '''foo\"bar'''
> println "The triple-single-quoted string with a backslash-double-quote 
> inside: ${s}"
> s = """foo\'bar"""
> println "The triple-double-quoted string with a backslash-single-quote 
> inside: ${s}"
> {code}
>   
> {code:java}
> The triple-single-quoted string with a backslash-double-quote inside: foo"bar
> The triple-double-quoted string with a backslash-single-quote inside: foo'bar
> {code}
>  
>  



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


[jira] [Closed] (GROOVY-9051) The default constructor should be annotated with @Generated

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9051.
-

> The default constructor should be annotated with @Generated 
> 
>
> Key: GROOVY-9051
> URL: https://issues.apache.org/jira/browse/GROOVY-9051
> Project: Groovy
>  Issue Type: Bug
>  Components: Compiler
>Affects Versions: 2.5.6
>Reporter: Jan Wloka
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> Groovy input:
> {code:java}
> class GroovyDelegateClassTarget {
> @groovy.lang.Delegate
> Date target
> }
> {code}
> Groovy output:
> {code}
> public class GroovyDelegateClassTarget implements GroovyObject, Serializable, 
> Cloneable, Comparable {
> @Delegate
> private Date target;
> public GroovyDelegateClassTarget() {
> CallSite[] var1 = $getCallSiteArray();
> super();
> MetaClass var2 = this.$getStaticMetaClass();
> this.metaClass = var2;
> }
> @Generated
> public long getTime() {
> CallSite[] var1 = $getCallSiteArray();
> return DefaultTypeTransformation.longUnbox(var1[0].call(this.target));
> }
> @Generated
> public void setTime(long param0) {
> CallSite[] var3 = $getCallSiteArray();
> var3[1].call(this.target, param0);
> }
> @Generated
> public boolean before(Date param0) {
> CallSite[] var2 = $getCallSiteArray();
> return 
> DefaultTypeTransformation.booleanUnbox(var2[2].call(this.target, param0));
> }
> @Generated
> public boolean after(Date param0) {
> CallSite[] var2 = $getCallSiteArray();
> return 
> DefaultTypeTransformation.booleanUnbox(var2[3].call(this.target, param0));
> }
> @Generated
> public int compareTo(Date param0) {
> CallSite[] var2 = $getCallSiteArray();
> return DefaultTypeTransformation.intUnbox(var2[4].call(this.target, 
> param0));
> }
> @Generated
> public Instant toInstant() {
> CallSite[] var1 = $getCallSiteArray();
> return 
> (Instant)ScriptBytecodeAdapter.castToType(var1[5].call(this.target), 
> Instant.class);
> }
> @Generated
> public Date getTarget() {
> return this.target;
> }
> @Generated
> public void setTarget(Date var1) {
> this.target = var1;
> }
> }
> {code}
> The constructor for this class should be annotated with @Generated
> Issue found during Hackergarten Zurich.



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


[jira] [Closed] (GROOVY-9100) CompilerConfiguration.DEFAULT should be immutable

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9100.
-

> CompilerConfiguration.DEFAULT should be immutable
> -
>
> Key: GROOVY-9100
> URL: https://issues.apache.org/jira/browse/GROOVY-9100
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Paul King
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> We provide a comment "Do not modify it!" but don't take additional 
> precautions that we could.



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


[jira] [Closed] (GROOVY-9073) Support preview features in compiled classes

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9073.
-

> Support preview features in compiled classes
> 
>
> Key: GROOVY-9073
> URL: https://issues.apache.org/jira/browse/GROOVY-9073
> Project: Groovy
>  Issue Type: Improvement
>  Components: Compiler
>Reporter: Keegan Witt
>Assignee: Keegan Witt
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
> Attachments: groovy9073_tweaks.patch
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> In order to support the preview features ([JEP 
> 12|https://openjdk.java.net/jeps/12]), we need a new compiler flag to set the 
> [V_PREVIEW|https://asm.ow2.io/javadoc/org/objectweb/asm/Opcodes.html#V_PREVIEW]
>  opcode (to achieve the equivalent of {{--enable-preview}} mentioned in 
> [JDK-8195734|https://bugs.openjdk.java.net/browse/JDK-8195734]).



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


[jira] [Closed] (GROOVY-9008) Support native method reference and constructor reference (basic cases)

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9008.
-

> Support native method reference and constructor reference (basic cases)
> ---
>
> Key: GROOVY-9008
> URL: https://issues.apache.org/jira/browse/GROOVY-9008
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Generating almost same bytecode to Java's to gain better performance. Note: 
> the feature is available when and only when STC is enabled.
> ||SUB TASK||PRIORITY||COMPLETED||
> |-class::staticMethod-|HIGH|DONE|
> |-class::instanceMethod-|HIGH|DONE|
> |-instance::staticMethod-|HIGH|DONE|
> |-instance::instanceMethod-|HIGH|DONE|
> |-expression::staticMethod-|HIGH|DONE|
> |-expression::instanceMethod-|HIGH|DONE|
> |-class::new-|HIGH|DONE|
> |-arrayClass::new-|HIGH|DONE|
> |-RHS-|HIGH|DONE|



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


[jira] [Closed] (GROOVY-8903) Retrofit NamedParams to groovy.sql.Sql

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8903.
-

> Retrofit NamedParams to groovy.sql.Sql
> --
>
> Key: GROOVY-8903
> URL: https://issues.apache.org/jira/browse/GROOVY-8903
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Paul King
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>




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


[jira] [Closed] (GROOVY-8962) Provide an option to generate Java stubs in memory for better compilation performance

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8962.
-

> Provide an option to generate Java stubs in memory for better compilation 
> performance
> -
>
> Key: GROOVY-8962
> URL: https://issues.apache.org/jira/browse/GROOVY-8962
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The option to enable generating Java stubs in memory is {{memStub}}, which is 
> one of {{jointCompilationOptions}}:
> {code:java}
> def config = new CompilerConfiguration()
> config.jointCompilationOptions = [memStub: true]
> {code}
> See the discussion in the dev mailing list:
> http://groovy.329449.n5.nabble.com/PROPOSAL-Provide-an-option-to-generate-stubs-in-in-momery-file-system-for-better-compiling-performane-tt5756151.html
> P.S. A better implementation is found, so no 3rd-party lib is required.



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


[jira] [Closed] (GROOVY-7856) Adding CompileStatic via compiler config script to class with eachWithIndex results in exception in instruction selection phase

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-7856.
-

> Adding CompileStatic via compiler config script to class with eachWithIndex 
> results in exception in instruction selection phase
> ---
>
> Key: GROOVY-7856
> URL: https://issues.apache.org/jira/browse/GROOVY-7856
> Project: Groovy
>  Issue Type: Bug
>  Components: Compiler
>Affects Versions: 2.4.7
> Environment: Groovy Version: 2.4.7 JVM: 1.8.0_92 Vendor: Oracle 
> Corporation OS: Linux
>Reporter: Rick Venutolo
>Assignee: Paul King
>Priority: Minor
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> I have run into an issue when adding the CompileStatic AST transformation to 
> a class via the Groovy compiler configscript argument.
> {code:title=Demo.groovy|borderStyle=solid}
> class Demo {
> void test() {
> ['a', 'b'].eachWithIndex {String s, int i -> println "$i: $s"}
> }
> }
> {code}
> {code:title=config.groovy|borderStyle=solid}
> import groovy.transform.CompileStatic
> import org.codehaus.groovy.ast.ClassNode
> withConfig(configuration) {
> source(classValidator: {ClassNode classNode -> 
> classNode.nameWithoutPackage == 'Demo'}) {
> ast(CompileStatic)
> }
> }
> {code}
> {code:title=Compile using --configscript|borderStyle=solid}
> $ groovyc --configscript config.groovy Demo.groovy
> {code}
> {code:title=Output (abbreviated)|borderStyle=solid}
> >>> a serious error occurred: BUG! exception in phase 'instruction selection' 
> >>> in source unit 'Demo.groovy' unexpected NullpointerException
> >>> stacktrace:
> BUG! exception in phase 'instruction selection' in source unit 'Demo.groovy' 
> unexpected NullpointerException
> at 
> org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1058)
> at 
> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591)
> at 
> org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
> ...
> Caused by: java.lang.NullPointerException
> at 
> org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:180)
> at 
> org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:170)
> at 
> org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:126)
>   ...
> {code}
> *Notes*
> * Groovy & JVM versions: {{Groovy Version: 2.4.7 JVM: 1.8.0_92 Vendor: Oracle 
> Corporation OS: Linux}}
> ** Have tried Groovy versions going back to 2.4.3 and Oracle JVM 1.7.0_79
> * Changing any of the following will result in no compilation error:
> ** Remove the {{source(classValidator: ...)}} code around {{ast}}, leaving 
> {{ast(CompileStatic)}}, in the compiler config script
> ** Replace the {{eachWithIndex}} call in Demo with {{each}}
> ** Annotate {{Demo}} with {{@CompileStatic}} and compile without 
> {{--configscript}}
> I have detailed and demoed the bug 
> [here|https://github.com/rvenutolo/compilestatic-compiler-config] with some 
> code you can clone and run.



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


[jira] [Closed] (GROOVY-9012) grape resolve command throws MissingPropertyException: No such property: arg

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9012.
-

> grape resolve command throws MissingPropertyException: No such property: arg
> 
>
> Key: GROOVY-9012
> URL: https://issues.apache.org/jira/browse/GROOVY-9012
> Project: Groovy
>  Issue Type: Bug
>  Components: command line processing, Grape
>Affects Versions: 2.5.6
>Reporter: Remko Popma
>Assignee: Remko Popma
>Priority: Major
> Fix For: 2.5.7
>
>
> From the user mailing list:
> {code}
> $ groovy -v
> Groovy Version: 2.5.6 JVM: 1.8.0_77 Vendor: Oracle Corporation OS: Mac OS X
> {code}
>  
> {code}
> $ grape list | grep jcraft
> com.jcraft jsch  [0.1.42, 0.1.54, 0.1.55, 0.1.46, 0.1.53]
> {code}
>  
> {code}
> $ grape resolve com.jcraft jsch 0.1.53
> java.lang.reflect.InvocationTargetException
> 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.tools.GroovyStarter.rootLoader(GroovyStarter.java:110)
> at 
> org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:128)
> Caused by: groovyjarjarpicocli.CommandLine$ExecutionException: Error while 
> running command (org.codehaus.groovy.tools.GrapeMain$Resolve@609e8838): 
> groovy.lang.MissingPropertyException: No such property: arg for class: 
> org.codehaus.groovy.tools.GrapeMain
> at 
> groovyjarjarpicocli.CommandLine.execute(CommandLine.java:1168)
> at 
> groovyjarjarpicocli.CommandLine.access$800(CommandLine.java:141)
> at 
> groovyjarjarpicocli.CommandLine$RunLast.handle(CommandLine.java:1367)
> at 
> groovyjarjarpicocli.CommandLine$RunLast.handle(CommandLine.java:1335)
> at 
> groovyjarjarpicocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1243)
> at 
> groovyjarjarpicocli.CommandLine.parseWithHandlers(CommandLine.java:1526)
> at 
> groovyjarjarpicocli.CommandLine.parseWithHandler(CommandLine.java:1465)
> at 
> groovyjarjarpicocli.CommandLine$parseWithHandler$0.call(Unknown Source)
> at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
> at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
> at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:135)
> at 
> org.codehaus.groovy.tools.GrapeMain.main(GrapeMain.groovy:72)
> ... 6 more
> Caused by: groovy.lang.MissingPropertyException: No such property: arg for 
> class: org.codehaus.groovy.tools.GrapeMain
> at 
> groovy.lang.MetaClassImpl.invokeStaticMissingProperty(MetaClassImpl.java:1021)
> at 
> groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1866)
> at 
> groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1842)
> at 
> groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3797)
> at 
> org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:193)
> at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:468)
> at 
> org.codehaus.groovy.tools.GrapeMain$Resolve.propertyMissing(GrapeMain.groovy)
> 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:101)
> at 
> groovy.lang.MetaClassImpl.invokeMissingProperty(MetaClassImpl.java:889)
> at 
> groovy.lang.MetaClassImpl$12.getProperty(MetaClassImpl.java:2016)
> at 
> org.codehaus.groovy.runtime.callsite.GetEffectivePogoPropertySite.getProperty(GetEffectivePogoPropertySite.java:85)
> at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:309)
> at 
> org.codehaus.groovy.tools.GrapeMain$Resolve.run(GrapeMain.groovy:235)
> at 
> 

[jira] [Closed] (GROOVY-8986) Change the order of default imported packages to reduce the times of resolving

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8986.
-

> Change the order of default imported packages to reduce the times of resolving
> --
>
> Key: GROOVY-8986
> URL: https://issues.apache.org/jira/browse/GROOVY-8986
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> `java.util` is used much frequently than other two java packages(`java.io` 
> and `java.net`), so place java.util before the two packages



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


[jira] [Closed] (GROOVY-9095) Default retention policy not implemented for annotation

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9095.
-

> Default retention policy not implemented for annotation
> ---
>
> Key: GROOVY-9095
> URL: https://issues.apache.org/jira/browse/GROOVY-9095
> Project: Groovy
>  Issue Type: Bug
>  Components: Compiler
>Affects Versions: 2.5.6
>Reporter: Eric Milles
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Consider the following:
> Anno.java
> {code:java}
> public @interface Anno {}
> {code}
> Pogo.groovy
> {code:groovy}
> @Anno public class Pogo {}
> {code}
> Pojo.java
> {code:java}
> @Anno public class Pojo {}
> {code}
> When compiled, Pogo lacks the annotation in its class file.
> {code}
> // Compiled from Pogo.groovy (version 1.8 : 52.0, super bit)
> public class Pogo implements groovy.lang.GroovyObject {
> {code}
> vs.
> {code}
> // Compiled from Pojo.java (version 1.8 : 52.0, super bit)
> @Anno
> public class Pojo {
> {code}
> The default for an annotation that lacks an {{@Retention}} annotation is 
> {{@Retention(RetentionPolicy.CLASS)}}.



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


[jira] [Closed] (GROOVY-9034) adjust Java grammar for underscore in numeric literals (fixes some Groovydoc parse errors of Java files)

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9034.
-

> adjust Java grammar for underscore in numeric literals (fixes some Groovydoc 
> parse errors of Java files)
> 
>
> Key: GROOVY-9034
> URL: https://issues.apache.org/jira/browse/GROOVY-9034
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Paul King
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>




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


[jira] [Closed] (GROOVY-8945) Improve performance of DGM `groupBy` and `countBy`

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8945.
-

> Improve performance of DGM `groupBy` and `countBy`
> --
>
> Key: GROOVY-8945
> URL: https://issues.apache.org/jira/browse/GROOVY-8945
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>




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


[jira] [Closed] (GROOVY-8985) Bump junit to 5.4.0

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8985.
-

> Bump junit to 5.4.0
> ---
>
> Key: GROOVY-8985
> URL: https://issues.apache.org/jira/browse/GROOVY-8985
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>




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


[jira] [Closed] (GROOVY-9085) Add INOUT stored procedure example to asciidoc doc for groovy-sql

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9085.
-

> Add INOUT stored procedure example to asciidoc doc for groovy-sql
> -
>
> Key: GROOVY-9085
> URL: https://issues.apache.org/jira/browse/GROOVY-9085
> Project: Groovy
>  Issue Type: Improvement
>  Components: SQL processing
>Reporter: Paul King
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> See: https://github.com/apache/groovy/pull/893



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


[jira] [Closed] (GROOVY-8978) NPE when accessing protected method from subclass clone

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8978.
-

> NPE when accessing protected method from subclass clone
> ---
>
> Key: GROOVY-8978
> URL: https://issues.apache.org/jira/browse/GROOVY-8978
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.5.6
>Reporter: paolo di tommaso
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> I'm getting a NPE when running this snippet: 
> {code}
> @groovy.transform.CompileStatic
> class LazyMap implements Map {
> @Delegate protected Map target
> LazyMap() {
> target = new HashMap<>()
> }
> }
> @groovy.transform.CompileStatic
> class TaskConfig extends LazyMap implements Cloneable {
> TaskConfig() {  }
> TaskConfig clone() {
> def copy = (TaskConfig)super.clone()
> copy.target = new HashMap<>(this.target)
> return copy
> }
> }
> {code}
> The problem is that `this.target` in the clone method is evaluated to `null`. 
> It works fine if the classes are not declared CompileStatic. It was also 
> working fine with groovy version prior to 2.5.6. 
>  



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


[jira] [Closed] (GROOVY-9063) Groovy 2.5.6 @CompileStatic generates invalid bytecode (leading to runtime ClassCastException) when accessing protected instance member from 2 level of nested closures

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9063.
-

> Groovy 2.5.6 @CompileStatic generates invalid bytecode (leading to runtime 
> ClassCastException) when accessing protected instance member from 2 level of 
> nested closures
> ---
>
> Key: GROOVY-9063
> URL: https://issues.apache.org/jira/browse/GROOVY-9063
> Project: Groovy
>  Issue Type: Bug
>  Components: Compiler, Static compilation
>Affects Versions: 2.5.6
> Environment: Groovy 2.5.6
> @groovy.transform.CompileStatic
>Reporter: Frédéric Chuong
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> Provided the following class:
> {code:groovy}
> import groovy.transform.CompileStatic
> import org.objectweb.asm.ClassReader
> import org.objectweb.asm.util.TraceClassVisitor
> @CompileStatic
> class NoBug {
> protected String message = "hello"
> void noBug() {
> { ->
> { ->
> printClass(getClass().name)
> message.length()
> }.call()
> }.call()
> }
> static void printClass(String className) {
> new ClassReader(className).accept(new TraceClassVisitor(new 
> PrintWriter(System.out)), 0)
> }
> static void main(String[] args) {
> new NoBug().noBug()
> }
> }
> {code}
> {panel:title=No problem with 2.5.5|borderColor=green}
> Compilation ans execution with Groovy 2.5.5 works fine and produce the 
> following output:
> {noformat}
> // class version 52.0 (52)
> // access flags 0x31
> public final class groovy255/NoBug$_noBug_closure1$_closure2 extends 
> groovy/lang/Closure implements org/codehaus/groovy/runtime/GeneratedClosure {
>   // compiled from: NoBug.groovy
>   OUTERCLASS groovy255/NoBug$_noBug_closure1 doCall ()Ljava/lang/Object;
>   // access flags 0x11
>   public final INNERCLASS groovy255/NoBug$_noBug_closure1$_closure2 null 
> _closure2
>   // access flags 0x100A
>   private static synthetic Lorg/codehaus/groovy/reflection/ClassInfo; 
> $staticClassInfo
>   // access flags 0x1089
>   public static transient synthetic Z __$stMC
>   // access flags 0x1
>   public (Ljava/lang/Object;Ljava/lang/Object;)V
>L0
> ALOAD 0
> ALOAD 1
> ALOAD 2
> INVOKESPECIAL groovy/lang/Closure. 
> (Ljava/lang/Object;Ljava/lang/Object;)V
>L1
> RETURN
> LOCALVARIABLE this Lgroovy255/NoBug$_noBug_closure1$_closure2; L0 L1 0
> LOCALVARIABLE _outerInstance Ljava/lang/Object; L0 L1 1
> LOCALVARIABLE _thisObject Ljava/lang/Object; L0 L1 2
> MAXSTACK = 3
> MAXLOCALS = 3
>   // access flags 0x1
>   public doCall()Ljava/lang/Object;
>L0
> LINENUMBER 14 L0
> ALOAD 0
> INVOKEVIRTUAL java/lang/Object.getClass ()Ljava/lang/Class;
> INVOKEVIRTUAL java/lang/Class.getName ()Ljava/lang/String;
> INVOKESTATIC groovy255/NoBug.printClass (Ljava/lang/String;)V
> ACONST_NULL
> POP
>L1
> LINENUMBER 15 L1
> ALOAD 0
> LDC "message"
> INVOKEINTERFACE groovy/lang/GroovyObject.getProperty 
> (Ljava/lang/String;)Ljava/lang/Object; (itf)
> CHECKCAST java/lang/String
> INVOKEVIRTUAL java/lang/String.length ()I
> INVOKESTATIC java/lang/Integer.valueOf (I)Ljava/lang/Integer;
> ARETURN
>L2
> LINENUMBER 14 L2
>FRAME FULL [] [java/lang/Throwable]
> NOP
> ATHROW
> LOCALVARIABLE this Lgroovy255/NoBug$_noBug_closure1$_closure2; L0 L2 0
> MAXSTACK = 2
> MAXLOCALS = 1
>   // access flags 0x1004
>   protected synthetic $getStaticMetaClass()Lgroovy/lang/MetaClass;
> ALOAD 0
> INVOKEVIRTUAL java/lang/Object.getClass ()Ljava/lang/Class;
> LDC Lgroovy255/NoBug$_noBug_closure1$_closure2;.class
> IF_ACMPEQ L0
> ALOAD 0
> INVOKESTATIC 
> org/codehaus/groovy/runtime/ScriptBytecodeAdapter.initMetaClass 
> (Ljava/lang/Object;)Lgroovy/lang/MetaClass;
> ARETURN
>L0
>FRAME SAME
> GETSTATIC groovy255/NoBug$_noBug_closure1$_closure2.$staticClassInfo : 
> Lorg/codehaus/groovy/reflection/ClassInfo;
> ASTORE 1
> ALOAD 1
> IFNONNULL L1
> ALOAD 0
> INVOKEVIRTUAL java/lang/Object.getClass ()Ljava/lang/Class;
> INVOKESTATIC org/codehaus/groovy/reflection/ClassInfo.getClassInfo 
> (Ljava/lang/Class;)Lorg/codehaus/groovy/reflection/ClassInfo;
> DUP
> ASTORE 1
> PUTSTATIC groovy255/NoBug$_noBug_closure1$_closure2.$staticClassInfo : 
> Lorg/codehaus/groovy/reflection/ClassInfo;
>L1
>FRAME APPEND [org/codehaus/groovy/reflection/ClassInfo]
> ALOAD 1
> INVOKEVIRTUAL org/codehaus/groovy/reflection/ClassInfo.getMetaClass 
> ()Lgroovy/lang/MetaClass;
> ARETURN

[jira] [Closed] (GROOVY-4063) Debugger Step Into doesn't work in Groovy-compiled classes when stepping filters are applied

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-4063.
-

> Debugger Step Into doesn't work in Groovy-compiled classes when stepping 
> filters are applied
> 
>
> Key: GROOVY-4063
> URL: https://issues.apache.org/jira/browse/GROOVY-4063
> Project: Groovy
>  Issue Type: Bug
>  Components: class generator
>Affects Versions: 1.6.7, 1.7.0
>Reporter: Peter Gromov
>Priority: Major
> Attachments: debug-test.tar.gz
>
>
> Reproduced in IntelliJ IDEA 9, GroovyEclipse 2.0 and JSWAT 4.5, therefore the 
> problem is probably in Groovy itself.
> Stepping class exclusion filters are set to ignore everything from Java and 
> Groovy internals: groovy.*,org.codehaus.groovy.*,java.*,sun.*,org.apache.*
> {code}
> class Some {
>   static void meth() {
>   println "Method is called."
>   }
>   public static void main(String[] args) {
>   meth()  // breakpoint here
>   }
> }
> {code}
> Run to the breakpoint in 'main' method. 'Step into'. There's a very long 
> pause (presumably JVM applies the filters to all the underlying groovy 
> internals), the message is printed and the program exits. Breakpoint is not 
> hit.
> Now put the breakpoint to the 'println' line in 'meth' and repeat stepping 
> into. This time the debugger stops at it.
> Stepping worked in earlier Groovy versions (e.g. 1.5) and stopped in 1.6. 
> Therefore I suspect it to be somehow mystically related to class generation 
> (or the libraries used, whatever)



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


[jira] [Closed] (GROOVY-9014) printf does not respect "out" property

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9014.
-

> printf does not respect "out" property
> --
>
> Key: GROOVY-9014
> URL: https://issues.apache.org/jira/browse/GROOVY-9014
> Project: Groovy
>  Issue Type: Bug
>  Components: groovy-runtime
> Environment: Ubuntu 18.04.1,
>Reporter: Pavel Melnikov
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
> Attachments: test.groovy
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> I am using groovy to run dynamic scripts from my Java application. I use 
> JSR223 for this. I am overriding "out" property to redirect script stdout to 
> my own consumer. However, I've noticed that *printf* inside closures does not 
> respect that property (it always prints to stdout) while *println* perfectly 
> complies (and prints to whatever specified).
>  
> I beleive this is because of the differences in printf and println in 
> DefaultGroovyMethods.java: in 
> [https://github.com/apache/groovy/blob/master/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L849]
> println uses closure owner while printf does simple System.out.



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


[jira] [Closed] (GROOVY-8987) Support profiling parser

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8987.
-

> Support profiling parser
> 
>
> Key: GROOVY-8987
> URL: https://issues.apache.org/jira/browse/GROOVY-8987
> Project: Groovy
>  Issue Type: Improvement
>  Components: parser-antlr4
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>




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


[jira] [Closed] (GROOVY-7954) Equal Operator for Classes implementing Comparable not Working on Interfaces

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-7954.
-

> Equal Operator for Classes implementing Comparable not Working on Interfaces
> 
>
> Key: GROOVY-7954
> URL: https://issues.apache.org/jira/browse/GROOVY-7954
> Project: Groovy
>  Issue Type: Bug
>  Components: groovy-runtime
>Affects Versions: 2.4.7
> Environment: Windows 10, Java 7
>Reporter: Josef
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
> Attachments: Example.zip
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Using the equal operator "==" on two instances A and B does not work 
> correctly, when
> 1) A and B implement the same interface I1 but are not the same class and
> 2) interface I1 extends the "Comparable" interface.
> The checking in DefaultTypeTransformation.compareToWithEqualityCheck(...) 
> checks for assignable classes, and uses compareTo when assignable on class 
> level (which is not the case for instance A and B). But it does not check on 
> interface level.
> That way, calling the compareTo(..) method is not performed.
> In my use case, class A and B are actually considered equal, even so their 
> concrete implementation is different. And the compareTo(...) method would 
> actually return 0. 
> How about doing real equality checking instead of returning -1 close to the 
> end of method DefaultTypeTransformation.compareToWithEqualityCheck(...):
> ...
> if (equalityCheckOnly) {
> return left.equals(right) ? 0 : -1;
> }
> throw new GroovyRuntimeException("Cannot compare " + 
> left.getClass().getName() + " with value '" +
> left + "' and " + right.getClass().getName() + " with value 
> '" + right + "'");
> Thanks for your effort.



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


[jira] [Closed] (GROOVY-8704) IntRange should be Serializable

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8704.
-

> IntRange should be Serializable
> ---
>
> Key: GROOVY-8704
> URL: https://issues.apache.org/jira/browse/GROOVY-8704
> Project: Groovy
>  Issue Type: Improvement
>  Components: groovy-jdk
>Reporter: Rudolf-Walter Kiss-Szakacs
>Assignee: Paul King
>Priority: Minor
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Sometimes it would be useful if a groovy.lang.IntRange could be serialized.



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


[jira] [Closed] (GROOVY-8988) Bump antlr to 4.7.3

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8988.
-

> Bump antlr to 4.7.3
> ---
>
> Key: GROOVY-8988
> URL: https://issues.apache.org/jira/browse/GROOVY-8988
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>




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


[jira] [Closed] (GROOVY-9053) Missing @Generated annotation in @Bindable

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9053.
-

> Missing @Generated annotation in @Bindable
> --
>
> Key: GROOVY-9053
> URL: https://issues.apache.org/jira/browse/GROOVY-9053
> Project: Groovy
>  Issue Type: Bug
>  Components: Compiler
>Affects Versions: 2.5.6
>Reporter: Vadimo
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> jacoco is reporting incorrect code coverage results for @Bindable annotated 
> classes. 
> The generated 
> * set*
> * firePropertyChange
> * removePropertyChangeListener, 
> * addPropertyChangeListener
> * getPropertyChangeListener
> methods should probably be annotated with @Generated
> In the examples below 11 methods that are detected as not covered.
> [http://docs.groovy-lang.org/2.5.6/html/gapi/groovy/beans/Bindable.html]
> {code:java}
>  class Person {
> @groovy.beans.Bindable
> String firstName
> @groovy.beans.Bindable
> def zipCode
>  }
> {code}
> This bug was found during Hackergarten Zürich 



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


[jira] [Closed] (GROOVY-9052) Missing @Generated annotation on @Vetoable

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9052.
-

> Missing @Generated annotation on @Vetoable
> --
>
> Key: GROOVY-9052
> URL: https://issues.apache.org/jira/browse/GROOVY-9052
> Project: Groovy
>  Issue Type: Bug
>  Components: Compiler
>Affects Versions: 2.5.6
>Reporter: Vadimo
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> jacoco is reporting incorrect code coverage results for @Vetoable annotated 
> classes. 
> The generated 
> * set*
> * fireVetoablePropertyChange
> * removeVetoablePropertyChangeListener, 
> * addVetoablePropertyChangeListener
> * getVetoablePropertyChangeListener
> methods should probably be annotated with @Generated
> In the examples below 11 methods that are detected as not covered.
> [http://docs.groovy-lang.org/2.5.6/html/gapi/groovy/beans/Vetoable.html]
> {code:java}
>  @groovy.beans.Vetoable
>  class Person {
>  String firstName
>  def zipCode
>  }
> {code}
> This bug was found during Hackergarten Zürich 



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


[jira] [Closed] (GROOVY-9086) @CompileStatic of closure calls with OWNER_FIRST fail at runtime with ClassCastException

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9086.
-

> @CompileStatic of closure calls with OWNER_FIRST fail at runtime with 
> ClassCastException
> 
>
> Key: GROOVY-9086
> URL: https://issues.apache.org/jira/browse/GROOVY-9086
> Project: Groovy
>  Issue Type: Bug
>  Components: Static compilation
>Affects Versions: 2.5.6
> Environment: WIndows7, Groovy 2.5.6, Java 8 + 11
>Reporter: Andreas Turban
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
> Attachments: StaticTypeCheckingVisitor.java, TestScript.groovy
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The attached script fails with a ClassCastException, when method m2 is 
> annotated with 
>  
> {code:java}
> strategy = Closure.OWNER_FIRST
> {code}
>  but work with 
>  
> {code:java}
> strategy = Closure.DELEGATE_FIRST
> {code}
>  The expected system-out should be 
>  
> {code:java}
> c1Method called{code}
>  in both cases. The generated bytecode for closure 
> Test$_test_closure1$_closure2.class contains a call to getDelegate() instead 
> of getOwner() in case of Closure.OWNER_FIRST. But correctly generates code 
> getOwner() in case of Closure.DELEGATE_FIRST.
> The resulting ClassCastException at runtime is:
> {code:java}
> java.lang.ClassCastException: Test$C2 cannot be cast to groovy.lang.Closure
> at Test$_test_closure1$_closure2.doCall(TestScript.groovy:28)
> at Test$_test_closure1$_closure2.doCall(TestScript.groovy)
> at Test.m2(TestScript.groovy:20)
> at Test$_test_closure1.doCall(TestScript.groovy:26)
> at Test$_test_closure1.doCall(TestScript.groovy)
> at Test.m1(TestScript.groovy:8)
> at Test.test(TestScript.groovy:25)
> at Test$test.call(Unknown Source)
> at TestScript.run(TestScript.groovy:42)
> {code}
> The wrong bytecode for case Closure.OWNER_FIRST:
> {code:java}
> public java.lang.Object doCall(java.lang.Object);
> descriptor: (Ljava/lang/Object;)Ljava/lang/Object;
> flags: ACC_PUBLIC
> Code:
> stack=1, locals=2, args_size=2
> 0: aload_0
> 1: checkcast #2 // class Test$_test_closure1$_closure2
> 4: invokevirtual #29 // Method getDelegate:()Ljava/lang/Object;
> 7: checkcast #4 // class groovy/lang/Closure
> 10: invokevirtual #30 // Method 
> groovy/lang/Closure.getDelegate:()Ljava/lang/Object;
> 13: checkcast #32 // class Test$C1
> 16: invokevirtual #36 // Method Test$C1.c1Method:()V
> 19: aconst_null
> 20: areturn
> {code}
> The correct bytecode for case Closure.DELEGATE_FIRST:
> {code:java}
> public java.lang.Object doCall(java.lang.Object);
> descriptor: (Ljava/lang/Object;)Ljava/lang/Object;
> flags: ACC_PUBLIC
> Code:
> stack=1, locals=2, args_size=2
> 0: aload_0
> 1: checkcast #2 // class Test$_test_closure1$_closure2
> 4: invokevirtual #29 // Method getOwner:()Ljava/lang/Object;
> 7: checkcast #4 // class groovy/lang/Closure
> 10: invokevirtual #32 // Method 
> groovy/lang/Closure.getDelegate:()Ljava/lang/Object;
> 13: checkcast #34 // class Test$C1
> 16: invokevirtual #38 // Method Test$C1.c1Method:()V
> 19: aconst_null
> 20: areturn
> {code}



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


[jira] [Closed] (GROOVY-8994) Bump spotbugs-annotations to 3.1.11

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8994.
-

> Bump spotbugs-annotations to 3.1.11
> ---
>
> Key: GROOVY-8994
> URL: https://issues.apache.org/jira/browse/GROOVY-8994
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>




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


[jira] [Closed] (GROOVY-5961) Variable scope not checked properly for AIC in static method

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-5961.
-

> Variable scope not checked properly for AIC in static method
> 
>
> Key: GROOVY-5961
> URL: https://issues.apache.org/jira/browse/GROOVY-5961
> Project: Groovy
>  Issue Type: Sub-task
>  Components: Compiler
>Affects Versions: 2.1.0
>Reporter: Cédric Champeau
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
> Attachments: VariableScopeVisitor.java
>
>
> The following code will fail:
> {code}
> static void foo() {
> new LinkedList() {
> int index
> Object get(int i) { super.get(index++) }
> }
> }
> {code}
> The error is:
> {noformat}
> Apparent variable 'index' was found in a static scope but doesn't refer to a 
> local variable, static field or class. Possible causes:
> You attempted to reference a variable in the binding or an instance variable 
> from a static context.
> You misspelled a classname or statically imported field. Please check the 
> spelling.
> You attempted to use a method 'index' but left out brackets in a place not 
> allowed by the grammar.
>  at line: 5, column: 39
> {noformat}
> But obviously, {{index}} is not accessed from a static context here.



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


[jira] [Closed] (GROOVY-9040) scripts within src/bin don't pass latest shellcheck recommendations

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9040.
-

> scripts within src/bin don't pass latest shellcheck recommendations
> ---
>
> Key: GROOVY-9040
> URL: https://issues.apache.org/jira/browse/GROOVY-9040
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.5.6
> Environment: GROOVY_TURN_OFF_JAVA_WARNINGS=true
>Reporter: Dylan Cali
>Assignee: Paul King
>Priority: Minor
>  Labels: groovy, groovyc, groovysh
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> I am getting this warning when invoking groovy from the command line (groovy, 
> groovysh, groovyc, etc) on the following system:
> $ groovy -version
> WARNING: package sun.awt.windows not in java.desktop
> Groovy Version: 2.5.6 JVM: 11.0.1 Vendor: Oracle Corporation OS: Linux
> $ java -version
> openjdk version "11.0.1" 2018-10-16
> OpenJDK Runtime Environment (build 11.0.1+13-Ubuntu-3ubuntu116.04ppa1)
> OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-3ubuntu116.04ppa1, mixed 
> mode, sharing)
> $ cat /etc/lsb-release
> DISTRIB_ID=LinuxMint
> DISTRIB_RELEASE=18.2
> DISTRIB_CODENAME=sonya
> DISTRIB_DESCRIPTION="Linux Mint 18.2 Sonya"
>  
>  



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


[jira] [Closed] (GROOVY-9046) Build hardening

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9046.
-

> Build hardening
> ---
>
> Key: GROOVY-9046
> URL: https://issues.apache.org/jira/browse/GROOVY-9046
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.4.16, 3.0.0-alpha-4, 2.5.6
>Reporter: Paul King
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7, 2.4.17
>
>
> Relevant commits:
> https://github.com/apache/groovy/commit/bd2bd6a3cc
> https://github.com/apache/groovy/commit/a30c090fc9



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


[jira] [Closed] (GROOVY-8993) Bump spotbugs gradle plugin to 1.6.9

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8993.
-

> Bump spotbugs gradle plugin to 1.6.9
> 
>
> Key: GROOVY-8993
> URL: https://issues.apache.org/jira/browse/GROOVY-8993
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>




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


[jira] [Closed] (GROOVY-9065) Add support for @Testable annotation in JUnit5Runner

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9065.
-

> Add support for @Testable annotation in JUnit5Runner
> 
>
> Key: GROOVY-9065
> URL: https://issues.apache.org/jira/browse/GROOVY-9065
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Leonard Brünings
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Currently the JUnit5Runner checks for annotations with 
> {{name.startsWith("org.junit.jupiter.api.")}} to support any JUnit 5 Engine, 
> e.g. Spock 2.0. This should be extended to check for the presence of the 
> Meta-Annotation 
> [@Testable|https://junit.org/junit5/docs/5.2.0/api/org/junit/platform/commons/annotation/Testable.html]
>  instead.
> So check for the presence of {{@Testable}} directly on the method/class. Or 
> on its presence on other annotations, e.g. JUnit Jupiter {{@Test}} is 
> annotated with {{@Testable}}.



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


[jira] [Closed] (GROOVY-9020) bump asm to 7.1

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9020.
-

> bump asm to 7.1
> ---
>
> Key: GROOVY-9020
> URL: https://issues.apache.org/jira/browse/GROOVY-9020
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Paul King
>Assignee: Keegan Witt
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> see https://github.com/apache/groovy/pull/887
> (adds JDK 13 support)



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


[jira] [Closed] (GROOVY-9038) allow antlr2 java grammar to partially understand try-with-resources (just enough to keep groovydoc processing of java files happy)

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9038.
-

> allow antlr2 java grammar to partially understand try-with-resources (just 
> enough to keep groovydoc processing of java files happy)
> ---
>
> Key: GROOVY-9038
> URL: https://issues.apache.org/jira/browse/GROOVY-9038
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Paul King
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>




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


[jira] [Closed] (GROOVY-9099) Throw a better exception when validating native method reference fails

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9099.
-

> Throw a better exception when validating native method reference fails
> --
>
> Key: GROOVY-9099
> URL: https://issues.apache.org/jira/browse/GROOVY-9099
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>




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


[jira] [Closed] (GROOVY-9018) WARNING: package sun.awt.windows not in java.desktop

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9018.
-

> WARNING: package sun.awt.windows not in java.desktop
> 
>
> Key: GROOVY-9018
> URL: https://issues.apache.org/jira/browse/GROOVY-9018
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.5.6
> Environment: GROOVY_TURN_OFF_JAVA_WARNINGS=true
>Reporter: Dylan Cali
>Assignee: Paul King
>Priority: Minor
>  Labels: groovy, groovyc, groovysh
> Fix For: 3.0.0-beta-1, 2.5.7
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> I am getting this warning when invoking groovy from the command line (groovy, 
> groovysh, groovyc, etc) on the following system:
> $ groovy -version
> WARNING: package sun.awt.windows not in java.desktop
> Groovy Version: 2.5.6 JVM: 11.0.1 Vendor: Oracle Corporation OS: Linux
> $ java -version
> openjdk version "11.0.1" 2018-10-16
> OpenJDK Runtime Environment (build 11.0.1+13-Ubuntu-3ubuntu116.04ppa1)
> OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-3ubuntu116.04ppa1, mixed 
> mode, sharing)
> $ cat /etc/lsb-release
> DISTRIB_ID=LinuxMint
> DISTRIB_RELEASE=18.2
> DISTRIB_CODENAME=sonya
> DISTRIB_DESCRIPTION="Linux Mint 18.2 Sonya"
>  
>  



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


[jira] [Closed] (GROOVY-9029) [Console] Save output log file preferences to OS preferences

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9029.
-

> [Console] Save output log file preferences to OS preferences
> 
>
> Key: GROOVY-9029
> URL: https://issues.apache.org/jira/browse/GROOVY-9029
> Project: Groovy
>  Issue Type: Improvement
>  Components: Groovy Console
>Reporter: Fabrice MONNIER
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> This Jira is the continuation of GROOVY-8180.
> The objective of the Jira is to save the new option (append output to log 
> file) to OS user preferences.



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


[jira] [Closed] (GROOVY-9022) In Groovy console, enable option for output to be on the right side. (horizontal split)

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9022.
-

> In Groovy console, enable option for output to be on the right side. 
> (horizontal split)
> ---
>
> Key: GROOVY-9022
> URL: https://issues.apache.org/jira/browse/GROOVY-9022
> Project: Groovy
>  Issue Type: Improvement
>  Components: Groovy Console
>Affects Versions: 3.0.0-alpha-4
>Reporter: Adam L. Davis
>Assignee: Paul King
>Priority: Minor
> Fix For: 3.0.0-beta-1, 2.5.7
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Enable option for output to be on the right side. (horizontal split) rather 
> than below.



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


[jira] [Closed] (GROOVY-8339) Fix warning "An illegal reflective access operation has occurred"

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8339.
-

> Fix warning "An illegal reflective access operation has occurred"
> -
>
> Key: GROOVY-8339
> URL: https://issues.apache.org/jira/browse/GROOVY-8339
> Project: Groovy
>  Issue Type: Improvement
>  Components: groovy-jdk
>Affects Versions: 2.4.11, 2.4.15
> Environment: >gradle --version
> Gradle 4.2
> Build time:   2017-09-20 14:48:23 UTC
> Revision: 5ba503cc17748671c83ce35d7da1cffd6e24dfbd
> Groovy:   2.4.11
> Ant:  Apache Ant(TM) version 1.9.6 compiled on June 29 2015
> JVM:  9 (Oracle Corporation 9+181)
> OS:   Windows 10 10.0 amd64
>Reporter: Benjamin Roedell
>Assignee: Daniel Sun
>Priority: Major
>  Labels: security
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> I'm running JDK-9 on Windows 10 with Gradle 4.2.
> My global gradle.properties file contains the following line:
> org.gradle.java.home=C:/Program Files/Java/jdk-9
> When I request the gradle version (gradle --version) I get the following 
> warning:
> {code:none}
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by 
> org.codehaus.groovy.reflection.CachedClass 
> (file:/C:/Program%20Files/gradle-4.2/lib/groovy-all-2.4.11.jar) to method 
> java.lang.Object.finalize()
> WARNING: Please consider reporting this to the maintainers of 
> org.codehaus.groovy.reflection.CachedClass
> WARNING: Use --illegal-access=warn to enable warnings of further illegal 
> reflective access operations
> WARNING: All illegal access operations will be denied in a future release
> {code}
> This warning displayed regardless of whether I'm using a regular command 
> prompt or an elevated rights (Administrator) command prompt.
> Here's the full command and output:
> {code:none}
> gradle --version
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by 
> org.codehaus.groovy.reflection.CachedClass 
> (file:/C:/Program%20Files/gradle-4.2/lib/groovy-all-2.4.11.jar) to method 
> java.lang.Object.finalize()
> WARNING: Please consider reporting this to the maintainers of 
> org.codehaus.groovy.reflection.CachedClass
> WARNING: Use --illegal-access=warn to enable warnings of further illegal 
> reflective access operations
> WARNING: All illegal access operations will be denied in a future release
> 
> Gradle 4.2
> 
> Build time:   2017-09-20 14:48:23 UTC
> Revision: 5ba503cc17748671c83ce35d7da1cffd6e24dfbd
> Groovy:   2.4.11
> Ant:  Apache Ant(TM) version 1.9.6 compiled on June 29 2015
> JVM:  9 (Oracle Corporation 9+181)
> OS:   Windows 10 10.0 amd64
> {code}



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


[jira] [Closed] (GROOVY-9071) Bump gradle to 5.3.1

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9071.
-

> Bump gradle to 5.3.1
> 
>
> Key: GROOVY-9071
> URL: https://issues.apache.org/jira/browse/GROOVY-9071
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>




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


[jira] [Closed] (GROOVY-9078) Inefficiency in MethodNode and ConstructorNode

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9078.
-

> Inefficiency in MethodNode and ConstructorNode
> --
>
> Key: GROOVY-9078
> URL: https://issues.apache.org/jira/browse/GROOVY-9078
> Project: Groovy
>  Issue Type: Bug
>Reporter: Eric Milles
>Assignee: Paul King
>Priority: Minor
> Fix For: 3.0.0-beta-1, 2.5.7, 2.4.17
>
>
> The constructor of {{MethodNode}} performs {{VariableScope scope = new 
> VariableScope(); setVariableScope(scope);}} followed by 
> {{setParameters(parameters);}}, which in turn creates a variable scope, 
> populates it and sets it.  The first variable scope is superflous and those 2 
> lines could be deleted.
> Also, the constructor of {{ConstructorNode}} calls the super constructor and 
> then creates a variable scope, fills it with param info and sets it.  Since 
> the super constructor (as described above) already calls {{setParameters}}, 
> the extra variable scope created in {{ConstructorNode}} could be removed.



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


[jira] [Closed] (GROOVY-9079) STC: NPE in StaticTypeCheckingVisitor.inferSAMTypeGenericsInAssignment

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9079.
-

> STC: NPE in StaticTypeCheckingVisitor.inferSAMTypeGenericsInAssignment
> --
>
> Key: GROOVY-9079
> URL: https://issues.apache.org/jira/browse/GROOVY-9079
> Project: Groovy
>  Issue Type: Bug
>Reporter: Eric Milles
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> Consider the following:
> {code:groovy}
> @groovy.transform.CompileStatic
> void meth() {
>   java.util.concurrent.Callable call = { -> '' }
> }
> {code}
> This code produces:
> {code}
> BUG! exception in phase 'instruction selection' in source unit 'Blah.groovy' 
> unexpected NullpointerException
>   at 
> org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1148)
>   at 
> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:654)
>   at 
> org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:632)
>   at 
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:609)
>   ...
> Caused by: java.lang.NullPointerException
>   at 
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.inferSAMTypeGenericsInAssignment(StaticTypeCheckingVisitor.java:4282)
>   at 
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.getResultType(StaticTypeCheckingVisitor.java:4133)
>   at 
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitBinaryExpression(StaticTypeCheckingVisitor.java:831)
>   ...
> {code}
> The method in StaticTypeCheckingVisitor calls 
> ClosureExpression.getParameters(), which returns null for a closure 
> expression like "{ -> '' }".



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


[jira] [Closed] (GROOVY-9035) config script: unexpected NPE when processing compiler config DSL

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9035.
-

> config script: unexpected NPE when processing compiler config DSL
> -
>
> Key: GROOVY-9035
> URL: https://issues.apache.org/jira/browse/GROOVY-9035
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.5.6
>Reporter: Eric Milles
>Assignee: Paul King
>Priority: Minor
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> I started experimenting with using config script to enable static compilation 
> by default.  I ran into GROOVY-7856 pretty much right away.  So I decided to 
> comment out my config script like this:
> {code:groovy}
> withConfig(configuration) {
> source(classValidator: { !it.isInterface() }) { ->
> //ast(groovy.transform.CompileStatic)
> }
> }
> {code}
> Now I get this NPE because there is no delegate CompilationCustomizer found 
> for the SourceAwareCustomizer.
> {code}
> java.lang.NullPointerException
>   at 
> org.codehaus.groovy.control.customizers.DelegatingCustomizer.(DelegatingCustomizer.java:36)
>   at 
> org.codehaus.groovy.control.customizers.SourceAwareCustomizer.(SourceAwareCustomizer.java:50)
>   at 
> org.codehaus.groovy.control.customizers.builder.SourceAwareCustomizerFactory.postCompleteNode(SourceAwareCustomizerFactory.java:95)
>   at 
> org.codehaus.groovy.control.customizers.builder.CompilerCustomizationBuilder.postNodeCompletion(CompilerCustomizationBuilder.groovy:48)
>   at 
> groovy.util.FactoryBuilderSupport.dispatchNodeCall(FactoryBuilderSupport.java:903)
>   at 
> groovy.util.FactoryBuilderSupport.doInvokeMethod(FactoryBuilderSupport.java:787)
>   at 
> groovy.util.FactoryBuilderSupport.invokeMethod(FactoryBuilderSupport.java:507)
>   at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:413)
>   at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:337)
>   at 
> org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:64)
>   at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:156)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:176)
>   at config$_run_closure1.doCall(config.groovy:4)
>   at config$_run_closure1.doCall(config.groovy)
> ...
> {code}
> Could the SourceAwareCustomizerFactory be more forgiving and supply a "no-op" 
> CompilationCustomizer in newInstance?
> {code}
> public Object newInstance(final FactoryBuilderSupport builder, final 
> Object name, final Object value, final Map attributes) throws 
> InstantiationException, IllegalAccessException {
> SourceOptions data = new SourceOptions();
> if (value instanceof CompilationCustomizer) {
> data.delegate = (CompilationCustomizer) value;
> }
> // add
> else {
> data.delegate = new CompilationCustomizer(0) {};
> }
> // end
> return data;
> }
> {code}



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


[jira] [Closed] (GROOVY-9037) allow java grammar to partially understand "default" in interfaces (just enough to keep groovydoc processing of java files happy)

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9037.
-

> allow java grammar to partially understand "default" in interfaces (just 
> enough to keep groovydoc processing of java files happy)
> -
>
> Key: GROOVY-9037
> URL: https://issues.apache.org/jira/browse/GROOVY-9037
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Paul King
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>




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


[jira] [Closed] (GROOVY-9083) groovyConsole should be updated to understand method references and lambda expressions

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9083.
-

> groovyConsole should be updated to understand method references and lambda 
> expressions
> --
>
> Key: GROOVY-9083
> URL: https://issues.apache.org/jira/browse/GROOVY-9083
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Paul King
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>




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


[jira] [Closed] (GROOVY-8980) Bump picocli to 3.9.3

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8980.
-

> Bump picocli to 3.9.3
> -
>
> Key: GROOVY-8980
> URL: https://issues.apache.org/jira/browse/GROOVY-8980
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>




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


[jira] [Closed] (GROOVY-9105) Fix trying to compile properties files and anything that doesn't end with java

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9105.
-

> Fix trying to compile properties files and anything that doesn't end with java
> --
>
> Key: GROOVY-9105
> URL: https://issues.apache.org/jira/browse/GROOVY-9105
> Project: Groovy
>  Issue Type: Bug
>  Components: Ant integration
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>
> {{GenerateStubsTask}}  tries to compile properties files and anything that 
> doesn't end with java.



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


[jira] [Closed] (GROOVY-9060) Make the initial capacity of LinkedHashMap be power of 2 for better performance

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9060.
-

> Make the initial capacity of LinkedHashMap be power of 2 for better 
> performance
> ---
>
> Key: GROOVY-9060
> URL: https://issues.apache.org/jira/browse/GROOVY-9060
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-beta-1
>
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> {\{LinkedHashMap}} is a subclass of \{{HashMap}}, so its initial capacity 
> should be power of 2 too.
> SEE: 
> [https://stackoverflow.com/questions/8352378/why-does-hashmap-require-that-the-initial-capacity-be-a-power-of-two]
>  



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


[jira] [Closed] (GROOVY-9061) Tests containing @Grab statements within nested scripts fail in JDK12

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9061.
-

> Tests containing @Grab statements within nested scripts fail in JDK12
> -
>
> Key: GROOVY-9061
> URL: https://issues.apache.org/jira/browse/GROOVY-9061
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.0-alpha-4, 2.5.6
>Reporter: Paul King
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> Seems to be due to the class java.security.AccessController now appearing in 
> the execution stack whereas it doesn't up until JDK11. This breaks the 
> current logic for ReflectionUtils#getCallingClass that Grab uses to find the 
> groovy class loader.



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


[jira] [Closed] (GROOVY-9058) each parameter type not correctly inferenced

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9058.
-

> each parameter type not correctly inferenced
> 
>
> Key: GROOVY-9058
> URL: https://issues.apache.org/jira/browse/GROOVY-9058
> Project: Groovy
>  Issue Type: Bug
>  Components: Static compilation
>Affects Versions: 2.5.6
>Reporter: Mauro Molinari
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Consider this Java class:
> {code:java}
> package test51;
> import java.util.List;
> public class Foo {
>     public List bar() { return null; }
> }{code}
>  and this Groovy class:
> {code:java}
> package test51
> import groovy.transform.CompileStatic
> @CompileStatic
> class Test51 {
>     protected void foo() {
>         List foo = new Foo().bar()
>         foo.each { row ->
>             def o = row[0]
>         }
>     }
>     
>     List bar() {
>     }
> }{code}
> This produces a compiler error because {{row}} is resolved as {{Object}} 
> rather than {{Object[]}}.
> A workaround is to declare {{row}} as {{Object[] row}} in the closure 
> parameter list.



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


[jira] [Closed] (GROOVY-9077) STC: inferred type not always stored for property getters that resolve to a method

2019-05-20 Thread Paul King (JIRA)


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

Paul King closed GROOVY-9077.
-

> STC: inferred type not always stored for property getters that resolve to a 
> method
> --
>
> Key: GROOVY-9077
> URL: https://issues.apache.org/jira/browse/GROOVY-9077
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.5.6
>Reporter: Eric Milles
>Assignee: Paul King
>Priority: Minor
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> Consider the following:
> {code:groovy}
> @groovy.transform.CompileStatic
> void meth(List list) {
>   if (list instanceof LinkedList && list.first) {
>   }
>   if (list instanceof LinkedList && list.peek()) {
>   }
> }
> {code}
> {{storeTargetMethod}} is called for the method call expression 
> {{list.peek()}}.  However, when 
> {{org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.existsProperty}}
>  resolves {{list.first}} to a method, {{storeTargetMethod}} is not called.  
> This means the AST node does not record the direct method call target.  Also, 
> a type-checking extension does not have a chance to handle the method 
> selection event.
> This addition addresses the issue for class getters:
> {code:java}
> if (readMode && checkGetterOrSetter) {
> if (getter != null) {
> ClassNode cn = inferReturnTypeGenerics(current, 
> getter, ArgumentListExpression.EMPTY_ARGUMENTS);
> storeInferredTypeForPropertyExpression(pexp, cn);
> // GRECLIPSE add
> storeTargetMethod(pexp, getter);
> // GRECLIPSE end
> 
> pexp.removeNodeMetaData(StaticTypesMarker.READONLY_PROPERTY);
> String delegationData = receiver.getData();
> if (delegationData != null)
> 
> pexp.putNodeMetaData(StaticTypesMarker.IMPLICIT_RECEIVER, delegationData);
> return true;
> }
> {code}
> and this change addresses the issue for extension method getters:
> {code:java}
> // GROOVY-5568, the property may be defined by DGM
> List dgmReceivers = new ArrayList(2);
> dgmReceivers.add(testClass);
> if (isPrimitiveType(testClass)) 
> dgmReceivers.add(getWrapper(testClass));
> for (ClassNode dgmReceiver : dgmReceivers) {
> List methods = 
> findDGMMethodsByNameAndArguments(getTransformLoader(), dgmReceiver, "get" + 
> capName, ClassNode.EMPTY_ARRAY);
> for (MethodNode m : 
> findDGMMethodsByNameAndArguments(getTransformLoader(), dgmReceiver, "is" + 
> capName, ClassNode.EMPTY_ARRAY)) {
> if (Boolean_TYPE.equals(getWrapper(m.getReturnType( 
> methods.add(m);
> }
> if (!methods.isEmpty()) {
> List methodNodes = 
> chooseBestMethod(dgmReceiver, methods, ClassNode.EMPTY_ARRAY);
> if (methodNodes.size() == 1) {
> MethodNode getter = methodNodes.get(0);
> if (visitor != null) {
> visitor.visitMethod(getter);
> }
> ClassNode cn = inferReturnTypeGenerics(dgmReceiver, 
> getter, ArgumentListExpression.EMPTY_ARGUMENTS);
> storeInferredTypeForPropertyExpression(pexp, cn);
> // GRECLIPSE add
> storeTargetMethod(pexp, getter);
> // GRECLIPSE end
> return true;
> }
> }
> }
> {code}
> The selection of a setter method is not as simple, since there may be many 
> candidates.



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


  1   2   >