Author: justin Date: Fri Jan 24 15:52:53 2014 New Revision: 1561044 URL: http://svn.apache.org/r1561044 Log: SLING-3339 - moving event.getUserID() check to inside else block for isExternal()
Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java?rev=1561044&r1=1561043&r2=1561044&view=diff ============================================================================== --- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java (original) +++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java Fri Jan 24 15:52:53 2014 @@ -296,11 +296,14 @@ public class JcrResourceListener impleme final ChangedAttributes changedAttributes) { final Dictionary<String, Object> properties = new Hashtable<String, Object>(); - if ( event.getUserID() != null ) { - properties.put(SlingConstants.PROPERTY_USERID, event.getUserID()); - } + if (this.isExternal(event)) { properties.put("event.application", "unknown"); + } else { + final String userID = event.getUserID(); + if (userID != null) { + properties.put(SlingConstants.PROPERTY_USERID, userID); + } } if (changedAttributes != null) { changedAttributes.addProperties(properties);