I updated PR #345 as per your comments (I believe). Let me know if it
looks okay. I did require changing one swing test that was relying on
the old toString behavior. It would be nice if Andres could comment if
such a change could impact Griffon.
On Sat, Jun 18, 2016 at 6:04 PM, Jochen Theodorou
On 15.06.2016 14:36, Winnebeck, Jason wrote:
OK, I see the PR. I would be interested to hear Jochen's comments because the
way the class is documented it looks like that class is meant to be called in
situations with constrained conditions.
yes
I mean, doesn't the normal String cast in Groo
hortTypeHandling calls when it should be reverting to the full asType instead.
Jason
-Original Message-
From: Paul King [mailto:pa...@asert.com.au]
Sent: Wednesday, June 15, 2016 12:32 AM
To: users@groovy.apache.org
Subject: Re: ShortTypeHandling castToString
Yes, it's clearly a bug a
Yes, it's clearly a bug as can be seen by running an example such as below:
String foo() { Integer }
foo() // ClassCastException
Whereas 'Integer as String' works fine. I have a fix for this in
PR#345 as part of GROOVY-7853, see:
https://github.com/apache/groovy/pull/345
Just waiting for to see
I came across this method in Groovy 2.4.6 in ShortTypeHandling class, I've
never seen it fail but it doesn't see right to me:
public static String castToString(Object object) {
if (object==null) return null;
if (object instanceof Class) return (String) object;
return object.toString()