jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1354878 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventImpl.java
Date Thu, 28 Jun 2012 09:22:20 GMT
Author: reschke
Date: Thu Jun 28 09:22:19 2012
New Revision: 1354878

URL: http://svn.apache.org/viewvc?rev=1354878&view=rev
Log:
OAK-144: do not return null for getInfo

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventImpl.java?rev=1354878&r1=1354877&r2=1354878&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventImpl.java
Thu Jun 28 09:22:19 2012
@@ -16,6 +16,8 @@
  */
 package org.apache.jackrabbit.oak.jcr.observation;
 
+import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.jcr.RepositoryException;
@@ -29,13 +31,14 @@ public class EventImpl implements Event 
     private final String identifier;
     private final Map<?, ?> info;
     private final long date;
+    private static Map<?, ?> EMPTY_INFO = Collections.unmodifiableMap(new HashMap<Object,
Object>());
 
     public EventImpl(int type, String path, String userID, String identifier, Map<?, ?>
info, long date) {
         this.type = type;
         this.path = path;
         this.userID = userID;
         this.identifier = identifier;
-        this.info = info;
+        this.info = info != null ? info : EMPTY_INFO;
         this.date = date;
     }
 



Mime
View raw message