1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 01:15:29 +02:00

Bug 573677: Mark methods that don't handle commands well as deprecated

Some of these commands work "by accident" on Windows, but there are lots
of special/corner cases that may not. On Linux they almost certainly
never do the correct thing when spaces are in arguments.

Change-Id: Idce714da9c1d6ac7a67dc174d5b30bf619534c53
This commit is contained in:
Jonah Graham 2021-05-23 00:14:38 -04:00
parent a4963b35ad
commit 1557c2c4f5

View file

@ -72,6 +72,10 @@ public class Spawner extends Process {
InputStream err;
private PTY fPty;
/**
* @deprecated Do not use this method it splits command line arguments on whitespace with no regard to quoting rules. See Bug 573677
*/
@Deprecated
public Spawner(String command, boolean bNoRedirect) throws IOException {
StringTokenizer tokenizer = new StringTokenizer(command);
String[] cmdarray = new String[tokenizer.countTokens()];
@ -104,7 +108,9 @@ public class Spawner extends Process {
/**
* Executes the specified string command in a separate process.
**/
* @deprecated Do not use this method it splits command line arguments on whitespace with no regard to quoting rules. See Bug 573677
*/
@Deprecated
protected Spawner(String command) throws IOException {
this(command, null);
}
@ -127,7 +133,9 @@ public class Spawner extends Process {
/**
* Executes the specified string command in a separate process with the specified
* environment.
**/
* @deprecated Do not use this method it splits command line arguments on whitespace with no regard to quoting rules. See Bug 573677
*/
@Deprecated
protected Spawner(String cmd, String[] envp) throws IOException {
this(cmd, envp, null);
}
@ -135,7 +143,9 @@ public class Spawner extends Process {
/**
* Executes the specified string command in a separate process with the specified
* environment and working directory.
**/
* @deprecated Do not use this method it splits command line arguments on whitespace with no regard to quoting rules. See Bug 573677
*/
@Deprecated
protected Spawner(String command, String[] envp, File dir) throws IOException {
StringTokenizer tokenizer = new StringTokenizer(command);
String[] cmdarray = new String[tokenizer.countTokens()];