summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorThomas Becker2012-02-22 10:22:36 (EST)
committer Jesse McConnell2012-02-22 10:26:17 (EST)
commit19fae56d6d5bf1f443fe26ce17399d65cd894afa (patch)
tree5d88cbfbad8c6368d3a15585b0de44721033e50e
parent9adabd0f2affff4cc673ff2c65cd45379865d9dc (diff)
downloadorg.eclipse.jetty.project-19fae56d6d5bf1f443fe26ce17399d65cd894afa.zip
org.eclipse.jetty.project-19fae56d6d5bf1f443fe26ce17399d65cd894afa.tar.gz
org.eclipse.jetty.project-19fae56d6d5bf1f443fe26ce17399d65cd894afa.tar.bz2
372190: HttpContent.getIndirectBuffer() close InputStream null check
-rw-r--r--jetty-http/src/main/java/org/eclipse/jetty/http/HttpContent.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpContent.java b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpContent.java
index 11d0d1c..ade697c 100644
--- a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpContent.java
+++ b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpContent.java
@@ -100,13 +100,16 @@ public interface HttpContent
}
finally
{
- try
+ if (inputStream != null)
{
- inputStream.close();
- }
- catch (IOException e)
- {
- LOG.warn("Couldn't close inputStream. Possible file handle leak",e);
+ try
+ {
+ inputStream.close();
+ }
+ catch (IOException e)
+ {
+ LOG.warn("Couldn't close inputStream. Possible file handle leak",e);
+ }
}
}
}