Skip to content

Commit aa40aca

Browse files
author
Bilal Al
committed
polish
1 parent 2234a3c commit aa40aca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client/src/main/java/io/split/service/SplitHttpClientKerberosImpl.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public synchronized SplitHttpResponse get(URI uri, FetchOptions options, Map<Str
6060
} finally {
6161
try {
6262
getHttpURLConnection.disconnect();
63+
} catch (NullPointerException e) {
64+
_log.error(String.format("HTTP URL Connection is not initialized: %s", e), e);
6365
} catch (Exception e) {
6466
_log.error(String.format("Could not close HTTP URL Connection: %s", e), e);
6567
}
@@ -111,6 +113,8 @@ public SplitHttpResponse _get(HttpURLConnection getHttpURLConnection, FetchOptio
111113
} finally {
112114
try {
113115
inputStreamReader.close();
116+
} catch (NullPointerException e) {
117+
_log.error(String.format("HTTP Stream is not initialized: %s", e), e);
114118
} catch (Exception e) {
115119
_log.error(String.format("Could not close HTTP Stream: %s", e), e);
116120
}
@@ -127,6 +131,8 @@ public synchronized SplitHttpResponse post(URI uri, HttpEntity entity, Map<Strin
127131
} finally {
128132
try {
129133
postHttpURLConnection.disconnect();
134+
} catch (NullPointerException e) {
135+
_log.error(String.format("URL Connection is not initialized: %s", e), e);
130136
} catch (Exception e) {
131137
_log.error(String.format("Could not close URL Connection: %s", e), e);
132138
}

0 commit comments

Comments
 (0)