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 class DefaultCacheEntrySerializer implements HttpCacheEntrySerializer<Cac
|
|||
// oos.writeObject(sheaders);
|
||||
} finally {
|
||||
try {
|
||||
oos.close();
|
||||
if (oos != null) {
|
||||
oos.close();
|
||||
}
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
try {
|
||||
|
@ -95,7 +97,9 @@ public class DefaultCacheEntrySerializer implements HttpCacheEntrySerializer<Cac
|
|||
throw new RuntimeException(cnfe);
|
||||
} finally {
|
||||
try {
|
||||
ois.close();
|
||||
if (ois != null) {
|
||||
ois.close();
|
||||
}
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue