File tree Expand file tree Collapse file tree
spring-web/src/main/java/org/springframework/remoting/httpinvoker Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -202,24 +202,27 @@ protected OutputStream decorateOutputStream(
202202 return os ;
203203 }
204204
205+
205206 /**
206- * Decorate an OutputStream to guard against {@code flush()} calls, which
207- * are turned into no-ops.
207+ * Decorate an {@code OutputStream} to guard against {@code flush()} calls,
208+ * which are turned into no-ops.
209+ *
208210 * <p>Because {@link ObjectOutputStream#close()} will in fact flush/drain
209211 * the underlying stream twice, this {@link FilterOutputStream} will
210212 * guard against individual flush calls. Multiple flush calls can lead
211213 * to performance issues, since writes aren't gathered as they should be.
212214 *
213215 * @see <a href="https://jira.spring.io/browse/SPR-14040">SPR-14040</a>
214216 */
215- class FlushGuardedOutputStream extends FilterOutputStream {
217+ private static class FlushGuardedOutputStream extends FilterOutputStream {
218+
216219 public FlushGuardedOutputStream (OutputStream out ) {
217220 super (out );
218221 }
219222
220223 @ Override
221224 public void flush () throws IOException {
222- // Do nothing
225+ // Do nothing on flush
223226 }
224227 }
225228
You can’t perform that action at this time.
0 commit comments