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

    https://github.com/apache/storm/pull/1699#discussion_r79851428
  
    --- Diff: 
storm-core/src/jvm/org/apache/storm/daemon/supervisor/timer/SupervisorHeartbeat.java
 ---
    @@ -72,10 +72,10 @@ private SupervisorInfo buildSupervisorInfo(Map<String, 
Object> conf, Supervisor
     
         private Map<String, Double> mkSupervisorCapacities(Map conf) {
             Map<String, Double> ret = new HashMap<String, Double>();
    -        Double mem = (double) 
(conf.get(Config.SUPERVISOR_MEMORY_CAPACITY_MB));
    -        ret.put(Config.SUPERVISOR_MEMORY_CAPACITY_MB, mem);
    -        Double cpu = (double) (conf.get(Config.SUPERVISOR_CPU_CAPACITY));
    -        ret.put(Config.SUPERVISOR_CPU_CAPACITY, cpu);
    +        Number mem = (Number) 
(conf.get(Config.SUPERVISOR_MEMORY_CAPACITY_MB));
    +        ret.put(Config.SUPERVISOR_MEMORY_CAPACITY_MB, mem.doubleValue());
    +        Number cpu = (Number) (conf.get(Config.SUPERVISOR_CPU_CAPACITY));
    --- End diff --
    
    Possibility of NPE here. Can we use utils method to do this.


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