groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gillius <...@git.apache.org>
Subject [GitHub] groovy pull request #345: GROOVY-7853: o.c.g.r.t.DefaultTypeTransformation d...
Date Wed, 15 Jun 2016 12:27:19 GMT
Github user gillius commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/345#discussion_r67151385
  
    --- 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 --
    
    Would it be more efficient to put this within an `if(object.getClass().isArray)` block?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message