Fix deprecation warnings

This commit is contained in:
Vedran Pavic
2022-08-19 23:55:50 +02:00
committed by Rob Winch
parent 8c49d5993f
commit 8e8de48614
66 changed files with 278 additions and 230 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2019 the original author or authors.
* Copyright 2014-2022 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.
@@ -18,10 +18,10 @@ package docs;
import java.util.Map;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.session.FindByIndexNameSessionRepository;
import org.springframework.session.Session;
@@ -30,6 +30,7 @@ import org.springframework.session.Session;
* @author Rob Winch
*
*/
@ExtendWith(MockitoExtension.class)
class FindByIndexNameSessionRepositoryTests {
@Mock
@@ -38,11 +39,6 @@ class FindByIndexNameSessionRepositoryTests {
@Mock
Session session;
@BeforeEach
void setUp() {
MockitoAnnotations.initMocks(this);
}
@Test
void setUsername() {
// tag::set-username[]
@@ -52,7 +48,6 @@ class FindByIndexNameSessionRepositoryTests {
}
@Test
@SuppressWarnings("unused")
void findByUsername() {
// tag::findby-username[]
String username = "username";