Browse Source

SmartOutputStream: Suppress false-positive resource leak warning

Change-Id: I013841ed2584f061c680a8adf0f777dcae3c5418
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-5.2
David Pursehouse 6 years ago committed by Matthias Sohn
parent
commit
b5ffea9e8e
  1. 1
      org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartOutputStream.java

1
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartOutputStream.java

@ -105,6 +105,7 @@ class SmartOutputStream extends TemporaryBuffer {
// If output hasn't started yet, the entire thing fit into our // If output hasn't started yet, the entire thing fit into our
// buffer. Try to use a proper Content-Length header, and also // buffer. Try to use a proper Content-Length header, and also
// deflate the response with gzip if it will be smaller. // deflate the response with gzip if it will be smaller.
@SuppressWarnings("resource")
TemporaryBuffer out = this; TemporaryBuffer out = this;
if (256 < out.length() && acceptsGzipEncoding(req)) { if (256 < out.length() && acceptsGzipEncoding(req)) {

Loading…
Cancel
Save