Skip to content

Commit d143d8f

Browse files
committed
DATAJDBC-390 - Polishing.
Slightly tweak Javadoc. Original pull request: #159.
1 parent 7089e07 commit d143d8f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/config/EnableJdbcAuditingHsqlIntegrationTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public void noAnnotatedEntity() {
134134

135135
entity = repository.save(entity);
136136

137-
assertThat(repository.findById(entity.id).get()).isEqualTo(entity);
137+
assertThat(repository.findById(entity.id)).contains(entity);
138138
});
139139
}
140140

@@ -192,7 +192,6 @@ public void auditingListenerTriggersBeforeDefaultListener() {
192192
AuditingAnnotatedDummyEntity entity = repository.save(new AuditingAnnotatedDummyEntity());
193193

194194
assertThat(entity.id).isNotNull();
195-
196195
});
197196
}
198197

spring-data-relational/src/main/java/org/springframework/data/relational/domain/support/RelationalAuditingEventListener.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
public class RelationalAuditingEventListener implements ApplicationListener<BeforeSaveEvent>, Ordered {
3636

3737
/**
38-
* The order used for this {@link org.springframework.context.event.EventListener}. This ensures that it will run
39-
* before other listeners without a specified priority.
38+
* The order used for this {@link org.springframework.context.event.EventListener}. Ordering ensures that this
39+
* {@link ApplicationListener} will run before other listeners without a specified priority.
4040
*
4141
* @see org.springframework.core.annotation.Order
4242
* @see Ordered
@@ -47,14 +47,18 @@ public class RelationalAuditingEventListener implements ApplicationListener<Befo
4747

4848
/**
4949
* {@inheritDoc}
50-
*
50+
*
5151
* @param event a notification event for indicating before save
5252
*/
5353
@Override
5454
public void onApplicationEvent(BeforeSaveEvent event) {
5555
handler.markAudited(event.getEntity());
5656
}
5757

58+
/*
59+
* (non-Javadoc)
60+
* @see org.springframework.core.Ordered#getOrder()
61+
*/
5862
@Override
5963
public int getOrder() {
6064
return AUDITING_ORDER;

0 commit comments

Comments
 (0)