Skip to content

Commit 4c76adc

Browse files
authored
Merge pull request #124 from piotrhoppe/the-run-parameters-issue
Replace a split method by a StringTokenizer clas to parse run param.
2 parents 5aa8f1f + ce4077a commit 4c76adc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/netbeans/modules/python/actions/PythonRun.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import java.util.List;
88
import java.util.Properties;
99
import java.util.logging.Logger;
10+
import org.apache.commons.text.StringTokenizer;
11+
import org.apache.commons.text.matcher.StringMatcherFactory;
1012
import org.netbeans.api.extexecution.ExecutionService;
1113
import org.netbeans.api.project.Project;
1214
import org.netbeans.modules.python.PythonOutputLine;
@@ -57,8 +59,7 @@ public static List<String> getRunArgs(Project owner, DataObject context, boolean
5759
if (owner != null) {
5860
Properties prop = PythonUtility.getProperties(owner, false);
5961
if (!prop.getProperty("nbproject.run.params", "").isEmpty()) {
60-
params = prop.getProperty("nbproject.run.params", "")
61-
.split(" ");
62+
params = new StringTokenizer(prop.getProperty("nbproject.run.params", ""), StringMatcherFactory.INSTANCE.spaceMatcher(), StringMatcherFactory.INSTANCE.quoteMatcher()).getTokenArray();
6263
}
6364
}
6465
if (owner != null && PythonUtility.isPoetry((PythonProject) owner) && !isDebug) {

0 commit comments

Comments
 (0)