File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
src/main/java/org/springframework/data/couchbase/core/mapping/event Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 3535 * @author Mark Paluch
3636 * @author Michael Reiche
3737 */
38- public class AuditingEventListener implements ApplicationListener <CouchbaseMappingEvent <Object >> {
38+ public class AuditingEventListener implements ApplicationListener <CouchbaseMappingEvent <? >> {
3939
4040 private final ObjectFactory <Object > auditingHandlerFactory ;
4141
@@ -54,14 +54,20 @@ public AuditingEventListener() {
5454 public AuditingEventListener (ObjectFactory <Object > auditingHandlerFactory ) {
5555 Assert .notNull (auditingHandlerFactory , "auditingHandlerFactory must not be null!" );
5656 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+ }
5763 }
5864
59- /*
65+ /**
6066 * (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)}
6268 */
6369 @ Override
64- public void onApplicationEvent (CouchbaseMappingEvent <Object > event ) {
70+ public void onApplicationEvent (CouchbaseMappingEvent <? > event ) {
6571 if (event instanceof BeforeConvertEvent ) {
6672 IsNewAwareAuditingHandler h = auditingHandlerFactory != null
6773 && auditingHandlerFactory .getObject () instanceof IsNewAwareAuditingHandler
You can’t perform that action at this time.
0 commit comments