Fix up compilation errors.

This commit is contained in:
rick.parker 2018-07-13 14:33:13 +01:00
parent 4e81d26985
commit 21a7b56161
7 changed files with 16 additions and 5 deletions

View File

@ -20,6 +20,7 @@ import net.corda.core.cordapp.CordappContext
import net.corda.core.crypto.*
import net.corda.core.flows.FlowLogic
import net.corda.core.node.ServicesForResolution
import net.corda.core.schemas.MappedSchema
import net.corda.core.serialization.*
import net.corda.core.transactions.LedgerTransaction
import net.corda.core.transactions.SignedTransaction
@ -542,3 +543,8 @@ fun <T : Any> SerializedBytes<Any>.checkPayloadIs(type: Class<T>): Untrustworthy
return type.castIfPossible(payloadData)?.let { UntrustworthyData(it) }
?: throw IllegalArgumentException("We were expecting a ${type.name} but we instead got a ${payloadData.javaClass.name} ($payloadData)")
}
/**
* Extension method to make this method visible to nodeapi module.
*/
fun MappedSchema.getMigrationResource(): String? = this.internalGetMigrationResource()

View File

@ -61,7 +61,7 @@ open class MappedSchema(schemaFamily: Class<*>,
*/
protected open val migrationResource: String? = null
internal fun getMigrationResource(): String? = migrationResource
internal fun internalGetMigrationResource(): String? = migrationResource
override fun toString(): String = "${this.javaClass.simpleName}(name=$name, version=$version)"

View File

@ -8,9 +8,10 @@
* Distribution of this file or any portion thereof via any medium without the express permission of R3 is strictly prohibited.
*/
package net.corda.core.internal
package net.corda.nodeapi.internal
import com.google.common.base.CaseFormat
import net.corda.core.internal.getMigrationResource
import net.corda.core.schemas.MappedSchema
object MigrationHelpers {

View File

@ -20,7 +20,7 @@ import liquibase.database.core.MSSQLDatabase
import liquibase.database.jvm.JdbcConnection
import liquibase.lockservice.LockServiceFactory
import liquibase.resource.ClassLoaderResourceAccessor
import net.corda.core.internal.MigrationHelpers.getMigrationResource
import net.corda.nodeapi.internal.MigrationHelpers.getMigrationResource
import net.corda.core.schemas.MappedSchema
import net.corda.core.utilities.contextLogger
import java.io.ByteArrayInputStream

View File

@ -11,7 +11,7 @@
package net.corda.node.services.persistence
import net.corda.core.identity.AbstractParty
import net.corda.core.internal.MigrationHelpers.migrationResourceNameForSchema
import net.corda.nodeapi.internal.MigrationHelpers.migrationResourceNameForSchema
import net.corda.core.internal.objectOrNewInstance
import net.corda.core.schemas.MappedSchema
import net.corda.nodeapi.internal.persistence.CordaPersistence

View File

@ -230,6 +230,10 @@ class CordaRPCProxyClient(private val targetHostAndPort: NetworkHostAndPort) : C
TODO("not implemented")
}
override fun refreshNetworkMapCache() {
TODO("not implemented")
}
private inline fun <reified T : Any> doPost(hostAndPort: NetworkHostAndPort, path: String, payload: ByteArray) : T {
val url = URL("http://$hostAndPort/rpc/$path")
val connection = url.openHttpConnection().apply {

View File

@ -18,7 +18,7 @@ import joptsimple.OptionException
import joptsimple.OptionParser
import joptsimple.OptionSet
import joptsimple.util.EnumConverter
import net.corda.core.internal.MigrationHelpers
import net.corda.nodeapi.internal.MigrationHelpers
import net.corda.core.internal.div
import net.corda.core.internal.exists
import net.corda.core.schemas.MappedSchema