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

    https://github.com/apache/cloudstack/pull/1503#discussion_r61726860
  
    --- Diff: server/src/com/cloud/api/ApiServer.java ---
    @@ -264,10 +266,11 @@ public void handleAsyncJobPublishEvent(String 
subject, String senderAddress, Obj
             String info = job.getCmdInfo();
             String cmdEventType = "unknown";
             if (info != null) {
    -            String marker = "\"cmdEventType\"";
    -            int begin = info.indexOf(marker);
    -            if (begin >= 0) {
    -                cmdEventType = info.substring(begin + marker.length() + 2, 
info.indexOf(",", begin) - 1);
    +            Type type = new TypeToken<Map<String, Object>>(){}.getType();
    +            Map<String, Object> cmdInfo = 
ApiGsonHelper.getBuilder().create().fromJson(info, type);
    --- End diff --
    
    @alexandrelimassantana You're right, it was unnecessary. I've updated the 
pull request accordingly.


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

Reply via email to