[ https://issues.apache.org/jira/browse/SLING-7456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler closed SLING-7456. ----------------------------------- > FlushCache in SlingServletResolver can throw an NPE > --------------------------------------------------- > > Key: SLING-7456 > URL: https://issues.apache.org/jira/browse/SLING-7456 > Project: Sling > Issue Type: Bug > Components: Servlets > Affects Versions: Servlets Resolver 2.4.22 > Reporter: Karl Pauls > Assignee: Carsten Ziegeler > Priority: Minor > Fix For: Servlets Resolver 2.4.24 > > > Given that we check for the this.cache being null everytime we reference the > cache we should probably do the same in flushCache. I can't reproduce it but > the NPE looked like this: > {noformat} > java.lang.NullPointerException: null > at > org.apache.sling.servlets.resolver.internal.SlingServletResolver.flushCache(SlingServletResolver.java:1122) > [org.apache.sling.servlets.resolver:2.4.22] > at > org.apache.sling.servlets.resolver.internal.SlingServletResolver.onChange(SlingServletResolver.java:1464) > [org.apache.sling.servlets.resolver:2.4.22] > at > org.apache.sling.resourceresolver.impl.observation.BasicObservationReporter.reportChanges(BasicObservationReporter.java:211) > [org.apache.sling.resourceresolver:1.5.34] > at > org.apache.sling.jcr.resource.internal.JcrResourceListener.onEvent(JcrResourceListener.java:155) > [org.apache.sling.jcr.resource:3.0.8] > at > org.apache.jackrabbit.commons.observation.ListenerTracker$1.onEvent(ListenerTracker.java:190) > [org.apache.jackrabbit.jackrabbit-jcr-commons:2.16.0] > at > org.apache.jackrabbit.oak.jcr.observation.ChangeProcessor.contentChanged(ChangeProcessor.java:508) > [org.apache.jackrabbit.oak-jcr:1.8.1] > at > org.apache.jackrabbit.oak.plugins.observation.FilteringDispatcher.contentChanged(FilteringDispatcher.java:53) > [org.apache.jackrabbit.oak-core:1.8.1] > at > org.apache.jackrabbit.oak.spi.commit.BackgroundObserver$1$1.call(BackgroundObserver.java:128) > [org.apache.jackrabbit.oak-store-spi:1.8.1] > at > org.apache.jackrabbit.oak.spi.commit.BackgroundObserver$1$1.call(BackgroundObserver.java:122) > [org.apache.jackrabbit.oak-store-spi:1.8.1] > at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) > at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) > at java.base/java.lang.Thread.run(Thread.java:844) > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)