mirror of
https://github.com/corda/corda.git
synced 2025-01-30 08:04:16 +00:00
Ignore warning for CORDA environment variables in all caps
This commit is contained in:
parent
fbf0bd9bd9
commit
c3ea2c1470
@ -36,6 +36,7 @@ object ConfigHelper {
|
||||
private const val UPPERCASE_PROPERTY_PREFIX = "CORDA."
|
||||
|
||||
private val log = LoggerFactory.getLogger(javaClass)
|
||||
@Suppress("LongParameterList")
|
||||
fun loadConfig(baseDirectory: Path,
|
||||
configFile: Path = baseDirectory / "node.conf",
|
||||
allowMissingConfig: Boolean = false,
|
||||
@ -88,7 +89,13 @@ object ConfigHelper {
|
||||
return ConfigFactory.parseMap(
|
||||
toProperties()
|
||||
.mapKeys {
|
||||
var newKey = (it.key as String)
|
||||
val original = it.key as String
|
||||
|
||||
if (original == original.toUpperCase()){
|
||||
return@mapKeys original
|
||||
}
|
||||
|
||||
var newKey = original
|
||||
.replace('_', '.')
|
||||
.replace(UPPERCASE_PROPERTY_PREFIX, CORDA_PROPERTY_PREFIX)
|
||||
|
||||
@ -175,4 +182,4 @@ fun MutualSslConfiguration.configureDevKeyAndTrustStores(myLegalName: CordaX500N
|
||||
else -> throw IllegalArgumentException("CryptoService not supported.")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user