groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-8144) Invoking a public method declared in a non-public class result in a IllegalAccessError
Date Sat, 15 Apr 2017 15:07:41 GMT

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

ASF GitHub Bot commented on GROOVY-8144:
----------------------------------------

Github user asfgit closed the pull request at:

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


> Invoking a public method declared in a non-public class result in a IllegalAccessError
> --------------------------------------------------------------------------------------
>
>                 Key: GROOVY-8144
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8144
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static compilation
>    Affects Versions: 2.5.0-alpha-1
>            Reporter: paolo di tommaso
>
> For example:
> {code}
> import groovyx.gpars.agent.Agent
> import groovy.transform.CompileStatic
> @CompileStatic
> class Dummy {
>   def void foo() {
>      def x = new Agent<List>( [] )
>      x.send { List it -> it.add(1) }
>      x.await()
>   }
> }
> new Dummy().foo()
> java.lang.IllegalAccessError: tried to access class groovyx.gpars.agent.AgentBase from
class Dummy
>     at Dummy.foo(ConsoleScript15:10)
>     at Dummy$foo.call(Unknown Source)
>     at ConsoleScript15.run(ConsoleScript15:16)
> {code}
> I guess the problem is that AgentBase class is not declared public
> https://github.com/GPars/GPars/blob/master/src/main/groovy/groovyx/gpars/agent/AgentBase.java#L34
> This is a regression, see also this thread https://groups.google.com/d/msg/groovy-user/0Ig9mhRLnKk/LWsx1EQbu_4J



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message