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

Dave Beech commented on CRUNCH-142:
-----------------------------------

Thanks for the clarification about initialize / cleanup. 

I think a call to cleanup should be added, if only to guard against the 
inevitable case where somebody decides to do something "clever", overrides 
FilterFn's cleanup method, and wonders why it isn't being called! Either that 
or make cleanup on FilterFn final to enforce the contract, but I don't like 
this as much. What do you think?
                
> Context not being passed to FilterFn instances wrapped in boolean 
> AndFn,OrFn,NotFn
> ----------------------------------------------------------------------------------
>
>                 Key: CRUNCH-142
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-142
>             Project: Crunch
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.4.0
>            Reporter: Dave Beech
>         Attachments: CRUNCH-142_1.patch, CRUNCH-142_2.patch, CRUNCH-142.patch
>
>
> The boolean filter classes AndFn, OrFn and NotFn delegate calls to FilterFn 
> instances internally, but setContext is not called on these first. 
> As a result, methods which need the context such as getCounter() fail with 
> NullPointerException. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to