Skip to content

Commit 29d4b6f

Browse files
committed
Re-add public classes that shouldn't be removed yet
1 parent 2fd2c43 commit 29d4b6f

File tree

1 file changed

+34
-0
lines changed
  • java/ql/lib/semmle/code/java

1 file changed

+34
-0
lines changed

java/ql/lib/semmle/code/java/JDK.qll

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*/
44

55
import Member
6+
import semmle.code.java.security.ExternalProcess
67
private import semmle.code.java.dataflow.FlowSteps
78

89
// --- Standard types ---
@@ -197,6 +198,39 @@ class TypeFile extends Class {
197198
}
198199

199200
// --- Standard methods ---
201+
/**
202+
* DEPRECATED: Any constructor of class `java.lang.ProcessBuilder`.
203+
*/
204+
deprecated class ProcessBuilderConstructor extends Constructor, ExecCallable {
205+
ProcessBuilderConstructor() { this.getDeclaringType() instanceof TypeProcessBuilder }
206+
207+
override int getAnExecutedArgument() { result = 0 }
208+
}
209+
210+
/**
211+
* DEPRECATED: Any of the methods named `command` on class `java.lang.ProcessBuilder`.
212+
*/
213+
deprecated class MethodProcessBuilderCommand extends Method, ExecCallable {
214+
MethodProcessBuilderCommand() {
215+
this.hasName("command") and
216+
this.getDeclaringType() instanceof TypeProcessBuilder
217+
}
218+
219+
override int getAnExecutedArgument() { result = 0 }
220+
}
221+
222+
/**
223+
* DEPRECATED: Any method named `exec` on class `java.lang.Runtime`.
224+
*/
225+
deprecated class MethodRuntimeExec extends Method, ExecCallable {
226+
MethodRuntimeExec() {
227+
this.hasName("exec") and
228+
this.getDeclaringType() instanceof TypeRuntime
229+
}
230+
231+
override int getAnExecutedArgument() { result = 0 }
232+
}
233+
200234
/**
201235
* Any method named `getenv` on class `java.lang.System`.
202236
*/

0 commit comments

Comments
 (0)