mirror of
https://github.com/corda/corda.git
synced 2025-03-12 07:23:59 +00:00
Use simple for loop for api registration on node
This commit is contained in:
parent
f26178f602
commit
e8e909a5ff
@ -107,10 +107,8 @@ class Node(dir: Path, val p2pAddr: HostAndPort, configuration: NodeConfiguration
|
|||||||
resourceConfig.register(ResponseFilter())
|
resourceConfig.register(ResponseFilter())
|
||||||
resourceConfig.register(api)
|
resourceConfig.register(api)
|
||||||
|
|
||||||
clientAPIs.forEach {
|
for(customAPIClass in clientAPIs) {
|
||||||
customAPIClass ->
|
val customAPI = customAPIClass.getConstructor(api.APIServer::class.java).newInstance(api)
|
||||||
val customAPI = customAPIClass.getConstructor(api.APIServer::class.java)
|
|
||||||
.newInstance(api)
|
|
||||||
resourceConfig.register(customAPI)
|
resourceConfig.register(customAPI)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user