Github user paulk-asert commented on a diff in the pull request: https://github.com/apache/groovy/pull/345#discussion_r67152793 --- Diff: src/main/org/codehaus/groovy/runtime/typehandling/ShortTypeHandling.java --- @@ -41,7 +43,15 @@ public static Class castToClass(Object object) { public static String castToString(Object object) { if (object==null) return null; - if (object instanceof Class) return (String) object; + if (object instanceof boolean[]) return Arrays.toString((boolean[])object); --- End diff -- Good catch. Yes, that's probably a good optimization. Thanks for the suggestion. On Wed, Jun 15, 2016 at 10:27 PM, Jason Winnebeck <notificati...@github.com> wrote: > In > src/main/org/codehaus/groovy/runtime/typehandling/ShortTypeHandling.java > <https://github.com/apache/groovy/pull/345#discussion_r67151385>: > > > @@ -41,7 +43,15 @@ public static Class castToClass(Object object) { > > > > public static String castToString(Object object) { > > if (object==null) return null; > > - if (object instanceof Class) return (String) object; > > + if (object instanceof boolean[]) return Arrays.toString((boolean[])object); > > Would it be more efficient to put this within an > if(object.getClass().isArray) block? > > â > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/apache/groovy/pull/345/files/5c914153d3c97708d10cf210cf62989e51008368#r67151385>, > or mute the thread > <https://github.com/notifications/unsubscribe/AARF0Pnh0PV29an3T3l9GqZFHA3iJZtvks5qL--pgaJpZM4ItMJP> > . >
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---