@@ -55,7 +55,7 @@ enum class AuthenticationType {
5555 BASIC ,
5656 KERBEROS ,
5757 BEARER ,
58- CUSTOM
58+ CUSTOM ,
5959}
6060
6161open class Neo4jConfiguration (configDef : ConfigDef , originals : Map <* , * >, val type : ConnectorType ) :
@@ -112,7 +112,8 @@ open class Neo4jConfiguration(configDef: ConfigDef, originals: Map<*, *>, val ty
112112 AuthTokens .basic(
113113 getString(AUTHENTICATION_BASIC_USERNAME ),
114114 getPassword(AUTHENTICATION_BASIC_PASSWORD ).value(),
115- getString(AUTHENTICATION_BASIC_REALM ))
115+ getString(AUTHENTICATION_BASIC_REALM ),
116+ )
116117 AuthenticationType .KERBEROS ->
117118 AuthTokens .kerberos(getPassword(AUTHENTICATION_KERBEROS_TICKET ).value())
118119 AuthenticationType .BEARER ->
@@ -122,16 +123,14 @@ open class Neo4jConfiguration(configDef: ConfigDef, originals: Map<*, *>, val ty
122123 getString(AUTHENTICATION_CUSTOM_PRINCIPAL ),
123124 getPassword(AUTHENTICATION_CUSTOM_CREDENTIALS ).value(),
124125 getString(AUTHENTICATION_CUSTOM_REALM ),
125- getString(AUTHENTICATION_CUSTOM_SCHEME ))
126+ getString(AUTHENTICATION_CUSTOM_SCHEME ),
127+ )
126128 }
127129
128130 internal val trustStrategy
129131 get(): TrustStrategy {
130132 val strategy: TrustStrategy =
131- when (ConfigUtils .getEnum<Strategy >(
132- this ,
133- SECURITY_TRUST_STRATEGY ,
134- )) {
133+ when (ConfigUtils .getEnum<Strategy >(this , SECURITY_TRUST_STRATEGY )) {
135134 null -> TrustStrategy .trustSystemCertificates()
136135 Strategy .TRUST_ALL_CERTIFICATES -> TrustStrategy .trustAllCertificates()
137136 Strategy .TRUST_SYSTEM_CA_SIGNED_CERTIFICATES -> TrustStrategy .trustSystemCertificates()
@@ -159,13 +158,19 @@ open class Neo4jConfiguration(configDef: ConfigDef, originals: Map<*, *>, val ty
159158
160159 config.withUserAgent(userAgent(type.description, userAgentComment()))
161160 config.withConnectionAcquisitionTimeout(
162- connectionAcquisitionTimeout.inWholeMilliseconds, TimeUnit .MILLISECONDS )
161+ connectionAcquisitionTimeout.inWholeMilliseconds,
162+ TimeUnit .MILLISECONDS ,
163+ )
163164 config.withConnectionTimeout(connectionTimeout.inWholeMilliseconds, TimeUnit .MILLISECONDS )
164165 config.withMaxConnectionPoolSize(maxConnectionPoolSize)
165166 config.withConnectionLivenessCheckTimeout(
166- idleTimeBeforeTest.inWholeMilliseconds, TimeUnit .MILLISECONDS )
167+ idleTimeBeforeTest.inWholeMilliseconds,
168+ TimeUnit .MILLISECONDS ,
169+ )
167170 config.withMaxConnectionLifetime(
168- maxConnectionLifetime.inWholeMilliseconds, TimeUnit .MILLISECONDS )
171+ maxConnectionLifetime.inWholeMilliseconds,
172+ TimeUnit .MILLISECONDS ,
173+ )
169174 config.withMaxTransactionRetryTime(maxRetryTime.inWholeMilliseconds, TimeUnit .MILLISECONDS )
170175
171176 if (uri.none { it.scheme.endsWith(" +s" , true ) || it.scheme.endsWith(" +ssc" , true ) }) {
@@ -195,7 +200,8 @@ open class Neo4jConfiguration(configDef: ConfigDef, originals: Map<*, *>, val ty
195200 when (type) {
196201 ConnectorType .SOURCE -> AccessMode .READ
197202 ConnectorType .SINK -> AccessMode .WRITE
198- })
203+ }
204+ )
199205
200206 return config.build()
201207 }
@@ -210,7 +216,8 @@ open class Neo4jConfiguration(configDef: ConfigDef, originals: Map<*, *>, val ty
210216 if (metadata.isNotEmpty()) {
211217 this [" metadata" ] = metadata
212218 }
213- })
219+ }
220+ )
214221 .build()
215222
216223 open fun telemetryData (): Map <String , Any > = emptyMap()
0 commit comments