Minor: fix some compiler warnings

This commit is contained in:
Mike Hearn 2016-05-13 12:58:17 +02:00
parent 506441977f
commit 81c698a260
5 changed files with 5 additions and 7 deletions

View File

@ -25,6 +25,6 @@ class SignedDataTest {
val keyPairB = generateKeyPair()
val sig = keyPairA.private.signWithECDSA(serialized.bits, keyPairB.public)
val wrappedData = SignedData(serialized, sig)
val unwrappedData = wrappedData.verified()
wrappedData.verified()
}
}

View File

@ -115,7 +115,7 @@ abstract class AbstractNode(val dir: Path, val configuration: NodeConfiguration,
require(initialNetworkMapAddress == null || NetworkMapService.Type in initialNetworkMapAddress.advertisedServices)
{ "Initial network map address must indicate a node that provides a network map service" }
configureNetworkMapCache(initialNetworkMapAddress)
configureNetworkMapCache()
return this
}
@ -123,7 +123,7 @@ abstract class AbstractNode(val dir: Path, val configuration: NodeConfiguration,
* Register this node with the network map cache, and load network map from a remote service (and register for
* updates) if one has been supplied.
*/
private fun configureNetworkMapCache(networkMapAddress: NodeInfo?) {
private fun configureNetworkMapCache() {
services.networkMapCache.addNode(info)
if (initialNetworkMapAddress != null) {
// TODO: Return a future so the caller knows these operations may not have completed yet, and can monitor

View File

@ -285,8 +285,8 @@ class NodeRegistration(val node: NodeInfo, val serial: Long, val type: AddOrRemo
*/
class WireNodeRegistration(raw: SerializedBytes<NodeRegistration>, sig: DigitalSignature.WithKey) : SignedData<NodeRegistration>(raw, sig) {
@Throws(IllegalArgumentException::class)
override fun verifyData(reg: NodeRegistration) {
require(reg.node.identity.owningKey == sig.by)
override fun verifyData(data: NodeRegistration) {
require(data.node.identity.owningKey == sig.by)
}
}

View File

@ -366,7 +366,6 @@ object TwoPartyDealProtocol {
val myName = serviceHub.storageService.myLegalIdentity.name
val deal: T = dealToFix.state
val myOldParty = deal.parties.single { it.name == myName }
val theirOldParty = deal.parties.single { it.name != myName }
@Suppress("UNCHECKED_CAST")
val newDeal = deal

View File

@ -188,7 +188,6 @@ class TwoPartyTradeProtocolTests {
// Creates a mock node with an overridden storage service that uses a RecordingMap, that lets us test the order
// of gets and puts.
private fun makeNodeWithTracking(name: String): MockNetwork.MockNode {
val networkMapAddr: NodeInfo? = null
// Create a node in the mock network ...
return net.createNode(null, nodeFactory = object : MockNetwork.Factory {
override fun create(dir: Path, config: NodeConfiguration, network: MockNetwork, networkMapAddr: NodeInfo?,