Skip to content
This repository

Use Runtime.exec(String[]) in fitnesse.testsystems.CommandRunner #278

Closed
javahelp opened this Issue · 3 comments

2 participants

javahelp Arjan Molenaar
javahelp

In the method fitnesse.testsystems.CommandRunner.asynchronousStart() it uses Java's Runtime.exec() method.

Runtime.exec() has overloaded methods. In some, the command is a String which gets parsed with a java.util.StringTokenizer. In others, the command is already a String[] and does not get further parsed.

On non-Windows OS's, if there happens to be whitespace in the classpath, then Runtime.exec() will fail using the String versions, but the String[] versions work.

Arjan Molenaar
Collaborator

This issue definitely needs some attention. Using a String[] to pass the command line arguments is much saver than relying on a string tokenizer.

How should this work in conjunction with the COMMAND_PATTERN, for example?

Arjan Molenaar
Collaborator

I tried to fix the issues with pull request #437. Can you check if it works out (or what's missing)?

Arjan Molenaar
Collaborator

#437 should fix this.

Arjan Molenaar amolenaar closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.