This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.event.dea-1.0.4
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event-dea.git

commit 8577a8255273e4b6728e07db86f14aa21c3855b5
Author: Stefan Egli <[email protected]>
AuthorDate: Tue Sep 22 16:20:39 2015 +0000

    SLING-5052 : avoid NPE when resource no longer exists
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/dea@1704664 
13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sling/event/dea/impl/DistributedEventSender.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java 
b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
index 8bc982f..1cf81ec 100644
--- a/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
+++ b/src/main/java/org/apache/sling/event/dea/impl/DistributedEventSender.java
@@ -192,7 +192,9 @@ public class DistributedEventSender
                 try {
                     resolver = 
this.resourceResolverFactory.getAdministrativeResourceResolver(null);
                     final Resource eventResource = resolver.getResource(path);
-                    if ( 
DistributedEventAdminImpl.RESOURCE_TYPE_EVENT.equals(eventResource.getResourceType()))
 {
+                    if (eventResource == null) {
+                        this.logger.warn("runInBackground : resource not found 
at "+path);
+                    } else if ( 
DistributedEventAdminImpl.RESOURCE_TYPE_EVENT.equals(eventResource.getResourceType()))
 {
                         final Event e = this.readEvent(eventResource);
                         if ( e != null ) {
                             // we check event admin as processing is async

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to