Merge branch '4.0.x' into 4.1.x

Closes gh-51599
This commit is contained in:
Andy Wilkinson
2026-09-07 08:26:42 +01:00
149 changed files with 5 additions and 243 deletions
@@ -52,7 +52,6 @@ abstract class AbstractDevToolsIntegrationTests {
protected final JvmLauncher javaLauncher = new JvmLauncher();
@TempDir
@SuppressWarnings("NullAway.Init")
protected static File temp;
private @Nullable LaunchedApplication launchedApplication;
@@ -32,7 +32,6 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException
class TriggerFileFilterTests {
@TempDir
@SuppressWarnings("NullAway.Init")
File tempDir;
@Test
@@ -47,15 +47,12 @@ import static org.mockito.Mockito.never;
class ClassPathFileChangeListenerTests {
@Mock
@SuppressWarnings("NullAway.Init")
private ApplicationEventPublisher eventPublisher;
@Mock
@SuppressWarnings("NullAway.Init")
private ClassPathRestartStrategy restartStrategy;
@Mock
@SuppressWarnings("NullAway.Init")
private FileSystemWatcher fileSystemWatcher;
@Test
@@ -34,7 +34,6 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException
class ChangedFileTests {
@TempDir
@SuppressWarnings("NullAway.Init")
File tempDir;
@Test
@@ -38,7 +38,6 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException
class DirectorySnapshotTests {
@TempDir
@SuppressWarnings("NullAway.Init")
File tempDir;
private File directory;
@@ -42,7 +42,6 @@ class FileSnapshotTests {
private static final long MODIFIED = new Date().getTime() - TimeUnit.DAYS.toMillis(10);
@TempDir
@SuppressWarnings("NullAway.Init")
File tempDir;
@Test
@@ -54,7 +54,6 @@ class FileSystemWatcherTests {
private final List<Set<ChangedFiles>> changes = Collections.synchronizedList(new ArrayList<>());
@TempDir
@SuppressWarnings("NullAway.Init")
File tempDir;
@BeforeEach
@@ -50,27 +50,21 @@ class DelayedLiveReloadTriggerTests {
private static final String URL = "http://localhost:8080";
@Mock
@SuppressWarnings("NullAway.Init")
private OptionalLiveReloadServer liveReloadServer;
@Mock
@SuppressWarnings("NullAway.Init")
private ClientHttpRequestFactory requestFactory;
@Mock
@SuppressWarnings("NullAway.Init")
private ClientHttpRequest errorRequest;
@Mock
@SuppressWarnings("NullAway.Init")
private ClientHttpRequest okRequest;
@Mock
@SuppressWarnings("NullAway.Init")
private ClientHttpResponse errorResponse;
@Mock
@SuppressWarnings("NullAway.Init")
private ClientHttpResponse okResponse;
private DelayedLiveReloadTrigger trigger;
@@ -54,11 +54,9 @@ class HttpHeaderInterceptorTests {
private byte[] body;
@Mock
@SuppressWarnings("NullAway.Init")
private ClientHttpRequestExecution execution;
@Mock
@SuppressWarnings("NullAway.Init")
private ClientHttpResponse response;
private MockHttpServletRequest httpRequest;
@@ -51,11 +51,9 @@ import static org.mockito.Mockito.mock;
class DispatcherFilterTests {
@Mock
@SuppressWarnings("NullAway.Init")
private Dispatcher dispatcher;
@Mock
@SuppressWarnings("NullAway.Init")
private FilterChain chain;
private DispatcherFilter filter;
@@ -52,7 +52,6 @@ import static org.mockito.Mockito.withSettings;
class DispatcherTests {
@Mock
@SuppressWarnings("NullAway.Init")
private AccessManager accessManager;
private final MockHttpServletResponse response = new MockHttpServletResponse();
@@ -43,7 +43,6 @@ import static org.assertj.core.api.Assertions.assertThat;
class ChangeableUrlsTests {
@TempDir
@SuppressWarnings("NullAway.Init")
File tempDir;
@Test
@@ -40,21 +40,18 @@ class ClassLoaderFileTests {
}
@Test
@SuppressWarnings("NullAway") // Test null check
void addedContentsMustNotBeNull() {
assertThatIllegalArgumentException().isThrownBy(() -> new ClassLoaderFile(Kind.ADDED, null))
.withMessageContaining("'contents' must not be null");
}
@Test
@SuppressWarnings("NullAway") // Test null check
void modifiedContentsMustNotBeNull() {
assertThatIllegalArgumentException().isThrownBy(() -> new ClassLoaderFile(Kind.MODIFIED, null))
.withMessageContaining("'contents' must not be null");
}
@Test
@SuppressWarnings("NullAway") // Test null check
void deletedContentsMustBeNull() {
assertThatIllegalArgumentException().isThrownBy(() -> new ClassLoaderFile(Kind.DELETED, new byte[10]))
.withMessageContaining("'contents' must be null");
@@ -52,7 +52,6 @@ import static org.mockito.BDDMockito.then;
class HttpRestartServerTests {
@Mock
@SuppressWarnings("NullAway.Init")
private RestartServer delegate;
private HttpRestartServer server;