mirror of
https://github.com/corda/corda.git
synced 2025-01-30 16:14:39 +00:00
CORDA-2876: Ensure NodeConfig does not have devModeOptions outside of devMode. (#5676)
This commit is contained in:
parent
f226ddc4f2
commit
02ed8e91b3
@ -736,10 +736,14 @@ class DriverDSLImpl(
|
|||||||
* These will all be ignored unless devMode is also true.
|
* These will all be ignored unless devMode is also true.
|
||||||
*/
|
*/
|
||||||
private fun Config.withDJVMConfig(bootstrapSource: Path?, cordaSource: List<Path>): Config {
|
private fun Config.withDJVMConfig(bootstrapSource: Path?, cordaSource: List<Path>): Config {
|
||||||
return if (hasPath("devMode") && getBoolean("devMode")) {
|
return if (hasPath("devMode")) {
|
||||||
withOptionalValue("devModeOptions.djvm.bootstrapSource", bootstrapSource) { path ->
|
if (getBoolean("devMode")) {
|
||||||
valueFor(path.toString())
|
withOptionalValue("devModeOptions.djvm.bootstrapSource", bootstrapSource) { path ->
|
||||||
}.withValue("devModeOptions.djvm.cordaSource", valueFor(cordaSource.map(Path::toString)))
|
valueFor(path.toString())
|
||||||
|
}.withValue("devModeOptions.djvm.cordaSource", valueFor(cordaSource.map(Path::toString)))
|
||||||
|
} else {
|
||||||
|
withoutPath("devModeOptions")
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this
|
this
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user