brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-271) ConfigKey card shows object hashCode of default values
Date Sat, 28 May 2016 14:24:12 GMT

    [ https://issues.apache.org/jira/browse/BROOKLYN-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15305415#comment-15305415
] 

ASF GitHub Bot commented on BROOKLYN-271:
-----------------------------------------

Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/146#discussion_r64989514
  
    --- Diff: core/src/main/java/org/apache/brooklyn/entity/group/zoneaware/ProportionalZoneFailureDetector.java
---
    @@ -56,4 +56,10 @@ protected boolean doHasFailed(Location loc, ZoneHistory zoneHistory)
{
                 return numDatapoints >= minDatapoints && proportionFailure >=
maxProportionFailures;
             }
         }
    +
    +    @Override
    +    public String toString(){
    +        return getClass().getName();
    --- End diff --
    
    I'd go for the code below (using `com.google.common.base.Objects`):
    
        @Override
        public String toString() {
            return Objects.toStringHelper(this)
                    .add("minDatapoints", minDatapoints)
                    .add("timeToConsider",  timeToConsider)
                    .add("maxProportionFailures", maxProportionFailures)
            .toString();
        }



> ConfigKey card shows object hashCode of default values
> ------------------------------------------------------
>
>                 Key: BROOKLYN-271
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-271
>             Project: Brooklyn
>          Issue Type: Documentation
>            Reporter: Jose Carrasco
>            Priority: Minor
>
> ConfigKey cards of Entities show the object references in Brooklyn Catalog when a default
value is a object. Take a look to the following screenshot:
> !https://www.dropbox.com/s/rav70zzleyhnd4q/objectId.png?dl=1!
> As you can see the default value is composed by: 
> {code}
>     getClass().getName() + '@' + Integer.toHexString(hashCode())
> {code}
> Probably just class name should be shown here. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message