[ https://issues.apache.org/jira/browse/OAK-8948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcel Reutegger updated OAK-8948: ---------------------------------- Component/s: (was: jackrabbit-api) jcr > PathUtils. unifyInExcludes throws NPE when 'exclude' is null > ------------------------------------------------------------ > > Key: OAK-8948 > URL: https://issues.apache.org/jira/browse/OAK-8948 > Project: Jackrabbit Oak > Issue Type: Bug > Components: jcr > Affects Versions: 1.8.17, 1.8.20 > Reporter: rafiya sirin > Assignee: Marcel Reutegger > Priority: Minor > Labels: Observation > Fix For: 1.8.21 > > Attachments: OAK-8948.patch, Screen Shot 2020-03-13 at 2.25.07 > PM.png, stacktrace.txt > > > While registering a resource change listener, we encountered the following > exception : > > {code:java} > 05.03.2020 23:39:00.728 *ERROR* [FelixDispatchQueue] > org.apache.sling.resourceresolver FrameworkEvent ERROR > (java.lang.NullPointerException) > java.lang.NullPointerException: null > at > org.apache.jackrabbit.oak.commons.PathUtils.unifyInExcludes(PathUtils.java:501) > [org.apache.jackrabbit.oak-commons:1.8.17] > at > org.apache.jackrabbit.oak.jcr.observation.ObservationManagerImpl.addEventListener(ObservationManagerImpl.java:240) > [org.apache.jackrabbit.oak-jcr:1.8.17] > at > org.apache.sling.jcr.resource.internal.JcrListenerBaseConfig.register(JcrListenerBaseConfig.java:136) > [org.apache.sling.jcr.resource:3.0.16.1] > {code} > > On further debugging, we found that issues lies in this snippet : > {code:java} > if (exclude.equals(include) || isAncestor(exclude, include)) { > includesRemoved.add(include);{code} > 'exclude' can be null if the getOakPath() method returns a null. This NPE > causes listeners(ResourceChangeListener in our case) to fail at registration. -- This message was sent by Atlassian Jira (v8.3.4#803005)