n my Java
application is OK Now.
Chers, Mickael.
*From:* Jochen Theodorou
*Sent:* Thursday, February 27, 2020 16:39
*To:* Mickaël SALMON
*Subject:* Re: please help : GroovyCastException: why ?
Am 27.02.20 um 16:16 sch
, February 27, 2020 16:39
To: Mickaël SALMON
Subject: Re: please help : GroovyCastException: why ?
Am 27.02.20 um 16:16 schrieb Mickaël SALMON:
> Okay.
>
> In fact, I don't understand which this code works in Java but not in
> Groovy (even if naming a variable with a class name, not i
s case, without refactoring existing scripts
?
Cheers, Mickael.
From: Paul King
Sent: Tuesday, February 25, 2020 11:57
To: users@groovy.apache.org
Subject: Re: please help : GroovyCastException: why ?
It is still a bit hard to let you know the best way to proceed from just the
samp
> *Sent:* Tuesday, February 25, 2020 11:16
> *To:* users@groovy.apache.org
> *Subject:* Re: please help : GroovyCastException: why ?
>
> If the user scripts are already existing, which version of Groovy were
> they targeting? I've seen this behavior (of treating identifiers starting
User scripts were coded Beanshell, I try to migrate to Groovy ...
From: Alessio Stalla
Sent: Tuesday, February 25, 2020 11:16
To: users@groovy.apache.org
Subject: Re: please help : GroovyCastException: why ?
If the user scripts are already existing, which
refactoring.
>
> How can I deal with it ?
> --
> *From:* MG
> *Sent:* Monday, February 24, 2020 23:30
> *To:* users@groovy.apache.org ; Mickaël SALMON <
> m...@sylob.com>
> *Subject:* Re: please help : GroovyCastException: why ?
>
> Article articleTmp = (A
_
From: MG
Sent: Monday, February 24, 2020 23:30
To: users@groovy.apache.org ; Mickaël SALMON
Subject: Re: please help : GroovyCastException: why ?
Article articleTmp = (Article) Article;
in Groovy is the same as
Article articleTmp = (Article) Article.getClass();
in Java.
Article.ge
Article articleTmp = (Article) Article;
in Groovy is the same as
Article articleTmp = (Article) Article.getClass();
in Java.
Article.getClass()
is of type Class, so casting it to Article will fail - what you
want to do ist pass an Article instance, not the class, I presume...
hth,
mg
On