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

    https://github.com/apache/storm/pull/2090#discussion_r118845758
  
    --- Diff: 
storm-client/src/jvm/org/apache/storm/windowing/TimeEvictionPolicy.java ---
    @@ -54,7 +62,22 @@ public void track(Event<T> event) {
     
         @Override
         public void setContext(EvictionContext context) {
    -        this.evictionContext = context;
    +        EvictionContext prevContext = evictionContext;
    +        evictionContext = context;
    +        // compute window length adjustment (delta) to account for time 
drift
    +        if (context != null && context.getSlidingInterval() != null) {
    --- End diff --
    
    Nitpick: I'd rather not check for null unless there's a good reason. As far 
as I can tell there's no reason to reset the EvictionContext to null, so I'd 
rather we get an NPE if it happens unexpectedly, so we can fix what is likely a 
bug.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to