mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
Fix various deprecated warnings
* Changed deprecated kotlin.reflect.primaryConstructor to kotlin.reflect.full.primaryConstructor * Changed deprecated kotlin.reflect.memberProperties to kotlin.reflect.full.memberProperties * Changed deprecated kotlin.reflect.declaredMemberProperties to kotlin.reflect.full.declaredMemberProperties * Changed deprecated AllComposition to AllOf * Changed deprecated AnyComposition to AnyOf * Changed deprecated kotlin.reflect.KotlinReflectionInternalError to kotlin.reflect.jvm.internal.KotlinReflectionInternalError * Changed deprecated HostAndPort.hostText to HostAndPort.host * Removed duplicated method net.corda.core.node.recordTransactions
This commit is contained in:
@ -232,7 +232,7 @@ fun getTimestampAsDirectoryName(): String {
|
||||
fun addressMustBeBound(executorService: ScheduledExecutorService, hostAndPort: HostAndPort): ListenableFuture<Unit> {
|
||||
return poll(executorService, "address $hostAndPort to bind") {
|
||||
try {
|
||||
Socket(hostAndPort.hostText, hostAndPort.port).close()
|
||||
Socket(hostAndPort.host, hostAndPort.port).close()
|
||||
Unit
|
||||
} catch (_exception: SocketException) {
|
||||
null
|
||||
@ -243,7 +243,7 @@ fun addressMustBeBound(executorService: ScheduledExecutorService, hostAndPort: H
|
||||
fun addressMustNotBeBound(executorService: ScheduledExecutorService, hostAndPort: HostAndPort): ListenableFuture<Unit> {
|
||||
return poll(executorService, "address $hostAndPort to unbind") {
|
||||
try {
|
||||
Socket(hostAndPort.hostText, hostAndPort.port).close()
|
||||
Socket(hostAndPort.host, hostAndPort.port).close()
|
||||
null
|
||||
} catch (_exception: SocketException) {
|
||||
Unit
|
||||
|
@ -143,7 +143,7 @@ class Node(override val configuration: FullNodeConfiguration,
|
||||
|
||||
private fun makeLocalMessageBroker(): HostAndPort {
|
||||
with(configuration) {
|
||||
val useHost = tryDetectIfNotPublicHost(p2pAddress.hostText)
|
||||
val useHost = tryDetectIfNotPublicHost(p2pAddress.host)
|
||||
val useAddress = useHost?.let { HostAndPort.fromParts(it, p2pAddress.port) } ?: p2pAddress
|
||||
messageBroker = ArtemisMessagingServer(this, useAddress, rpcAddress, services.networkMapCache, userService)
|
||||
return useAddress
|
||||
|
@ -355,7 +355,7 @@ class ArtemisMessagingServer(override val config: NodeConfiguration,
|
||||
connectorFactoryClassName = VerifyingNettyConnectorFactory::class.java.name,
|
||||
expectedCommonName = legalName
|
||||
)
|
||||
val tcpTransport = createTcpTransport(connectionDirection, target.hostText, target.port)
|
||||
val tcpTransport = createTcpTransport(connectionDirection, target.host, target.port)
|
||||
tcpTransport.params[ArtemisMessagingServer::class.java.name] = this
|
||||
// We intentionally overwrite any previous connector config in case the peer legal name changed
|
||||
activeMQServer.configuration.addConnectorConfiguration(target.toString(), tcpTransport)
|
||||
|
@ -60,7 +60,7 @@ class RaftUniquenessProvider(storagePath: Path, myAddress: HostAndPort, clusterA
|
||||
init {
|
||||
log.info("Creating Copycat server, log stored in: ${storagePath.toFile()}")
|
||||
val stateMachineFactory = { DistributedImmutableMap<String, ByteArray>(db, DB_TABLE_NAME) }
|
||||
val address = Address(myAddress.hostText, myAddress.port)
|
||||
val address = Address(myAddress.host, myAddress.port)
|
||||
val storage = buildStorage(storagePath)
|
||||
val transport = buildTransport(config)
|
||||
val serializer = Serializer()
|
||||
@ -74,7 +74,7 @@ class RaftUniquenessProvider(storagePath: Path, myAddress: HostAndPort, clusterA
|
||||
|
||||
val serverFuture = if (clusterAddresses.isNotEmpty()) {
|
||||
log.info("Joining an existing Copycat cluster at $clusterAddresses")
|
||||
val cluster = clusterAddresses.map { Address(it.hostText, it.port) }
|
||||
val cluster = clusterAddresses.map { Address(it.host, it.port) }
|
||||
server.join(cluster)
|
||||
} else {
|
||||
log.info("Bootstrapping a Copycat cluster at $address")
|
||||
|
@ -90,7 +90,7 @@ class DistributedImmutableMapTests {
|
||||
|
||||
private fun createReplica(myAddress: HostAndPort, clusterAddress: HostAndPort? = null): CompletableFuture<Member> {
|
||||
val storage = Storage.builder().withStorageLevel(StorageLevel.MEMORY).build()
|
||||
val address = Address(myAddress.hostText, myAddress.port)
|
||||
val address = Address(myAddress.host, myAddress.port)
|
||||
|
||||
val stateMachineFactory = { DistributedImmutableMap<String, ByteArray>(database, "commited_states_${myAddress.port}") }
|
||||
|
||||
@ -100,7 +100,7 @@ class DistributedImmutableMapTests {
|
||||
.build()
|
||||
|
||||
val serverInitFuture = if (clusterAddress != null) {
|
||||
val cluster = Address(clusterAddress.hostText, clusterAddress.port)
|
||||
val cluster = Address(clusterAddress.host, clusterAddress.port)
|
||||
server.join(cluster)
|
||||
} else {
|
||||
server.bootstrap()
|
||||
|
@ -8,7 +8,6 @@ import net.corda.core.flows.FlowLogic
|
||||
import net.corda.core.flows.FlowLogicRef
|
||||
import net.corda.core.flows.FlowLogicRefFactory
|
||||
import net.corda.core.node.ServiceHub
|
||||
import net.corda.core.node.recordTransactions
|
||||
import net.corda.core.node.services.VaultService
|
||||
import net.corda.core.serialization.SingletonSerializeAsToken
|
||||
import net.corda.core.utilities.DUMMY_NOTARY
|
||||
|
@ -9,7 +9,7 @@ import net.corda.testing.TestTransactionDSLInterpreter
|
||||
import org.graphstream.graph.Edge
|
||||
import org.graphstream.graph.Node
|
||||
import org.graphstream.graph.implementations.SingleGraph
|
||||
import kotlin.reflect.memberProperties
|
||||
import kotlin.reflect.full.memberProperties
|
||||
|
||||
@Suppress("unused") // TODO: Re-evaluate by EOY2016 if this code is still useful and if not, delete.
|
||||
class GraphVisualiser(val dsl: LedgerDSL<TestTransactionDSLInterpreter, TestLedgerDSLInterpreter>) {
|
||||
|
Reference in New Issue
Block a user