Skip to content

Commit

Permalink
fixed bug jPPF-534
Browse files Browse the repository at this point in the history
  • Loading branch information
lolocohen committed May 18, 2018
1 parent 3bfa00f commit 4fea5fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/src/java/org/jppf/process/AbstractProcessLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public abstract class AbstractProcessLauncher extends ThreadSynchronization impl
*
*/
private static final Pattern JVM_OPTIONS_PATTERN = Pattern.compile("([^\"\\s]*\"[^\"]*\"[^\"\\s]*|[^\"\\s]*)\\s*");
/**
* Constant for no JVM options.
*/
private static final Pair<List<String>, List<String>> NO_OPTIONS = new Pair<List<String>, List<String>>(new ArrayList<String>(), new ArrayList<String>());
/**
* A reference to the JPPF driver subprocess, used to kill it when the driver launcher exits.
*/
Expand Down Expand Up @@ -81,6 +85,7 @@ public abstract class AbstractProcessLauncher extends ThreadSynchronization impl
* @return A list of jvm options.
*/
protected Pair<List<String>, List<String>> parseJvmOptions(final String source) {
if (source == null) return NO_OPTIONS;
final List<String> options = new ArrayList<>();
final Matcher matcher = JVM_OPTIONS_PATTERN.matcher(source);
while (matcher.find()) {
Expand Down

0 comments on commit 4fea5fe

Please sign in to comment.