jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1492232 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation: ChangeProcessor.java EventImpl.java
Date Wed, 12 Jun 2013 14:51:38 GMT
Author: mduerig
Date: Wed Jun 12 14:51:37 2013
New Revision: 1492232

URL: http://svn.apache.org/r1492232
Log:
OAK-144 Implement Observation
log event along with warning messages about deprecated usages

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java?rev=1492232&r1=1492231&r2=1492232&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
Wed Jun 12 14:51:37 2013
@@ -148,40 +148,40 @@ class ChangeProcessor implements Runnabl
         }
     }
 
-    synchronized void userInfoAccessedWithoutExternalCheck() {
+    synchronized void userInfoAccessedWithoutExternalCheck(Event event) {
         if (!userInfoAccessedWithoutExternalsCheck) {
             log.warn(DEPRECATED,
                     "Event listener " + listener + " is trying to access"
                     + " event user information without checking for whether"
-                    + " the event is external");
+                    + " the event is external on " + event);
             userInfoAccessedWithoutExternalsCheck = true;
         }
     }
 
-    synchronized void userInfoAccessedFromExternalEvent() {
+    synchronized void userInfoAccessedFromExternalEvent(Event event) {
         if (!userInfoAccessedFromExternalEvent) {
             log.warn(DEPRECATED,
                     "Event listener " + listener + " is trying to access"
-                    + " event user information from an external event");
+                    + " event user information from an external event on " + event);
             userInfoAccessedFromExternalEvent = true;
         }
     }
 
-    synchronized void dateAccessedWithoutExternalCheck() {
+    synchronized void dateAccessedWithoutExternalCheck(Event event) {
         if (!dateAccessedWithoutExternalsCheck) {
             log.warn(DEPRECATED,
                     "Event listener " + listener + " is trying to access"
                     + " event date information without checking for whether"
-                    + " the event is external");
+                    + " the event is external on " + event);
             dateAccessedWithoutExternalsCheck = true;
         }
     }
 
-    synchronized void dateAccessedFromExternalEvent() {
+    synchronized void dateAccessedFromExternalEvent(Event event) {
         if (!dateAccessedFromExternalEvent) {
             log.warn(DEPRECATED,
                     "Event listener " + listener + " is trying to access"
-                    + " event date information from an external event");
+                    + " event date information from an external event on " + event);
             dateAccessedFromExternalEvent = true;
         }
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventImpl.java?rev=1492232&r1=1492231&r2=1492232&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventImpl.java
Wed Jun 12 14:51:37 2013
@@ -70,10 +70,10 @@ public class EventImpl implements Jackra
     @Override
     public synchronized String getUserID() {
         if (!externalAccessed) {
-            collector.userInfoAccessedWithoutExternalCheck();
+            collector.userInfoAccessedWithoutExternalCheck(this);
         }
         if (external) {
-            collector.userInfoAccessedFromExternalEvent();
+            collector.userInfoAccessedFromExternalEvent(this);
         }
         return userID;
     }
@@ -91,10 +91,10 @@ public class EventImpl implements Jackra
     @Override
     public String getUserData() throws RepositoryException {
         if (!externalAccessed) {
-            collector.userInfoAccessedWithoutExternalCheck();
+            collector.userInfoAccessedWithoutExternalCheck(this);
         }
         if (external) {
-            collector.userInfoAccessedFromExternalEvent();
+            collector.userInfoAccessedFromExternalEvent(this);
         }
         return userData;
     }
@@ -102,10 +102,10 @@ public class EventImpl implements Jackra
     @Override
     public long getDate() throws RepositoryException {
         if (!externalAccessed) {
-            collector.dateAccessedWithoutExternalCheck();
+            collector.dateAccessedWithoutExternalCheck(this);
         }
         if (external) {
-            collector.dateAccessedFromExternalEvent();
+            collector.dateAccessedFromExternalEvent(this);
         }
         return date;
     }



Mime
View raw message