[ 
https://issues.apache.org/jira/browse/OAK-2784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcel Reutegger updated OAK-2784:
----------------------------------
    Summary: Remove Nullable annotation in Predicates of BackgroundObserver  
(was: Potential NPEs in BackgroundObserverMBean)

> Remove Nullable annotation in Predicates of BackgroundObserver
> --------------------------------------------------------------
>
>                 Key: OAK-2784
>                 URL: https://issues.apache.org/jira/browse/OAK-2784
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: angela
>            Assignee: Chetan Mehrotra
>              Labels: technical_debt
>             Fix For: 1.3.0
>
>         Attachments: OAK-2784.patch
>
>
> {code}
> @Override
>             public int getLocalEventCount() {
>                 return size(filter(queue, new Predicate<ContentChange>() {
>                     @Override
>                     public boolean apply(@Nullable ContentChange input) {
>                         return input.info != null;
>                     }
>                 }));
>             }
>             @Override
>             public int getExternalEventCount() {
>                 return size(filter(queue, new Predicate<ContentChange>() {
>                     @Override
>                     public boolean apply(@Nullable ContentChange input) {
>                         return input.info == null;
>                     }
>                 }));
>             }
> {code}
> both methods should probably check for {{input}} being null before accessing 
> {{input.info}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to