Clean up warnings and polish tests
This commit also modifies ResourceWebHandlerTests.getResourceFromFileSystem() so that it passes in the IDE.
This commit is contained in:
@@ -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));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user