From notifications-return-18361-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Tue Oct 8 08:33:03 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 43EFF180658 for ; Tue, 8 Oct 2019 10:33:03 +0200 (CEST) Received: (qmail 62858 invoked by uid 500); 8 Oct 2019 08:33:02 -0000 Mailing-List: contact notifications-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list notifications@groovy.apache.org Received: (qmail 62808 invoked by uid 99); 8 Oct 2019 08:33:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Oct 2019 08:33:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 64598E3124 for ; Tue, 8 Oct 2019 08:33:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 486D478074C for ; Tue, 8 Oct 2019 08:33:00 +0000 (UTC) Date: Tue, 8 Oct 2019 08:33:00 +0000 (UTC) From: "A. Lepe (Jira)" To: notifications@groovy.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GROOVY-9268) Access to ... is forbidden MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GROOVY-9268?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D169= 46616#comment-16946616 ]=20 A. Lepe commented on GROOVY-9268: --------------------------------- Thank you. Is there any nightly build that can be tested? I will report bac= k here=C2=A0once a new release fixes it. > Access to ... is forbidden > --------------------------- > > Key: GROOVY-9268 > URL: https://issues.apache.org/jira/browse/GROOVY-9268 > Project: Groovy > Issue Type: Bug > Affects Versions: 2.5.8 > Reporter: A. Lepe > Priority: Critical > > I don't have a working code to reproduce the error except for the product= ion code. I try my best to extract the main parts to be analyzed.=C2=A0 > Updating from 2.5.6 to 2.5.8 triggers this issue (I didn't tried 2.5.7 as= it has a bug that affects my project). > The error I'm getting is:=C2=A0 > =C2=A0 > {code:java} > Access to com.example.MyClass$MyLib$Output#output is forbidden @ line #, = column #{code} > Pointing to: > =C2=A0 > {code:java} > results << result.array.getInt(it * Native.getNativeSize(Integer.TYPE)) > ^{code} > This is the code: > =C2=A0 > {code:java} > @CompileStatic > class MyClass { > List getResult(String input) { > List results =3D [] > MyLib.Output output =3D MyLib.instance.getOutputList(input) > if(output.results) { > (0..output.results).each { > results << result.array.getInt(it * Native.getNativeSize(= Integer.TYPE)) > } > } > return results > } > interface MyLib extends Library { > static MyLib instance =3D Native.load("mylibrary", MyLib.class) > static class Output extends Structure { > public int results > public Pointer array > Output() { > super() > } > protected List getFieldOrder() { > return ["results", "array"] > } > static class ByReference extends Output implements Structure.= ByReference {} > static class ByValue extends Output implements Structure.ByVa= lue {} > } > // Method in C library > Ouput getOutputList(String input) > } > } > {code} > =C2=A0I changed the name of methods to make it easier to follow.=C2=A0 > =C2=A0I believe it might be related to GROOVY-9043, which was fixed in 2.= 5.7. > It might be the same bug as GROOVY-9252 > =C2=A0 > =C2=A0 -- This message was sent by Atlassian Jira (v8.3.4#803005)