Re: do I miss something here, or is this a Groovy bug?

2020-06-05 Thread Jochen Theodorou
On 05.06.20 13:33, OCsite wrote: And another thing which I don't understand and seems highly suspicious — do I just miss something of importance, or is it a bug? === 127 ocs*/tmp>* * /usr/local/groovy-3.0.4/bin/groovy q Caught: java.lang.VerifyError: Bad type on operand stack every

Re: do I miss something here, or is this a Groovy bug?

2020-06-05 Thread OCsite
Paul, > On 5 Jun 2020, at 15:11, Paul King wrote: > We should never throw a VerifyError, so that is a bug. OK, I'll create an issue for that, or will you? (I guess you'd be able to describe it much better than me.) > But you probably don't want to use "this" in a static context. You probably

Re: do I miss something here, or is this a Groovy bug?

2020-06-05 Thread Paul King
You can make _objects protected to overcome the MPE or use a local variable, e.g.: def localVar = _objects 1.times { localVar << it } Cheers, Paul. On Thu, May 28, 2020 at 7:42 AM o...@ocs.cz wrote: > 484 ocs /tmp> class q { > static main(av) { > new Foo().test() > }

Re: do I miss something here, or is this a Groovy bug?

2020-06-05 Thread Paul King
We should never throw a VerifyError, so that is a bug. But you probably don't want to use "this" in a static context. You probably just want $q.metaClass or ${getMetaClass()}. Cheers, Paul. On Fri, Jun 5, 2020 at 9:33 PM OCsite wrote: > And another thing which I don't understand and seems

how to determine whether a method was compiled or runtime-added?

2020-06-05 Thread OCsite
The reason I am playing now with metaclass is that I would need to check for a given method whether it exists (that's easy), and if it does, whether it's an originally compiled one or one added dynamically at runtime. What's the best (most robust and reliable) way to do that? So far I haven't

Re: do I miss something here, or is this a Groovy bug?

2020-06-05 Thread OCsite
And another thing which I don't understand and seems highly suspicious — do I just miss something of importance, or is it a bug? === 127 ocs /tmp> /usr/local/groovy-3.0.4/bin/groovy q Caught: java.lang.VerifyError: Bad type on operand stack Exception Details: Location:

RE: GroovySunClassLoader and SunClassLoader appear to be broken

2020-06-05 Thread harada.tomokazu....@jp.nssol.nipponsteel.com
Dear Jochen, >this means you want the Groovy program to access the private method a >Java class, right? Yes, I intend that. >Does MagicAccessorImpl prevent access checks? It does prevent bytecode >verification, which allows us to load the generated class faster. Yes, according to the javadoc