Fixed various compiler warnings, mostly removing unused parameters and replacing calls to getDevX509Name with getX509Name with specific data, this should be a nullop. Remainign compiler warnings will require changing semantics of code

This commit is contained in:
Scott James
2017-06-15 17:57:12 +01:00
committed by Mike Hearn
parent a6853be035
commit aab536646f
17 changed files with 32 additions and 35 deletions

View File

@ -32,7 +32,7 @@ public class FlowShellCommand extends InteractiveShellCommand {
@Command
@Usage("watch information about state machines running on the node with result information")
public void watch(InvocationContext<TableElement> context) throws Exception {
runStateMachinesView(out, context);
runStateMachinesView(out);
}
static void startFlow(@Usage("The class name of the flow to run, or an unambiguous substring") @Argument String name,

View File

@ -63,7 +63,6 @@ class InMemoryIdentityService(identities: Iterable<PartyAndCertificate>,
// trust anchor everywhere, this will have to do.
PKIXParameters(setOf(TrustAnchor(party.certificate.cert, null)))
}
val validator = CertPathValidator.getInstance("PKIX")
validatorParameters.isRevocationEnabled = false
// TODO: val result = validator.validate(party.certPath, validatorParameters) as PKIXCertPathValidatorResult
// require(trustAnchor == null || result.trustAnchor == trustAnchor)

View File

@ -68,7 +68,7 @@ class DistributedImmutableMap<K : Any, V : Any>(val db: Database, tableName: Str
}
fun size(commit: Commit<Commands.Size>): Int {
commit.use { commit ->
commit.use { _ ->
return db.transaction { map.size }
}
}

View File

@ -40,7 +40,6 @@ import org.crsh.shell.ShellFactory
import org.crsh.shell.impl.command.ExternalResolver
import org.crsh.text.Color
import org.crsh.text.RenderPrintWriter
import org.crsh.text.ui.TableElement
import org.crsh.util.InterruptHandler
import org.crsh.util.Utils
import org.crsh.vfs.FS
@ -307,7 +306,7 @@ object InteractiveShell {
// TODO Filtering on error/success when we will have some sort of flow auditing, for now it doesn't make much sense.
@JvmStatic
fun runStateMachinesView(out: RenderPrintWriter, context: InvocationContext<TableElement>): Any? {
fun runStateMachinesView(out: RenderPrintWriter): Any? {
val proxy = node.rpcOps
val (stateMachines, stateMachineUpdates) = proxy.stateMachinesAndUpdates()
val currentStateMachines = stateMachines.map { StateMachineUpdate.Added(it) }

View File

@ -120,7 +120,7 @@ public class VaultQueryJavaTests {
fillWithSomeTestLinearStates(services, 10, uid);
List<String> dealIds = Arrays.asList("123", "456", "789");
fillWithSomeTestDeals(services, dealIds, 0);
fillWithSomeTestDeals(services, dealIds);
// DOCSTART VaultJavaQueryExample2
Vault.StateStatus status = Vault.StateStatus.CONSUMED;
@ -191,7 +191,7 @@ public class VaultQueryJavaTests {
fillWithSomeTestLinearStates(services, 10, uid);
List<String> dealIds = Arrays.asList("123", "456", "789");
fillWithSomeTestDeals(services, dealIds, 0);
fillWithSomeTestDeals(services, dealIds);
// DOCSTART VaultJavaQueryExample2
@SuppressWarnings("unchecked")

View File

@ -207,7 +207,7 @@ class VaultQueryTests {
database.transaction {
services.fillWithSomeTestLinearStates(2, UniqueIdentifier("TEST"), participants = listOf(MEGA_CORP, MINI_CORP))
services.fillWithSomeTestDeals(listOf("456"), 3, participants = listOf(MEGA_CORP, BIG_CORP))
services.fillWithSomeTestDeals(listOf("456"), participants = listOf(MEGA_CORP, BIG_CORP))
services.fillWithSomeTestDeals(listOf("123", "789"), participants = listOf(BIG_CORP, MINI_CORP))
// DOCSTART VaultQueryExample5
@ -533,7 +533,7 @@ class VaultQueryTests {
database.transaction {
services.fillWithSomeTestLinearStates(2, UniqueIdentifier("TEST"))
services.fillWithSomeTestDeals(listOf("456"), 3) // create 3 revisions with same ID
services.fillWithSomeTestDeals(listOf("456")) // create 3 revisions with same ID
services.fillWithSomeTestDeals(listOf("123", "789"))
val criteria = LinearStateQueryCriteria(dealRef = listOf("456"), latestOnly = true)
@ -547,7 +547,7 @@ class VaultQueryTests {
database.transaction {
services.fillWithSomeTestLinearStates(2, UniqueIdentifier("TEST"))
services.fillWithSomeTestDeals(listOf("456"), 3) // specify party
services.fillWithSomeTestDeals(listOf("456")) // specify party
services.fillWithSomeTestDeals(listOf("123", "789"))
// DOCSTART VaultQueryExample11