[jira] [Closed] (GROOVY-8661) bump gradle to 4.8.1

2018-06-22 Thread Paul King (JIRA)


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

Paul King closed GROOVY-8661.
-

> bump gradle to 4.8.1
> 
>
> Key: GROOVY-8661
> URL: https://issues.apache.org/jira/browse/GROOVY-8661
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Paul King
>Assignee: Paul King
>Priority: Major
> Fix For: 2.6.0-alpha-4, 3.0.0-alpha-3, 2.5.1
>
>




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


[jira] [Resolved] (GROOVY-8661) bump gradle to 4.8.1

2018-06-22 Thread Paul King (JIRA)


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

Paul King resolved GROOVY-8661.
---
   Resolution: Fixed
Fix Version/s: 2.6.0-alpha-4
   2.5.1
   3.0.0-alpha-3

> bump gradle to 4.8.1
> 
>
> Key: GROOVY-8661
> URL: https://issues.apache.org/jira/browse/GROOVY-8661
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Paul King
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-alpha-3, 2.5.1, 2.6.0-alpha-4
>
>




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


[jira] [Commented] (GROOVY-8657) Resource variable is accessible from finally block

2018-06-22 Thread Paul King (JIRA)


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

Paul King commented on GROOVY-8657:
---

I removed it from the release notes for Groovy 3

> Resource variable is accessible from finally block
> --
>
> Key: GROOVY-8657
> URL: https://issues.apache.org/jira/browse/GROOVY-8657
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.0-alpha-2
>Reporter: Daniil Ovchinnikov
>Priority: Major
>
> From http://groovy-lang.org/releasenotes/groovy-3.0.html
> {code:groovy}
> try(
> FromResource from = new FromResource("ARM was here!")
> ToResource to = new ToResource()
> ) {
> to << from
> } finally {
> assert from.closed // should throw MissingPropertyException
> assert to.closed
> assert to.toString() == 'ARM was here!'
> }
> {code}



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


[jira] [Created] (GROOVY-8661) bump gradle to 4.8.1

2018-06-22 Thread Paul King (JIRA)
Paul King created GROOVY-8661:
-

 Summary: bump gradle to 4.8.1
 Key: GROOVY-8661
 URL: https://issues.apache.org/jira/browse/GROOVY-8661
 Project: Groovy
  Issue Type: Dependency upgrade
Reporter: Paul King
Assignee: Paul King






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


[jira] [Commented] (GROOVY-8649) Class loading in Groovy 2.5 breaks class loading hierarchy

2018-06-22 Thread John Wagenleitner (JIRA)


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

John Wagenleitner commented on GROOVY-8649:
---

Just want to clarify that the ASM resolving is used at compilation in order to 
build AST nodes for referenced classes instead of via reflection (and 
classloader) as before. It does not affect runtime where things like object 
equality and security mechanisms come into play.

Sounds like your use case was to prevent compilation by providing a custom 
classloader. Another way to hook into the compilation process would be to 
provide a custom {{ClassNodeResovler}}, [according to the 
docs|http://docs.groovy-lang.org/latest/html/gapi/org/codehaus/groovy/control/ClassNodeResolver.html]
 it is meant to be a "pluggable way to resolve class names".

With 2.5.0 out it's likely too late to undo the default. With the compiler 
option to disable it and with other ways to hook in like a ClassNodeResolver, 
does this address your issue?

> Class loading in Groovy 2.5 breaks class loading hierarchy
> --
>
> Key: GROOVY-8649
> URL: https://issues.apache.org/jira/browse/GROOVY-8649
> Project: Groovy
>  Issue Type: Bug
>  Components: class generator
>Affects Versions: 2.5.0
>Reporter: Alexander Veit
>Priority: Blocker
>
> Prior to Groovy 2.5 GroovyClassLoader passed classes requested by script code 
> like
>  {quote}def obj = new org.example.NonScriptableClass(){quote}
> to its parent class loader (hereby the NonScriptableClasses are Java classes).
> We use this behavior to allow or deny loading of Java classes with the parent 
> class loader based on certain annotations on the respective class.
> With Groovy 2.5 this behavior has changed. org.example.NonScriptableClass is 
> no more passed to the parent class loader. This breaks our security mechanism.



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


[jira] [Assigned] (GROOVY-8660) Unexpected MethodSelectionException with implicit null argument

2018-06-22 Thread Jochen Theodorou (JIRA)


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

Jochen Theodorou reassigned GROOVY-8660:


Assignee: (was: Jochen Theodorou)

> Unexpected MethodSelectionException with implicit null argument
> ---
>
> Key: GROOVY-8660
> URL: https://issues.apache.org/jira/browse/GROOVY-8660
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.0-alpha-2, 2.4.15, 2.5.0
>Reporter: Daniil Ovchinnikov
>Priority: Major
>
> {code:groovy}
> class OnlySingle {
> def foo(a) { "single param: $a" }
> }
> println new OnlySingle().foo()
> // as expected: 'single param: null'
> class OnlyVararg {
> def foo(a, ... b) { "vararg param: $a, $b" }
> }
> println new OnlyVararg().foo()
> // as expected: 'MME: No signature of method: OnlyVararg.foo() is applicable 
> for argument types: () values: []'
> class Both {
> def foo(a) { "single param: $a" }
> def foo(a, ... b) { "vararg param: $a, $b" }
> }
> println new Both().foo()
> // unexpected:
> // MethodSelectionException: Could not find which method foo() to invoke from 
> this list:
> //  public java.lang.Object Both#foo(java.lang.Object)
> //  public transient java.lang.Object Both#foo(java.lang.Object, 
> [Ljava.lang.Object;)
> {code}
> If the exception is expected then {{OnlyVararg}} case should work too.
> If the exception is unexpected then {{Both#foo(Object)}} should be selected.



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


[jira] [Assigned] (GROOVY-8660) Unexpected MethodSelectionException with implicit null argument

2018-06-22 Thread Jochen Theodorou (JIRA)


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

Jochen Theodorou reassigned GROOVY-8660:


Assignee: Jochen Theodorou

> Unexpected MethodSelectionException with implicit null argument
> ---
>
> Key: GROOVY-8660
> URL: https://issues.apache.org/jira/browse/GROOVY-8660
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.0-alpha-2, 2.4.15, 2.5.0
>Reporter: Daniil Ovchinnikov
>Assignee: Jochen Theodorou
>Priority: Major
>
> {code:groovy}
> class OnlySingle {
> def foo(a) { "single param: $a" }
> }
> println new OnlySingle().foo()
> // as expected: 'single param: null'
> class OnlyVararg {
> def foo(a, ... b) { "vararg param: $a, $b" }
> }
> println new OnlyVararg().foo()
> // as expected: 'MME: No signature of method: OnlyVararg.foo() is applicable 
> for argument types: () values: []'
> class Both {
> def foo(a) { "single param: $a" }
> def foo(a, ... b) { "vararg param: $a, $b" }
> }
> println new Both().foo()
> // unexpected:
> // MethodSelectionException: Could not find which method foo() to invoke from 
> this list:
> //  public java.lang.Object Both#foo(java.lang.Object)
> //  public transient java.lang.Object Both#foo(java.lang.Object, 
> [Ljava.lang.Object;)
> {code}
> If the exception is expected then {{OnlyVararg}} case should work too.
> If the exception is unexpected then {{Both#foo(Object)}} should be selected.



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


[jira] [Created] (GROOVY-8660) Unexpected MethodSelectionException with implicit null argument

2018-06-22 Thread Daniil Ovchinnikov (JIRA)
Daniil Ovchinnikov created GROOVY-8660:
--

 Summary: Unexpected MethodSelectionException with implicit null 
argument
 Key: GROOVY-8660
 URL: https://issues.apache.org/jira/browse/GROOVY-8660
 Project: Groovy
  Issue Type: Bug
Affects Versions: 2.5.0, 2.4.15, 3.0.0-alpha-2
Reporter: Daniil Ovchinnikov


{code:groovy}
class OnlySingle {
def foo(a) { "single param: $a" }
}

println new OnlySingle().foo()
// as expected: 'single param: null'


class OnlyVararg {
def foo(a, ... b) { "vararg param: $a, $b" }
}

println new OnlyVararg().foo()
// as expected: 'MME: No signature of method: OnlyVararg.foo() is applicable 
for argument types: () values: []'

class Both {
def foo(a) { "single param: $a" }
def foo(a, ... b) { "vararg param: $a, $b" }
}

println new Both().foo()
// unexpected:
// MethodSelectionException: Could not find which method foo() to invoke from 
this list:
//  public java.lang.Object Both#foo(java.lang.Object)
//  public transient java.lang.Object Both#foo(java.lang.Object, 
[Ljava.lang.Object;)
{code}

If the exception is expected then {{OnlyVararg}} case should work too.
If the exception is unexpected then {{Both#foo(Object)}} should be selected.



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


[jira] [Commented] (GROOVY-8657) Resource variable is accessible from finally block

2018-06-22 Thread Daniil Ovchinnikov (JIRA)


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

Daniil Ovchinnikov commented on GROOVY-8657:


[~daniel_sun] at least it should not be misused in release notes page, if 
cannot be fixed soon

> Resource variable is accessible from finally block
> --
>
> Key: GROOVY-8657
> URL: https://issues.apache.org/jira/browse/GROOVY-8657
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.0-alpha-2
>Reporter: Daniil Ovchinnikov
>Priority: Major
>
> From http://groovy-lang.org/releasenotes/groovy-3.0.html
> {code:groovy}
> try(
> FromResource from = new FromResource("ARM was here!")
> ToResource to = new ToResource()
> ) {
> to << from
> } finally {
> assert from.closed // should throw MissingPropertyException
> assert to.closed
> assert to.toString() == 'ARM was here!'
> }
> {code}



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