[CORDA-1569]: Shell doesn't yield control back to the user after a completed flow and throws NullPointerExceptions (#3281)

* [CORDA-1569]: Shell doesn't yield control back to the user after a completed flow and throws NullPointerExceptions
This commit is contained in:
Michele Sollecito 2018-05-31 18:50:35 +01:00 committed by GitHub
parent 51c359c48d
commit 52fa86079b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 3 deletions

View File

@ -36,7 +36,7 @@ public class FlowShellCommand extends InteractiveShellCommand {
@Usage("The class name of the flow to run, or an unambiguous substring") @Argument String name,
@Usage("The data to pass as input") @Argument(unquote = false) List<String> input
) {
logger.info("Executing command \"flow start {} {}\",", name, input.stream().collect(joining(" ")));
logger.info("Executing command \"flow start {} {}\",", name, (input != null) ? input.stream().collect(joining(" ")) : "<no arguments>");
startFlow(name, input, out, ops(), ansiProgressRenderer(), objectMapper());
}

View File

@ -37,7 +37,7 @@ public class RunShellCommand extends InteractiveShellCommand {
)
@Usage("runs a method from the CordaRPCOps interface on the node.")
public Object main(InvocationContext<Map> context, @Usage("The command to run") @Argument(unquote = false) List<String> command) {
logger.info("Executing command \"run {}\",", command.stream().collect(joining(" ")));
logger.info("Executing command \"run {}\",", (command != null) ? command.stream().collect(joining(" ")) : "<no arguments>");
StringToMethodCallParser<CordaRPCOps> parser = new StringToMethodCallParser<>(CordaRPCOps.class, objectMapper());
if (command == null) {

View File

@ -21,7 +21,7 @@ public class StartShellCommand extends InteractiveShellCommand {
public void main(@Usage("The class name of the flow to run, or an unambiguous substring") @Argument String name,
@Usage("The data to pass as input") @Argument(unquote = false) List<String> input) {
logger.info("Executing command \"start {} {}\",", name, input.stream().collect(joining(" ")));
logger.info("Executing command \"start {} {}\",", name, (input != null) ? input.stream().collect(joining(" ")) : "<no arguments>");
ANSIProgressRenderer ansiProgressRenderer = ansiProgressRenderer();
FlowShellCommand.startFlow(name, input, out, ops(), ansiProgressRenderer != null ? ansiProgressRenderer : new CRaSHANSIProgressRenderer(out), objectMapper());
}

View File

@ -281,6 +281,7 @@ object InteractiveShell {
while (!Thread.currentThread().isInterrupted) {
try {
latch.await()
break
} catch (e: InterruptedException) {
try {
rpcOps.killFlow(stateObservable.id)