Skip to content

Commit 52e5b4a

Browse files
committed
Polishing
1 parent 76964e1 commit 52e5b4a

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerServiceExporter.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)