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

ASF GitHub Bot commented on CLOUDSTACK-8855:
--------------------------------------------

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

    https://github.com/apache/cloudstack/pull/837#discussion_r108469206
  
    --- Diff: server/src/com/cloud/alert/AlertManagerImpl.java ---
    @@ -767,7 +767,9 @@ public void sendAlert(AlertType alertType, long 
dataCenterId, Long podId, Long c
                     // set up a new alert
                     AlertVO newAlert = new AlertVO();
                     newAlert.setType(alertType.getType());
    -                newAlert.setSubject(subject);
    +                //do not have a seperate column for content.
    +                //appending the message to the subject for now.
    +                newAlert.setSubject(subject+content);
    --- End diff --
    
    I agree with you regarding the time of contributor. I also find it great 
that you documented this and opened a Jira ticket. However, for this specific 
case, I am really not comfortable with the change as it is. As I said before, 
the code at line 772 is opening the gates for unexpected runtime exceptions 
(A.K.A. bugs). If others are willing to take the risk of merging and then later 
dealing with the consequences, I cannot do anything against it. I am only 
pointing at the problem and making it quite clear what I think.
    
    I really do not see any trouble to do things the right way here. It is only 
a matter of creating an alter table SQL that adds a field to a table. Then, you 
have to create this new field in `AlertVO`, and use it; as simple as that. 



> Improve Error Message for Host Alert State
> ------------------------------------------
>
>                 Key: CLOUDSTACK-8855
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8855
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.6.0
>            Reporter: Bharat Kumar
>            Assignee: Bharat Kumar
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to