[jira] [Created] (GROOVY-8905) MissingMethodException when private method is called on parent class in a closure

2018-11-27 Thread Caleb Ott (JIRA)
Caleb Ott created GROOVY-8905:
-

 Summary: MissingMethodException when private method is called on 
parent class in a closure
 Key: GROOVY-8905
 URL: https://issues.apache.org/jira/browse/GROOVY-8905
 Project: Groovy
  Issue Type: Bug
  Components: class generator
Affects Versions: 2.5.4, 3.0.0-alpha-3, 2.6.0-alpha-4
Reporter: Caleb Ott


This appears to be a bug since a MissingMethodException is being thrown when it 
shouldn't be.

Here is the simplified code to reproduce the issue. I've tested on 
2.5.4/2.6.0-alpha-4/3.0.0-alpha-3.
{code:java}
class Parent {
 protected void doSomethingParent() {
 // calling it outside of the closure works fine
 theSomething(1_000, 'This works')

 // setup a closure that calls another private method in the parent
 Closure closure = { int num ->
 // calling it inside the closure breaks
 theSomething(num, 'this breaks')
 }

 closure(10)
 }

 // only breaks because it is "private"
 private void theSomething(int num, String someValue) {
 println "${num} = ${someValue}"
 }
}

class Child extends Parent {
 void doSomethingChild() {
 // just calls the parent method
 doSomethingParent()
 }
}

// run the test
def test = new Child()
test.doSomethingChild()

{code}
Output:
{noformat}
1000 = This works
Caught: groovy.lang.MissingMethodException: No signature of method: 
Child.theSomething() is applicable for argument types: (Integer, String) 
values: [10, this breaks]
groovy.lang.MissingMethodException: No signature of method: 
Child.theSomething() is applicable for argument types: (Integer, String) 
values: [10, this breaks]
 at Parent$_doSomethingParent_closure1.doCall(ScratchPad.groovy:10)
 at Parent.doSomethingParent(ScratchPad.groovy:13)
 at Child.doSomethingChild(ScratchPad.groovy:25)
 at Child$doSomethingChild.call(Unknown Source)
 at ScratchPad.run(ScratchPad.groovy:31){noformat}
 

 



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


[jira] [Resolved] (GROOVY-8904) Bump junit to 5.3.2 and bump junit platform to 1.3.2

2018-11-27 Thread Daniel Sun (JIRA)


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

Daniel Sun resolved GROOVY-8904.

   Resolution: Fixed
Fix Version/s: 2.5.5

Fixed by 
https://github.com/apache/groovy/commit/0ac61d6a598894148cc36dcae7586b6c47373c1a

> Bump junit to 5.3.2 and bump junit platform to 1.3.2
> 
>
> Key: GROOVY-8904
> URL: https://issues.apache.org/jira/browse/GROOVY-8904
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-alpha-4, 2.5.5
>
>




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


[jira] [Created] (GROOVY-8904) Bump junit to 5.3.2 and bump junit platform to 1.3.2

2018-11-27 Thread Daniel Sun (JIRA)
Daniel Sun created GROOVY-8904:
--

 Summary: Bump junit to 5.3.2 and bump junit platform to 1.3.2
 Key: GROOVY-8904
 URL: https://issues.apache.org/jira/browse/GROOVY-8904
 Project: Groovy
  Issue Type: Dependency upgrade
Reporter: Daniel Sun
Assignee: Daniel Sun
 Fix For: 3.0.0-alpha-4






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


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

2018-11-27 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on GROOVY-8903:


GitHub user paulk-asert opened a pull request:

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

GROOVY-8903: Retrofit NamedParams to groovy.sql.Sql



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

$ git pull https://github.com/paulk-asert/groovy groovy8903

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

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

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

This closes #833


commit fa8fa52edd515047dee367d3605870ad299bf279
Author: Paul King 
Date:   2018-11-27T09:20:37Z

GROOVY-8903: Retrofit NamedParams to groovy.sql.Sql




> 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
>




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


[GitHub] groovy pull request #833: GROOVY-8903: Retrofit NamedParams to groovy.sql.Sq...

2018-11-27 Thread paulk-asert
GitHub user paulk-asert opened a pull request:

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

GROOVY-8903: Retrofit NamedParams to groovy.sql.Sql



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

$ git pull https://github.com/paulk-asert/groovy groovy8903

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

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

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

This closes #833


commit fa8fa52edd515047dee367d3605870ad299bf279
Author: Paul King 
Date:   2018-11-27T09:20:37Z

GROOVY-8903: Retrofit NamedParams to groovy.sql.Sql




---