Clean up warnings and polish tests

This commit also modifies ResourceWebHandlerTests.getResourceFromFileSystem()
so that it passes in the IDE.
This commit is contained in:
Sam Brannen
2022-08-26 15:20:16 +02:00
parent e53c7ae6f5
commit b50415062b
20 changed files with 206 additions and 214 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-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.
@@ -30,13 +30,13 @@ import org.springframework.web.server.WebFilter;
* Tests for a {@link WebFilter}.
* @author Rossen Stoyanchev
*/
public class WebFilterTests {
class WebFilterTests {
@Test
public void testWebFilter() throws Exception {
void webFilter() {
WebFilter filter = (exchange, chain) -> {
DataBuffer buffer = DefaultDataBufferFactory.sharedInstance.allocateBuffer();
DataBuffer buffer = DefaultDataBufferFactory.sharedInstance.allocateBuffer(256);
buffer.write("It works!".getBytes(StandardCharsets.UTF_8));
return exchange.getResponse().writeWith(Mono.just(buffer));
};