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

    https://github.com/apache/storm/pull/2113#discussion_r120436933
  
    --- Diff: storm-client/src/jvm/org/apache/storm/scheduler/WorkerSlot.java 
---
    @@ -20,23 +20,12 @@
     public class WorkerSlot {
         private String nodeId;
         private int port;
    -    // amount of on-heap memory allocated to it
    -    private double memOnHeap = 0.0;
    -    // amount of off-heap memory allocated to it
    -    private double memOffHeap = 0.0;
    -    // amount of cpu allocated to it
    -    private double cpu = 0.0;
    -    
    -    public WorkerSlot(String nodeId, Number port) {
    -        this(nodeId, port, 0.0, 0.0, 0.0);
    -    }
     
    -    public WorkerSlot(String nodeId, Number port, double memOnHeap, double 
memOffHeap, double cpu) {
    +    public WorkerSlot(String nodeId, Number port) {
    +        if (port == null) throw new NullPointerException("port cannot be 
null");
    --- End diff --
    
    I think checkstyle will complain about this due to missing braces. Maybe 
you can use 
http://google.github.io/guava/releases/snapshot/api/docs/com/google/common/base/Preconditions.html#checkNotNull(T)
 instead?


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