mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-25 19:55:35 +00:00
Avoid possible NPE
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@939859 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
416085813e
commit
aaf723d2be
@ -62,7 +62,9 @@ public void writeTo(CacheEntry cacheEntry, OutputStream os) throws IOException {
|
||||
// oos.writeObject(sheaders);
|
||||
} finally {
|
||||
try {
|
||||
oos.close();
|
||||
if (oos != null) {
|
||||
oos.close();
|
||||
}
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
try {
|
||||
@ -95,7 +97,9 @@ public CacheEntry readFrom(InputStream is) throws IOException {
|
||||
throw new RuntimeException(cnfe);
|
||||
} finally {
|
||||
try {
|
||||
ois.close();
|
||||
if (ois != null) {
|
||||
ois.close();
|
||||
}
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user