diff --git a/docs/source/release-notes.rst b/docs/source/release-notes.rst index da8cf42be4..9656544a9b 100644 --- a/docs/source/release-notes.rst +++ b/docs/source/release-notes.rst @@ -99,6 +99,8 @@ The following lists known issues identified in this release. We will endeavour t * Doorman crashes ungracefully when started with incorrect or no program arguments. Should display a meaningful message instead. [ENT-1661] +* The finance CorDapp from Open Source versions 3.0 and 3.1 cannot be loaded on Enterprise 3.0 GA. Use the Enterprise CorDapp on any Open Source nodes in a mixed network instead, or use contract whitelisting. [ENT-2040] + * Exception when starting a Corda node against a non-H2 database the first time. [ENT-1635] This means the :ref:`database schema management ` process should be performed but the exception is confusing. @@ -137,4 +139,4 @@ and simply requires setting two Gradle build file variables: Please note this release is distributed under the evaluation license and should not be used in a Production environment yet. -We look forward to hearing your feedback on this release! \ No newline at end of file +We look forward to hearing your feedback on this release! diff --git a/finance/src/main/kotlin/net/corda/finance/flows/CashConfigDataFlow.kt b/finance/src/main/kotlin/net/corda/finance/flows/CashConfigDataFlow.kt index 2b242e568d..a9eafda2ac 100644 --- a/finance/src/main/kotlin/net/corda/finance/flows/CashConfigDataFlow.kt +++ b/finance/src/main/kotlin/net/corda/finance/flows/CashConfigDataFlow.kt @@ -15,8 +15,6 @@ import com.typesafe.config.ConfigFactory import net.corda.core.flows.FlowLogic import net.corda.core.flows.StartableByRPC import net.corda.core.internal.declaredField -import net.corda.core.internal.div -import net.corda.core.internal.read import net.corda.core.node.AppServiceHub import net.corda.core.node.services.CordaService import net.corda.core.serialization.CordaSerializable @@ -26,7 +24,15 @@ import net.corda.finance.EUR import net.corda.finance.GBP import net.corda.finance.USD import net.corda.finance.flows.ConfigHolder.Companion.supportedCurrencies +import java.io.BufferedReader import java.io.IOException +import java.io.InputStream +import java.nio.charset.Charset +import java.nio.charset.StandardCharsets.UTF_8 +import java.nio.file.Files +import java.nio.file.OpenOption +import java.nio.file.Path +import java.nio.file.Paths import java.util.* // TODO Until apps have access to their own config, we'll hack things by first getting the baseDirectory, read the node.conf @@ -35,6 +41,13 @@ import java.util.* class ConfigHolder(services: AppServiceHub) : SingletonSerializeAsToken() { companion object { val supportedCurrencies = listOf(USD, GBP, CHF, EUR) + + // TODO: ENT-2040 - After GA, the Finance app should be fully decoupled from use of internal APIs on both OS and ENT! + private operator fun Path.div(other: String): Path = resolve(other) + private operator fun String.div(other: String): Path = Paths.get(this) / other + private fun Path.inputStream(vararg options: OpenOption): InputStream = Files.newInputStream(this, *options) + private fun Path.reader(charset: Charset = UTF_8): BufferedReader = Files.newBufferedReader(this, charset) + private inline fun Path.read(vararg options: OpenOption, block: (InputStream) -> R): R = inputStream(*options).use(block) } val issuableCurrencies: List