Commit f35d3e9
Make the behavior of OpalWrappedClass.getMethods consistent
The current behavior of OpalWrappedClass.getMethods is inconsistent wrt.
JimpleUpWrappedClass.getMethods and JimpleWrappedClass.getMethods:
- In case of a class, which is not part of the project,
OpalWrappedClass.getMethods throws an exception, while, for instance,
JimpleUpWrappedClass.getMethods returns an empty set.
- If the wrapped class has a method with an empty body (for instance,
an abstract method), OpalWrappedClass.getMethods throws an exception
(which is clearly a bug). Instead, methods with an empty body should
be ignored (that's consistent to the getMethods implementation in
JimpleUpWrappedClass and JimpleWrappedClass).
The OpalWrappedClassTest documents the new behavior of
JimpleUpWrappedClass.getMethods.1 parent ac35971 commit f35d3e9
File tree
3 files changed
+71
-9
lines changed- boomerangScope-Opal/src
- main/scala/boomerang/scope/opal/tac
- test/scala/boomerang/scope/opal
- boomerangScope/src/test/java/boomerang/scope/test/targets
3 files changed
+71
-9
lines changedLines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
38 | 37 | | |
39 | | - | |
40 | | - | |
| 38 | + | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| |||
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments