Intellij bug workaround (#434)

* Workaround for `"bound callable references" is only available since language version 1.1` when using kotlin 1.1.1 plugin.
This commit is contained in:
Patrick Kuo 2017-03-27 15:12:01 +01:00 committed by GitHub
parent c73a2e6034
commit dc06d37369
4 changed files with 8 additions and 0 deletions

View File

@ -72,6 +72,8 @@ class DefaultSerializableSerializer : Serializer<DefaultSerializable>() {
class CordaClassResolverTests {
@Test
fun `Annotation on enum works for specialised entries`() {
// TODO: Remove this suppress when we upgrade to kotlin 1.1 or when JetBrain fixes the bug.
@Suppress("UNSUPPORTED_FEATURE")
CordaClassResolver(EmptyWhitelist).getRegistration(Foo.Bar::class.java)
}

View File

@ -97,6 +97,8 @@ class InterestRateSwapAPI(val rpc: CordaRPCOps) {
val priorDemoDate = fetchDemoDate()
// Can only move date forwards
if (newDemoDate.isAfter(priorDemoDate)) {
// TODO: Remove this suppress when we upgrade to kotlin 1.1 or when JetBrain fixes the bug.
@Suppress("UNSUPPORTED_FEATURE")
rpc.startFlow(UpdateBusinessDayFlow::Broadcast, newDemoDate).returnValue.getOrThrow()
return Response.ok().build()
}

View File

@ -76,6 +76,8 @@ private class NotaryDemoClientApi(val rpc: CordaRPCOps) {
* @return a list of encoded signer public keys - one for every transaction
*/
private fun notariseTransactions(transactions: List<SignedTransaction>): List<String> {
// TODO: Remove this suppress when we upgrade to kotlin 1.1 or when JetBrain fixes the bug.
@Suppress("UNSUPPORTED_FEATURE")
val signatureFutures = transactions.map { rpc.startFlow(NotaryFlow::Client, it).returnValue }
return Futures.allAsList(signatureFutures).getOrThrow().map { it.map { it.by.toStringShort() }.joinToString() }
}

View File

@ -269,6 +269,8 @@ class PortfolioApi(val rpc: CordaRPCOps) {
return withParty(partyName) { otherParty ->
val existingSwap = getPortfolioWith(otherParty)
val flowHandle = if (existingSwap == null) {
// TODO: Remove this suppress when we upgrade to kotlin 1.1 or when JetBrain fixes the bug.
@Suppress("UNSUPPORTED_FEATURE")
rpc.startFlow(SimmFlow::Requester, otherParty, params.valuationDate)
} else {
rpc.startFlow(SimmRevaluation::Initiator, getPortfolioStateAndRefWith(otherParty).ref, params.valuationDate)