Add test showing spurious sink candidate from method overriding a method for which we have a model.

This commit is contained in:
Max Schaefer
2024-02-06 16:03:10 +00:00
parent 02547d3839
commit a9c0fed4f5

View File

@@ -0,0 +1,15 @@
package com.github.codeql.test;
public class MyWriter extends java.io.Writer {
@Override
public void write(char[] cbuf, int off, int len) { // $ sinkModelCandidate=write(char[],int,int):Argument[this] sourceModelCandidate=write(char[],int,int):Parameter[this] sourceModelCandidate=write(char[],int,int):Parameter[0] SPURIOUS: sinkModelCandidate=write(char[],int,int):Argument[0]
}
@Override
public void close() { // $ sinkModelCandidate=close():Argument[this] sourceModelCandidate=close():Parameter[this]
}
@Override
public void flush() { // $ sinkModelCandidate=flush():Argument[this] sourceModelCandidate=flush():Parameter[this]
}
}