mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
Exclude models for simpler types
Avoid generating models for types that can't really propagate taint in a valuable way (e.g. primitivies, BigInt, ..). Keep tracking bulk-like data (e.g. char[] or byte[]).
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package p;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public final class Pojo {
|
||||
@@ -37,6 +39,34 @@ public final class Pojo {
|
||||
return intValue;
|
||||
}
|
||||
|
||||
public Integer getBoxedValue() {
|
||||
return Integer.valueOf(intValue);
|
||||
}
|
||||
|
||||
public int[] getPrimitiveArray() {
|
||||
return new int[] { intValue };
|
||||
}
|
||||
|
||||
public char[] getCharArray() {
|
||||
return Character.toChars(intValue);
|
||||
}
|
||||
|
||||
public byte[] getByteArray() {
|
||||
return new byte[] { (byte) intValue };
|
||||
}
|
||||
|
||||
public Integer[] getBoxedArray() {
|
||||
return new Integer[] { Integer.valueOf(intValue) };
|
||||
}
|
||||
|
||||
public Collection<Integer> getBoxedCollection() {
|
||||
return List.of(Integer.valueOf(intValue));
|
||||
}
|
||||
|
||||
public BigInteger getBigInt() {
|
||||
return BigInteger.valueOf(intValue);
|
||||
}
|
||||
|
||||
public void fillIn(List<String> target) {
|
||||
target.add(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user