diff --git a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java index 41a3760fbe3..12735929374 100644 --- a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java +++ b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2021 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. @@ -71,7 +71,7 @@ public abstract class DataBufferUtils { //--------------------------------------------------------------------- /** - * Obtain a {@link InputStream} from the given supplier, and read it into a + * Obtain an {@link InputStream} from the given supplier, and read it into a * {@code Flux} of {@code DataBuffer}s. Closes the input stream when the * Flux is terminated. * @param inputStreamSupplier the supplier for the input stream to read from @@ -125,7 +125,7 @@ public abstract class DataBufferUtils { } /** - * Obtain a {@code AsynchronousFileChannel} from the given supplier, and + * Obtain an {@code AsynchronousFileChannel} from the given supplier, and * read it into a {@code Flux} of {@code DataBuffer}s, starting at the given * position. Closes the channel when the Flux is terminated. * @param channelSupplier the supplier for the channel to read from diff --git a/spring-web/src/main/java/org/springframework/http/codec/multipart/FileStorage.java b/spring-web/src/main/java/org/springframework/http/codec/multipart/FileStorage.java index eb6b75b6b4b..403553d79d3 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/multipart/FileStorage.java +++ b/spring-web/src/main/java/org/springframework/http/codec/multipart/FileStorage.java @@ -59,8 +59,8 @@ abstract class FileStorage { } /** - * Create a new {@code FileStorage} based a on a temporary directory. - * @param scheduler scheduler to use for blocking operations + * Create a new {@code FileStorage} based on a temporary directory. + * @param scheduler the scheduler to use for blocking operations */ public static FileStorage tempDirectory(Supplier scheduler) { return new TempFileStorage(scheduler); diff --git a/spring-web/src/main/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReader.java b/spring-web/src/main/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReader.java index 5cb374c7704..440891b7ae7 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReader.java +++ b/spring-web/src/main/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReader.java @@ -470,6 +470,7 @@ public class SynchronossPartHttpMessageReader extends LoggingCodecSupport implem } @Override + @SuppressWarnings("resource") public Flux content() { return DataBufferUtils.readInputStream( getStorage()::getInputStream, DefaultDataBufferFactory.sharedInstance, 4096);