Polishing
1. fix deprecations 2. fix generics 3. use lambda instead of anonymous class 4. mark some fields as final
This commit is contained in:
committed by
Marcus Hert Da Coregio
parent
831d65a97c
commit
11ce4b4561
@@ -790,6 +790,7 @@ class JdbcIndexedSessionRepositoryTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
void findByIdWhenChangeSessionIdThenUsesSessionIdGenerator() {
|
||||
this.repository.setSessionIdGenerator(() -> "test");
|
||||
Session saved = this.repository.new JdbcSession(new MapSession(), "primaryKey", false);
|
||||
|
||||
@@ -72,13 +72,11 @@ class JdbcHttpSessionConfigurationTests {
|
||||
|
||||
private static final String CLEANUP_CRON_EXPRESSION = "0 0 * * * *";
|
||||
|
||||
private AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
|
||||
private final AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
|
||||
|
||||
@AfterEach
|
||||
void closeContext() {
|
||||
if (this.context != null) {
|
||||
this.context.close();
|
||||
}
|
||||
this.context.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -407,7 +405,7 @@ class JdbcHttpSessionConfigurationTests {
|
||||
static class CustomMaxInactiveIntervalInSecondsSetterConfiguration extends JdbcHttpSessionConfiguration {
|
||||
|
||||
CustomMaxInactiveIntervalInSecondsSetterConfiguration() {
|
||||
setMaxInactiveIntervalInSeconds(MAX_INACTIVE_INTERVAL_IN_SECONDS);
|
||||
setMaxInactiveInterval(Duration.ofSeconds(MAX_INACTIVE_INTERVAL_IN_SECONDS));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user