On Wed, 3 Nov 2021 14:09:13 GMT, Roger Riggs <[email protected]> wrote:

> The three `java.lang.Runtime.exec` methods that tokenize a command line to 
> produce an array of string arguments are easily misused, sometimes with 
> erroneous results. For example, on some operating systems, spaces are 
> supported in filenames and are in common use.
> 
> The tokenization uses only whitespace characters, ignoring quote characters. 
> It is error prone because quotes may appear in the string but are ignored. 
> The implementation (on Windows) includes a heuristic for the executable 
> argument that tries to re-parse the command line respecting quotes but it is 
> undocumented.

This pull request has now been integrated.

Changeset: 7e73bca0
Author:    Roger Riggs <[email protected]>
URL:       
https://git.openjdk.java.net/jdk/commit/7e73bca0b7a34af9fb73780491951539815651b4
Stats:     30 lines in 5 files changed: 26 ins; 0 del; 4 mod

8276408: Deprecate Runtime.exec methods with a single string command line 
argument

Reviewed-by: alanb

-------------

PR: https://git.openjdk.java.net/jdk/pull/6233

Reply via email to