Commit 95d5cca
committed
fix: use declared erasure for type variables and wildcards
Pass-through rules like `java.util.List#get` returning
`java.lang.Object`
were no longer matching since typed method resolution via
`cp.typeOf(method.enclosingClass)` surfaces declared return/parameter
types as `JIRTypeVariable` (e.g. `E`) rather than the erased class.
`erasedName()` fell through to `typeName`, producing the type-variable
symbol `"E"` instead of `"java.lang.Object"`, so every string-based
matcher missed. Map type variables and unbound wildcards to their
declared erasure via `jIRClass.name`, and extend the same lookup to
array element types.1 parent bf8e6e4 commit 95d5cca
1 file changed
Lines changed: 13 additions & 2 deletions
File tree
- core/opentaint-configuration-rules/configuration-rules-jvm/src/main/kotlin/org/opentaint/dataflow/configuration/jvm
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| 62 | + | |
| 63 | + | |
58 | 64 | | |
59 | 65 | | |
60 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
61 | 72 | | |
62 | 73 | | |
63 | 74 | | |
0 commit comments