[CORDA-2219] Show message if CorDapp already exists (#4236)

* [CORDA-2219] Show message if CorDapp already exists

* Update definition of `net.corda.core.node.services.Vault$StateMetadata` in `api-current.txt` or else diff tool gets very confused.
This commit is contained in:
Hristo Gatsinski 2018-11-14 19:50:55 +02:00 committed by Viktor Kolomeyko
parent 4059966ccb
commit eb9bd10da0
2 changed files with 23 additions and 1 deletions

View File

@ -3292,8 +3292,12 @@ public static final class net.corda.core.node.services.Vault$Page extends java.l
@CordaSerializable
public static final class net.corda.core.node.services.Vault$StateMetadata extends java.lang.Object
public <init>(net.corda.core.contracts.StateRef, String, java.time.Instant, java.time.Instant, net.corda.core.node.services.Vault$StateStatus, net.corda.core.identity.AbstractParty, String, java.time.Instant)
public <init>(net.corda.core.contracts.StateRef, String, java.time.Instant, java.time.Instant, net.corda.core.node.services.Vault$StateStatus, net.corda.core.identity.AbstractParty, String, java.time.Instant, net.corda.core.node.services.Vault$RelevancyStatus)
public <init>(net.corda.core.contracts.StateRef, String, java.time.Instant, java.time.Instant, net.corda.core.node.services.Vault$StateStatus, net.corda.core.identity.AbstractParty, String, java.time.Instant, net.corda.core.node.services.Vault$RelevancyStatus, net.corda.core.node.services.Vault$ConstraintInfo)
@NotNull
public final net.corda.core.contracts.StateRef component1()
@Nullable
public final net.corda.core.node.services.Vault$ConstraintInfo component10()
@NotNull
public final String component2()
@NotNull
@ -3308,10 +3312,18 @@ public static final class net.corda.core.node.services.Vault$StateMetadata exten
public final String component7()
@Nullable
public final java.time.Instant component8()
@Nullable
public final net.corda.core.node.services.Vault$RelevancyStatus component9()
@NotNull
public final net.corda.core.node.services.Vault$StateMetadata copy(net.corda.core.contracts.StateRef, String, java.time.Instant, java.time.Instant, net.corda.core.node.services.Vault$StateStatus, net.corda.core.identity.AbstractParty, String, java.time.Instant)
@NotNull
public final net.corda.core.node.services.Vault$StateMetadata copy(net.corda.core.contracts.StateRef, String, java.time.Instant, java.time.Instant, net.corda.core.node.services.Vault$StateStatus, net.corda.core.identity.AbstractParty, String, java.time.Instant, net.corda.core.node.services.Vault$RelevancyStatus)
@NotNull
public final net.corda.core.node.services.Vault$StateMetadata copy(net.corda.core.contracts.StateRef, String, java.time.Instant, java.time.Instant, net.corda.core.node.services.Vault$StateStatus, net.corda.core.identity.AbstractParty, String, java.time.Instant, net.corda.core.node.services.Vault$RelevancyStatus, net.corda.core.node.services.Vault$ConstraintInfo)
public boolean equals(Object)
@Nullable
public final net.corda.core.node.services.Vault$ConstraintInfo getConstraintInfo()
@Nullable
public final java.time.Instant getConsumedTime()
@NotNull
public final String getContractStateClassName()
@ -3325,9 +3337,12 @@ public static final class net.corda.core.node.services.Vault$StateMetadata exten
public final java.time.Instant getRecordedTime()
@NotNull
public final net.corda.core.contracts.StateRef getRef()
@Nullable
public final net.corda.core.node.services.Vault$RelevancyStatus getRelevancyStatus()
@NotNull
public final net.corda.core.node.services.Vault$StateStatus getStatus()
public int hashCode()
@NotNull
public String toString()
##
@CordaSerializable

View File

@ -33,6 +33,7 @@ import net.corda.serialization.internal.amqp.AbstractAMQPSerializationScheme
import net.corda.serialization.internal.amqp.amqpMagic
import java.io.File
import java.io.InputStream
import java.nio.file.FileAlreadyExistsException
import java.nio.file.Path
import java.nio.file.StandardCopyOption.REPLACE_EXISTING
import java.security.PublicKey
@ -226,7 +227,13 @@ internal constructor(private val initSerEnv: Boolean,
println("Copying CorDapp JARs into node directories")
for (nodeDir in nodeDirs) {
val cordappsDir = (nodeDir / "cordapps").createDirectories()
cordappJars.forEach { it.copyToDirectory(cordappsDir) }
cordappJars.forEach {
try {
it.copyToDirectory(cordappsDir)
} catch (e: FileAlreadyExistsException) {
println("WARNING: ${it.fileName} already exists in $cordappsDir, ignoring and leaving existing CorDapp untouched")
}
}
}
}
generateServiceIdentitiesForNotaryClusters(configs)