Match enclosing unit without casting to specific nodes

This commit is contained in:
Benjamin Muskalla
2021-10-26 10:41:10 +02:00
parent bc10fd94cb
commit 281f25403d
7 changed files with 31 additions and 14 deletions

View File

@@ -1,5 +1,6 @@
| p;Factory;false;create;(String);;Argument[0];Argument[-1];taint; |
| p;Factory;false;create;(String,int);;Argument[0];Argument[-1];taint; |
| p;Factory;false;getValue;();;Argument[-1];ReturnValue;taint; |
| p;FinalClass;false;returnsInput;(String);;Argument[0];ReturnValue;taint; |
| p;FluentAPI;false;returnsThis;(String);;Argument[-1];ReturnValue;value; |
| p;ImmutablePojo;false;ImmutablePojo;(String,int);;Argument[0];Argument[-1];taint; |

View File

@@ -19,4 +19,12 @@ public final class Factory {
this.intValue = intValue;
}
public String getValue() {
return value;
}
public int getIntValue() {
return intValue;
}
}

View File

@@ -15,6 +15,10 @@ public final class ImmutablePojo {
return value;
}
public long getX() {
return x;
}
public String or(String defaultValue) {
return value != null ? value : defaultValue;
}

View File

@@ -1,9 +1,5 @@
package p;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.nio.file.Files;
import java.util.concurrent.Callable;
public class MultipleImpls {