You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by shils <gi...@git.apache.org> on 2016/02/10 00:01:19 UTC

[GitHub] groovy pull request: GROOVY-7312 Add ACC_STATIC flag to inner clas...

GitHub user shils opened a pull request:

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

    GROOVY-7312 Add ACC_STATIC flag to inner classes of interfaces

    

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

    $ git pull https://github.com/shils/groovy GROOVY-7312

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

    https://github.com/apache/groovy/pull/257.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 #257
    
----
commit 0012b17aa72e7f4ee6acaef93ea59d74c9559fc1
Author: Shil Sinha <sh...@gmail.com>
Date:   2016-02-09T23:00:16Z

    GROOVY-7312 Add ACC_STATIC flag to inner classes of interfaces

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] groovy pull request: GROOVY-7312 Add ACC_STATIC flag to inner clas...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] groovy pull request: GROOVY-7312 Add ACC_STATIC flag to inner clas...

Posted by shils <gi...@git.apache.org>.
Github user shils commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/257#discussion_r52389570
  
    --- Diff: src/main/org/codehaus/groovy/classgen/asm/ClosureWriter.java ---
    @@ -80,7 +80,11 @@ public void writeClosure(ClosureExpression expression) {
     
             // generate closure as public class to make sure it can be properly invoked by classes of the
             // Groovy runtime without circumventing JVM access checks (see CachedMethod for example).
    -        ClassNode closureClass = getOrAddClosureClass(expression, ACC_PUBLIC);
    +        int mods = ACC_PUBLIC;
    +        if (classNode.isInterface()) {
    --- End diff --
    
    Classes for closures defined in static methods could (should?) also be flagged as static, but I left that case as is since it wasn't mentioned in GROOVY-7312.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---