Skip to content
This repository was archived by the owner on Jul 17, 2018. It is now read-only.

Commit 0e58f24

Browse files
author
Dan Rees
committed
Add guards to SonarApiClient
1 parent 0fe5244 commit 0e58f24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jobs/sonarqube/templates/config/SonarApiClient.groovy.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ class SonarApiClient
100100
println "Request failed with error: ${ioe}"
101101
return false
102102
} finally {
103-
writer.close()
104-
connection.disconnect()
103+
if (writer != null) writer.close()
104+
if (connection != null) connection.disconnect()
105105
}
106106
}
107107

0 commit comments

Comments
 (0)