Correct typos (#2018)

This commit is contained in:
HeemangHan
2018-11-18 00:31:01 +09:00
committed by Sam Brannen
parent 1a37345e84
commit 729ce4108d
17 changed files with 41 additions and 41 deletions

View File

@@ -75,23 +75,23 @@ public class CssLinkResourceTransformer extends ResourceTransformerSupport {
ResourceTransformerChain transformerChain) {
return transformerChain.transform(exchange, inputResource)
.flatMap(ouptputResource -> {
String filename = ouptputResource.getFilename();
.flatMap(outputResource -> {
String filename = outputResource.getFilename();
if (!"css".equals(StringUtils.getFilenameExtension(filename)) ||
inputResource instanceof EncodedResourceResolver.EncodedResource ||
inputResource instanceof GzipResourceResolver.GzippedResource) {
return Mono.just(ouptputResource);
return Mono.just(outputResource);
}
DataBufferFactory bufferFactory = exchange.getResponse().bufferFactory();
Flux<DataBuffer> flux = DataBufferUtils
.read(ouptputResource, bufferFactory, StreamUtils.BUFFER_SIZE);
.read(outputResource, bufferFactory, StreamUtils.BUFFER_SIZE);
return DataBufferUtils.join(flux)
.flatMap(dataBuffer -> {
CharBuffer charBuffer = DEFAULT_CHARSET.decode(dataBuffer.asByteBuffer());
DataBufferUtils.release(dataBuffer);
String cssContent = charBuffer.toString();
return transformContent(cssContent, ouptputResource, transformerChain, exchange);
return transformContent(cssContent, outputResource, transformerChain, exchange);
});
});
}

View File

@@ -254,23 +254,23 @@ public class CrossOriginAnnotationIntegrationTests extends AbstractRequestMappin
@CrossOrigin
@GetMapping(path = "/ambiguous-header", headers = "header1=a")
public void ambigousHeader1a() {
public void ambiguousHeader1a() {
}
@CrossOrigin
@GetMapping(path = "/ambiguous-header", headers = "header1=b")
public void ambigousHeader1b() {
public void ambiguousHeader1b() {
}
@CrossOrigin
@GetMapping(path = "/ambiguous-produces", produces = "application/xml")
public String ambigousProducesXml() {
public String ambiguousProducesXml() {
return "<a></a>";
}
@CrossOrigin
@GetMapping(path = "/ambiguous-produces", produces = "application/json")
public String ambigousProducesJson() {
public String ambiguousProducesJson() {
return "{}";
}