Skip to content

Commit

Permalink
Guard remaining calls to Connector#setProperty with assertions (#144)
Browse files Browse the repository at this point in the history
Connector#setProperty returns a success boolean. If the property
is deprecated or goes missing, we will immediately notice.
  • Loading branch information
f4lco committed May 6, 2020
1 parent 82e23dd commit 0e76d6e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class TomcatServerConfigurer {
httpConn.port = 0

if(params.httpIdleTimeout)
httpConn.setProperty('keepAliveTimeout', params.httpIdleTimeout.toString())
assert httpConn.setProperty('keepAliveTimeout', params.httpIdleTimeout.toString())

httpConn.maxPostSize = -1 // unlimited post size

Expand All @@ -127,7 +127,7 @@ class TomcatServerConfigurer {
httpsConn = new Connector('HTTP/1.1')
httpsConn.scheme = 'https'
httpsConn.secure = true
httpsConn.setProperty('SSLEnabled', 'true')
assert httpsConn.setProperty('SSLEnabled', 'true')
}

if(httpsConn) {
Expand Down Expand Up @@ -189,7 +189,7 @@ class TomcatServerConfigurer {
sslConfig.truststorePassword = params.sslTrustStorePassword

if(params.httpsIdleTimeout)
httpsConn.setProperty('keepAliveTimeout', params.httpsIdleTimeout.toString())
assert httpsConn.setProperty('keepAliveTimeout', params.httpsIdleTimeout.toString())

httpsConn.maxPostSize = -1 // unlimited

Expand Down

0 comments on commit 0e76d6e

Please sign in to comment.