You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/06/15 02:35:00 UTC
[jira] [Commented] (GROOVY-8614) Invalid reference generated in
InnerClasses attribute for nested interface
[ https://issues.apache.org/jira/browse/GROOVY-8614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16513249#comment-16513249 ]
ASF GitHub Bot commented on GROOVY-8614:
----------------------------------------
GitHub user jwagenleitner opened a pull request:
https://github.com/apache/groovy/pull/756
GROOVY-8614: Invalid reference generated in InnerClasses attribute fo…
…r nested interface
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jwagenleitner/groovy 8614-invalid-inner-nested-interface
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/groovy/pull/756.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #756
----
commit 97c9d108de7197dcdc1aa55a8fc9af18a8880e17
Author: John Wagenleitner <jw...@...>
Date: 2018-06-15T02:31:59Z
GROOVY-8614: Invalid reference generated in InnerClasses attribute for nested interface
----
> Invalid reference generated in InnerClasses attribute for nested interface
> --------------------------------------------------------------------------
>
> Key: GROOVY-8614
> URL: https://issues.apache.org/jira/browse/GROOVY-8614
> Project: Groovy
> Issue Type: Bug
> Components: class generator
> Affects Versions: 2.4.15
> Reporter: Tony Abbott
> Priority: Minor
>
> Compiling a class with a nested interface results in a reference to a non-existent inner class "X$Y$1" in the InnerClasses attribute of the resultant class file. Nested classes and inner classes do not exhibit this problem, only nested interfaces.
> Sample class that demonstrates the problem:
> {code:java}
> class X {
> interface Y {}
> }
> {code}
> Examining the resultant class file:
> {noformat}
> $ javap -v -cp . X.class
> ...
> SourceFile: "X.groovy"
> InnerClasses:
> public #139= #138 of #2; //Y=class X$Y of class X
> static #142= #141 of #2; //1=class X$Y$1 of class X
> {noformat}
> There is a reference to "X$Y$1" which does not exist. This breaks some tools, for example JUnit 5 test discovery.
>
> It looks to me like this is related to https://issues.apache.org/jira/browse/GROOVY-5082, being the same bug just manifesting for nested interfaces.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)