You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2015/04/21 11:58:58 UTC

[jira] [Updated] (OAK-2784) Remove Nullable annotation in Predicates of BackgroundObserver

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