diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/event/AuditingEventListener.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/event/AuditingEventListener.java index 41774781b..0d6d4c287 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/event/AuditingEventListener.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/event/AuditingEventListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,14 +28,14 @@ import org.springframework.util.Assert; */ public class AuditingEventListener implements ApplicationListener> { - private final IsNewAwareAuditingHandler auditingHandler; + private final IsNewAwareAuditingHandler auditingHandler; /** * Creates a new {@link AuditingEventListener} using the given {@link MappingContext} and {@link AuditingHandler}. * * @param auditingHandler must not be {@literal null}. */ - public AuditingEventListener(IsNewAwareAuditingHandler auditingHandler) { + public AuditingEventListener(IsNewAwareAuditingHandler auditingHandler) { Assert.notNull(auditingHandler, "IsNewAwareAuditingHandler must not be null!"); this.auditingHandler = auditingHandler; diff --git a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/mapping/event/AuditingEventListenerUnitTests.java b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/mapping/event/AuditingEventListenerUnitTests.java index 0f50b279c..9f59e19f4 100644 --- a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/mapping/event/AuditingEventListenerUnitTests.java +++ b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/mapping/event/AuditingEventListenerUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 the original author or authors. + * Copyright 2012-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ import org.springframework.data.support.IsNewStrategyFactory; @RunWith(MockitoJUnitRunner.class) public class AuditingEventListenerUnitTests { - IsNewAwareAuditingHandler handler; + IsNewAwareAuditingHandler handler; IsNewStrategyFactory factory; AuditingEventListener listener; @@ -48,7 +48,7 @@ public class AuditingEventListenerUnitTests { MongoMappingContext mappingContext = new MongoMappingContext(); factory = new MappingContextIsNewStrategyFactory(mappingContext); - handler = spy(new IsNewAwareAuditingHandler(factory)); + handler = spy(new IsNewAwareAuditingHandler(factory)); doNothing().when(handler).markCreated(Mockito.any(Object.class)); doNothing().when(handler).markModified(Mockito.any(Object.class)); @@ -83,7 +83,6 @@ public class AuditingEventListenerUnitTests { static class Sample { - @Id - String id; + @Id String id; } }