From 1d5f409c66f7491987bdb3c2a6dd927f8bae330d Mon Sep 17 00:00:00 2001 From: Matthew Nesbit Date: Fri, 20 May 2016 16:39:35 +0100 Subject: [PATCH] Remove unnecessary .Companion statements brought in during refactoring. --- contracts/src/main/java/contracts/JavaCommercialPaper.java | 2 +- core/src/main/kotlin/core/testing/TestUtils.kt | 4 ++-- node/src/test/kotlin/node/services/NotaryServiceTests.kt | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contracts/src/main/java/contracts/JavaCommercialPaper.java b/contracts/src/main/java/contracts/JavaCommercialPaper.java index 7b283c31f7..39d1cd5d8f 100644 --- a/contracts/src/main/java/contracts/JavaCommercialPaper.java +++ b/contracts/src/main/java/contracts/JavaCommercialPaper.java @@ -88,7 +88,7 @@ public class JavaCommercialPaper implements Contract { @Override public Contract getContract() { return JCP_PROGRAM_ID; - //return SecureHash.Companion.sha256("java commercial paper (this should be a bytecode hash)"); + //return SecureHash.sha256("java commercial paper (this should be a bytecode hash)"); } @Override diff --git a/core/src/main/kotlin/core/testing/TestUtils.kt b/core/src/main/kotlin/core/testing/TestUtils.kt index e34c79c0e2..065501ea21 100644 --- a/core/src/main/kotlin/core/testing/TestUtils.kt +++ b/core/src/main/kotlin/core/testing/TestUtils.kt @@ -73,7 +73,7 @@ val ALL_TEST_KEYS = listOf(MEGA_CORP_KEY, MINI_CORP_KEY, ALICE_KEY, BOB_KEY, DUM val MOCK_IDENTITY_SERVICE = MockIdentityService(listOf(MEGA_CORP, MINI_CORP, DUMMY_NOTARY)) -fun generateStateRef() = StateRef(SecureHash.Companion.randomSHA256(), 0) +fun generateStateRef() = StateRef(SecureHash.randomSHA256(), 0) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // @@ -146,7 +146,7 @@ open class TransactionForTest : AbstractTransactionForTest() { protected fun runCommandsAndVerify(time: Instant) { val cmds = commandsToAuthenticatedObjects() - val tx = TransactionForVerification(inStates, outStates.map { it.state }, emptyList(), cmds, SecureHash.Companion.randomSHA256()) + val tx = TransactionForVerification(inStates, outStates.map { it.state }, emptyList(), cmds, SecureHash.randomSHA256()) tx.verify() } diff --git a/node/src/test/kotlin/node/services/NotaryServiceTests.kt b/node/src/test/kotlin/node/services/NotaryServiceTests.kt index 68a84f1cb3..88a1052192 100644 --- a/node/src/test/kotlin/node/services/NotaryServiceTests.kt +++ b/node/src/test/kotlin/node/services/NotaryServiceTests.kt @@ -37,7 +37,7 @@ class NotaryServiceTests { tx.setTime(Instant.now(), DUMMY_NOTARY, 30.seconds) var wtx = tx.toWireTransaction() - val protocol = NotaryProtocol(wtx, NotaryProtocol.Companion.tracker()) + val protocol = NotaryProtocol(wtx, NotaryProtocol.tracker()) val future = clientNode.smm.add(NotaryProtocol.TOPIC, protocol) net.runNetwork() @@ -49,7 +49,7 @@ class NotaryServiceTests { val inputState = issueState(clientNode) val wtx = TransactionBuilder().withItems(inputState).toWireTransaction() - val protocol = NotaryProtocol(wtx, NotaryProtocol.Companion.tracker()) + val protocol = NotaryProtocol(wtx, NotaryProtocol.tracker()) val future = clientNode.smm.add(NotaryProtocol.TOPIC, protocol) net.runNetwork() @@ -63,7 +63,7 @@ class NotaryServiceTests { tx.setTime(Instant.now().plusSeconds(3600), DUMMY_NOTARY, 30.seconds) var wtx = tx.toWireTransaction() - val protocol = NotaryProtocol(wtx, NotaryProtocol.Companion.tracker()) + val protocol = NotaryProtocol(wtx, NotaryProtocol.tracker()) val future = clientNode.smm.add(NotaryProtocol.TOPIC, protocol) net.runNetwork()