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 "angela (JIRA)" <ji...@apache.org> on 2015/04/17 09:50:58 UTC
[jira] [Updated] (OAK-2784) Potential NPEs in
BackgroundObserverMBean
[ https://issues.apache.org/jira/browse/OAK-2784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
angela updated OAK-2784:
------------------------
Labels: technical_debt (was: )
> Potential NPEs in BackgroundObserverMBean
> -----------------------------------------
>
> Key: OAK-2784
> URL: https://issues.apache.org/jira/browse/OAK-2784
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Reporter: angela
> Labels: technical_debt
>
> {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)