mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
Avoid generating models for classes implementing external SPI (e.g. `FileFilter`). Keep `toString` models intact as they're commonly used as taint-propagation method (e.g. see `Joiner`).
19 lines
385 B
Java
19 lines
385 B
Java
package p;
|
|
|
|
import java.io.File;
|
|
import java.io.IOException;
|
|
import java.nio.file.Files;
|
|
|
|
public class ImplOfExternalSPI extends AbstractImplOfExternalSPI {
|
|
|
|
@Override
|
|
public boolean accept(File pathname) {
|
|
try {
|
|
Files.createFile(pathname.toPath());
|
|
} catch (IOException e) {
|
|
e.printStackTrace();
|
|
}
|
|
return false;
|
|
}
|
|
|
|
} |