From e49d3aa834642bea960d9af87ab659b700608000 Mon Sep 17 00:00:00 2001 From: Andrzej Cichocki Date: Thu, 17 Aug 2017 18:05:19 +0100 Subject: [PATCH] Use native VisibleForTesting everywhere. (#1189) --- .../net/corda/core/internal/concurrent/CordaFutureImpl.kt | 2 +- finance/src/main/kotlin/net/corda/contracts/asset/Obligation.kt | 2 +- node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt | 2 +- .../kotlin/net/corda/node/services/api/ServiceHubInternal.kt | 2 +- .../net/corda/node/services/network/InMemoryNetworkMapCache.kt | 2 +- .../kotlin/net/corda/node/services/network/NetworkMapService.kt | 2 +- .../net/corda/node/services/persistence/DBTransactionStorage.kt | 2 +- .../corda/node/services/persistence/NodeAttachmentService.kt | 2 +- .../corda/node/services/statemachine/FlowLogicRefFactoryImpl.kt | 2 +- .../kotlin/net/corda/node/services/vault/NodeVaultService.kt | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/src/main/kotlin/net/corda/core/internal/concurrent/CordaFutureImpl.kt b/core/src/main/kotlin/net/corda/core/internal/concurrent/CordaFutureImpl.kt index cc60db5386..e9a949d2e9 100644 --- a/core/src/main/kotlin/net/corda/core/internal/concurrent/CordaFutureImpl.kt +++ b/core/src/main/kotlin/net/corda/core/internal/concurrent/CordaFutureImpl.kt @@ -1,6 +1,6 @@ package net.corda.core.internal.concurrent -import com.google.common.annotations.VisibleForTesting +import net.corda.core.internal.VisibleForTesting import net.corda.core.concurrent.CordaFuture import net.corda.core.concurrent.match import net.corda.core.utilities.getOrThrow diff --git a/finance/src/main/kotlin/net/corda/contracts/asset/Obligation.kt b/finance/src/main/kotlin/net/corda/contracts/asset/Obligation.kt index 94fd65cb3a..73d76f5de7 100644 --- a/finance/src/main/kotlin/net/corda/contracts/asset/Obligation.kt +++ b/finance/src/main/kotlin/net/corda/contracts/asset/Obligation.kt @@ -1,6 +1,6 @@ package net.corda.contracts.asset -import com.google.common.annotations.VisibleForTesting +import net.corda.core.internal.VisibleForTesting import net.corda.contracts.NetCommand import net.corda.contracts.NetType import net.corda.contracts.NettableState diff --git a/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt b/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt index 914be297d7..84da8e024c 100644 --- a/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt +++ b/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt @@ -1,7 +1,7 @@ package net.corda.node.internal import com.codahale.metrics.MetricRegistry -import com.google.common.annotations.VisibleForTesting +import net.corda.core.internal.VisibleForTesting import com.google.common.collect.Lists import com.google.common.collect.MutableClassToInstanceMap import com.google.common.util.concurrent.MoreExecutors diff --git a/node/src/main/kotlin/net/corda/node/services/api/ServiceHubInternal.kt b/node/src/main/kotlin/net/corda/node/services/api/ServiceHubInternal.kt index 2005010b83..192f4a0b55 100644 --- a/node/src/main/kotlin/net/corda/node/services/api/ServiceHubInternal.kt +++ b/node/src/main/kotlin/net/corda/node/services/api/ServiceHubInternal.kt @@ -1,6 +1,6 @@ package net.corda.node.services.api -import com.google.common.annotations.VisibleForTesting +import net.corda.core.internal.VisibleForTesting import net.corda.core.concurrent.CordaFuture import net.corda.core.crypto.SecureHash import net.corda.core.flows.FlowInitiator diff --git a/node/src/main/kotlin/net/corda/node/services/network/InMemoryNetworkMapCache.kt b/node/src/main/kotlin/net/corda/node/services/network/InMemoryNetworkMapCache.kt index 3af8f164e6..3ae68413d7 100644 --- a/node/src/main/kotlin/net/corda/node/services/network/InMemoryNetworkMapCache.kt +++ b/node/src/main/kotlin/net/corda/node/services/network/InMemoryNetworkMapCache.kt @@ -1,6 +1,6 @@ package net.corda.node.services.network -import com.google.common.annotations.VisibleForTesting +import net.corda.core.internal.VisibleForTesting import net.corda.core.concurrent.CordaFuture import net.corda.core.internal.bufferUntilSubscribed import net.corda.core.identity.AbstractParty diff --git a/node/src/main/kotlin/net/corda/node/services/network/NetworkMapService.kt b/node/src/main/kotlin/net/corda/node/services/network/NetworkMapService.kt index b5d5aa729b..0fed3ea12b 100644 --- a/node/src/main/kotlin/net/corda/node/services/network/NetworkMapService.kt +++ b/node/src/main/kotlin/net/corda/node/services/network/NetworkMapService.kt @@ -1,6 +1,6 @@ package net.corda.node.services.network -import com.google.common.annotations.VisibleForTesting +import net.corda.core.internal.VisibleForTesting import net.corda.core.internal.ThreadBox import net.corda.core.crypto.DigitalSignature import net.corda.core.crypto.SignedData diff --git a/node/src/main/kotlin/net/corda/node/services/persistence/DBTransactionStorage.kt b/node/src/main/kotlin/net/corda/node/services/persistence/DBTransactionStorage.kt index fb637abd4c..0e68c98cce 100644 --- a/node/src/main/kotlin/net/corda/node/services/persistence/DBTransactionStorage.kt +++ b/node/src/main/kotlin/net/corda/node/services/persistence/DBTransactionStorage.kt @@ -1,6 +1,6 @@ package net.corda.node.services.persistence -import com.google.common.annotations.VisibleForTesting +import net.corda.core.internal.VisibleForTesting import net.corda.core.internal.bufferUntilSubscribed import net.corda.core.crypto.SecureHash import net.corda.core.messaging.DataFeed diff --git a/node/src/main/kotlin/net/corda/node/services/persistence/NodeAttachmentService.kt b/node/src/main/kotlin/net/corda/node/services/persistence/NodeAttachmentService.kt index 7dac06f5a0..9b79915a13 100644 --- a/node/src/main/kotlin/net/corda/node/services/persistence/NodeAttachmentService.kt +++ b/node/src/main/kotlin/net/corda/node/services/persistence/NodeAttachmentService.kt @@ -1,7 +1,7 @@ package net.corda.node.services.persistence import com.codahale.metrics.MetricRegistry -import com.google.common.annotations.VisibleForTesting +import net.corda.core.internal.VisibleForTesting import com.google.common.hash.HashCode import com.google.common.hash.Hashing import com.google.common.hash.HashingInputStream diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/FlowLogicRefFactoryImpl.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/FlowLogicRefFactoryImpl.kt index 150143cc34..6d16a94db5 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/FlowLogicRefFactoryImpl.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/FlowLogicRefFactoryImpl.kt @@ -1,6 +1,6 @@ package net.corda.node.services.statemachine -import com.google.common.annotations.VisibleForTesting +import net.corda.core.internal.VisibleForTesting import com.google.common.primitives.Primitives import net.corda.core.flows.* import net.corda.core.serialization.CordaSerializable diff --git a/node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt b/node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt index 88eb992172..03c61a1f76 100644 --- a/node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt +++ b/node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt @@ -2,7 +2,7 @@ package net.corda.node.services.vault import co.paralleluniverse.fibers.Suspendable import co.paralleluniverse.strands.Strand -import com.google.common.annotations.VisibleForTesting +import net.corda.core.internal.VisibleForTesting import io.requery.PersistenceException import io.requery.kotlin.eq import io.requery.query.RowExpression