File tree 1 file changed +10
-4
lines changed
src/main/java/org/springframework/data/couchbase/core/mapping/event
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 35
35
* @author Mark Paluch
36
36
* @author Michael Reiche
37
37
*/
38
- public class AuditingEventListener implements ApplicationListener <CouchbaseMappingEvent <Object >> {
38
+ public class AuditingEventListener implements ApplicationListener <CouchbaseMappingEvent <? >> {
39
39
40
40
private final ObjectFactory <Object > auditingHandlerFactory ;
41
41
@@ -54,14 +54,20 @@ public AuditingEventListener() {
54
54
public AuditingEventListener (ObjectFactory <Object > auditingHandlerFactory ) {
55
55
Assert .notNull (auditingHandlerFactory , "auditingHandlerFactory must not be null!" );
56
56
this .auditingHandlerFactory = auditingHandlerFactory ;
57
+ Object o = auditingHandlerFactory .getObject ();
58
+ if (!(o instanceof IsNewAwareAuditingHandler )){
59
+ LOG .warn ("auditingHandler IS NOT an IsNewAwareAuditingHandler: {}" ,o );
60
+ } else {
61
+ LOG .info ("auditingHandler IS an IsNewAwareAuditingHandler: {}" ,o );
62
+ }
57
63
}
58
64
59
- /*
65
+ /**
60
66
* (non-Javadoc)
61
- * @see org.springframework.context.ApplicationListener#onApplicationEvent(org.springframework.context.ApplicationEvent)
67
+ * @see {@link org.springframework.context.ApplicationListener#onApplicationEvent(org.springframework.context.ApplicationEvent)}
62
68
*/
63
69
@ Override
64
- public void onApplicationEvent (CouchbaseMappingEvent <Object > event ) {
70
+ public void onApplicationEvent (CouchbaseMappingEvent <? > event ) {
65
71
if (event instanceof BeforeConvertEvent ) {
66
72
IsNewAwareAuditingHandler h = auditingHandlerFactory != null
67
73
&& auditingHandlerFactory .getObject () instanceof IsNewAwareAuditingHandler
You can’t perform that action at this time.
0 commit comments