mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Java: Add content based example with multiple paths.
This commit is contained in:
13
java/ql/test/utils/modelgenerator/dataflow/p/MultiPaths.java
Normal file
13
java/ql/test/utils/modelgenerator/dataflow/p/MultiPaths.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package p;
|
||||
|
||||
public class MultiPaths {
|
||||
|
||||
// summary=p;MultiPaths;true;cond;(String,String);;Argument[0];ReturnValue;taint;df-generated
|
||||
// contentbased-summary=p;MultiPaths;true;cond;(String,String);;Argument[0];ReturnValue;value;df-generated
|
||||
public String cond(String x, String other) {
|
||||
if (x == other) {
|
||||
return x.substring(0, 100);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user