You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2013/08/16 10:12:47 UTC

[jira] [Commented] (SLING-3020) Immutable HealthCheck Results

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

Carsten Ziegeler commented on SLING-3020:
-----------------------------------------

I think it would make sense to "lock" the ResultLog instance once it's added to the Result - so the returned object is really immutable
                
> Immutable HealthCheck Results
> -----------------------------
>
>                 Key: SLING-3020
>                 URL: https://issues.apache.org/jira/browse/SLING-3020
>             Project: Sling
>          Issue Type: Improvement
>          Components: Health Check
>            Reporter: Bertrand Delacretaz
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>
> As discussed on list, I'll change the Result class to be immutable and allow for both single-value and log-based results:
> Result is immutable.
> Result has two constructors, one that takes a Status and a message String and one that takes a ResultLog, and sets the Result status to ResultLog.getStatus().
> The ResultLog is a list of messages, each with a Status and a message String. It's getStatus() method returns the highest Status that was added to it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira