brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Deploy across an entire web clust...
Date Tue, 29 Jul 2014 11:18:23 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/83#discussion_r15517371
  
    --- Diff: core/src/main/java/brooklyn/util/task/BasicTask.java ---
    @@ -144,10 +142,12 @@ public boolean equals(Object obj) {
         }
     
         @Override
    -    public String toString() { 
    -        return "Task["+(displayName!=null && displayName.length()>0?displayName+
    -                (tags!=null && !tags.isEmpty()?"":";")+" ":"")+
    -                (tags!=null && !tags.isEmpty()?tags+"; ":"")+getId()+"]";
    +    public String toString() {
    +        // give display name plus id, or job and tags plus id; some jobs have been extended
to include nice tostrings 
    +        return "Task["+(Strings.isNonEmpty(displayName) ? displayName : 
    +                job + 
    --- End diff --
    
    Would be good to put more brackets around it so it's obvious at first glance about whether
the `+` after job is only in the else case (which I believe it is).
    The previous toString impl this replaces was particularly bad for finding where the `:`
was!


---
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