Nightly update
This commit is contained in:
parent
62aca74c73
commit
146b342a7e
@ -9,7 +9,10 @@ include::../recommended.adoc[]
|
||||
The full path of the command is not specified and thus the executable will be searched in all directories listed in the ``++PATH++`` environment variable:
|
||||
|
||||
----
|
||||
System.Runtime.getRuntime().exec("make"); // Sensitive
|
||||
Runtime.getRuntime().exec("make"); // Sensitive
|
||||
Runtime.getRuntime().exec(new String[]{"make"}); // Sensitive
|
||||
ProcessBuilder builder = new ProcessBuilder("make"); // Sensitive
|
||||
builder.command("make"); // Sensitive
|
||||
----
|
||||
|
||||
== Compliant Solution
|
||||
@ -17,7 +20,14 @@ System.Runtime.getRuntime().exec("make"); // Sensitive
|
||||
The command is defined by its full path:
|
||||
|
||||
----
|
||||
System.Runtime.getRuntime().exec("/usr/bin/make"); // Compliant
|
||||
Runtime.getRuntime().exec("/usr/bin/make"); // Compliant
|
||||
Runtime.getRuntime().exec(new String[]{"~/bin/make"}); // Compliant
|
||||
ProcessBuilder builder = new ProcessBuilder("./bin/make"); // Compliant
|
||||
builder.command("../bin/make"); // Compliant
|
||||
builder.command(Arrays.asList("..\bin\make", "-j8")); // Compliant
|
||||
builder = new ProcessBuilder(Arrays.asList(".\make")); // Compliant
|
||||
builder.command(Arrays.asList("C:\bin\make", "-j8")); // Compliant
|
||||
builder.command(Arrays.asList("\\SERVER\bin\make")); // Compliant
|
||||
----
|
||||
|
||||
include::../see.adoc[]
|
||||
|
Loading…
x
Reference in New Issue
Block a user