mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Java: Update model generator implementation and test expected output.
This commit is contained in:
committed by
Mathias Vorreiter Pedersen
parent
09dc3c88b3
commit
ee83ca9125
@@ -92,7 +92,7 @@ module ModelGeneratorCommonInput implements ModelGeneratorCommonInputSig<Locatio
|
||||
|
||||
string qualifierString() { result = "Argument[this]" }
|
||||
|
||||
string parameterAccess(J::Parameter p) {
|
||||
string parameterApproximateAccess(J::Parameter p) {
|
||||
if
|
||||
p.getType() instanceof J::Array and
|
||||
not isPrimitiveTypeUsedForBulkData(p.getType().(J::Array).getElementType())
|
||||
@@ -103,20 +103,20 @@ module ModelGeneratorCommonInput implements ModelGeneratorCommonInputSig<Locatio
|
||||
else result = "Argument[" + p.getPosition() + "]"
|
||||
}
|
||||
|
||||
string parameterContentAccess(J::Parameter p) { result = "Argument[" + p.getPosition() + "]" }
|
||||
string parameterExactAccess(J::Parameter p) { result = "Argument[" + p.getPosition() + "]" }
|
||||
|
||||
class InstanceParameterNode = DataFlow::InstanceParameterNode;
|
||||
|
||||
bindingset[c]
|
||||
string paramReturnNodeAsOutput(Callable c, ParameterPosition pos) {
|
||||
result = parameterAccess(c.getParameter(pos))
|
||||
string paramReturnNodeAsApproximateOutput(Callable c, ParameterPosition pos) {
|
||||
result = parameterApproximateAccess(c.getParameter(pos))
|
||||
or
|
||||
result = qualifierString() and pos = -1
|
||||
}
|
||||
|
||||
bindingset[c]
|
||||
string paramReturnNodeAsContentOutput(Callable c, ParameterPosition pos) {
|
||||
result = parameterContentAccess(c.getParameter(pos))
|
||||
string paramReturnNodeAsExactOutput(Callable c, ParameterPosition pos) {
|
||||
result = parameterExactAccess(c.getParameter(pos))
|
||||
or
|
||||
result = qualifierString() and pos = -1
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ public class Sources {
|
||||
return socketStream();
|
||||
}
|
||||
|
||||
// source=p;Sources;true;sourceToParameter;(InputStream[],List);;Argument[0].ArrayElement;remote;df-generated
|
||||
// source=p;Sources;true;sourceToParameter;(InputStream[],List);;Argument[1].Element;remote;df-generated
|
||||
// source=p;Sources;true;sourceToParameter;(InputStream[],List);;Argument[0];remote;df-generated
|
||||
// source=p;Sources;true;sourceToParameter;(InputStream[],List);;Argument[1];remote;df-generated
|
||||
// neutral=p;Sources;sourceToParameter;(InputStream[],List);summary;df-generated
|
||||
public void sourceToParameter(InputStream[] streams, List<InputStream> otherStreams)
|
||||
throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user