Skip to content

Commit

Permalink
NoIssue: just a little cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nbartels committed Dec 4, 2020
1 parent 638aaf7 commit c957e36
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main/java/com/restfb/DefaultWebRequestor.java
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,8 @@ protected void closeQuietly(Closeable closeable) {
* The connection to close.
*/
protected void closeQuietly(HttpURLConnection httpUrlConnection) {
if (httpUrlConnection == null) {
return;
}
try {
httpUrlConnection.disconnect();
Optional.ofNullable(httpUrlConnection).ifPresent(HttpURLConnection::disconnect);
} catch (Exception t) {
HTTP_LOGGER.warn("Unable to disconnect {}: ", httpUrlConnection, t);
}
Expand Down

0 comments on commit c957e36

Please sign in to comment.