Skip to content

Commit e9c8644

Browse files
committed
DATACMNS-414 - Adapted to removed generics in AuditingHandler API.
1 parent c730b8f commit e9c8644

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/event/AuditingEventListener.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012 the original author or authors.
2+
* Copyright 2012-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,14 +28,14 @@
2828
*/
2929
public class AuditingEventListener implements ApplicationListener<BeforeConvertEvent<Object>> {
3030

31-
private final IsNewAwareAuditingHandler<Object> auditingHandler;
31+
private final IsNewAwareAuditingHandler auditingHandler;
3232

3333
/**
3434
* Creates a new {@link AuditingEventListener} using the given {@link MappingContext} and {@link AuditingHandler}.
3535
*
3636
* @param auditingHandler must not be {@literal null}.
3737
*/
38-
public AuditingEventListener(IsNewAwareAuditingHandler<Object> auditingHandler) {
38+
public AuditingEventListener(IsNewAwareAuditingHandler auditingHandler) {
3939

4040
Assert.notNull(auditingHandler, "IsNewAwareAuditingHandler must not be null!");
4141
this.auditingHandler = auditingHandler;

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/mapping/event/AuditingEventListenerUnitTests.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012 the original author or authors.
2+
* Copyright 2012-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@
3737
@RunWith(MockitoJUnitRunner.class)
3838
public class AuditingEventListenerUnitTests {
3939

40-
IsNewAwareAuditingHandler<Object> handler;
40+
IsNewAwareAuditingHandler handler;
4141

4242
IsNewStrategyFactory factory;
4343
AuditingEventListener listener;
@@ -48,7 +48,7 @@ public void setUp() {
4848
MongoMappingContext mappingContext = new MongoMappingContext();
4949
factory = new MappingContextIsNewStrategyFactory(mappingContext);
5050

51-
handler = spy(new IsNewAwareAuditingHandler<Object>(factory));
51+
handler = spy(new IsNewAwareAuditingHandler(factory));
5252
doNothing().when(handler).markCreated(Mockito.any(Object.class));
5353
doNothing().when(handler).markModified(Mockito.any(Object.class));
5454

@@ -83,7 +83,6 @@ public void triggersModificationMarkForObjectWithSetId() {
8383

8484
static class Sample {
8585

86-
@Id
87-
String id;
86+
@Id String id;
8887
}
8988
}

0 commit comments

Comments
 (0)