We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 395b878 commit 4056d91Copy full SHA for 4056d91
src/main/java/soot/SootClass.java
@@ -1304,12 +1304,14 @@ public boolean isOpenedByModule() {
1304
*/
1305
public Collection<SootMethod> getMethodsByNameAndParamCount(String name, int paramCount) {
1306
List<SootMethod> result = null;
1307
- for (SootMethod m : getMethods()) {
1308
- if (m.getParameterCount() == paramCount && m.getName().equals(name)) {
1309
- if (result == null) {
1310
- result = new ArrayList<>();
+ synchronized(this) {
+ for (SootMethod m : getMethods()) {
+ if (m.getParameterCount() == paramCount && m.getName().equals(name)) {
+ if (result == null) {
1311
+ result = new ArrayList<>();
1312
+ }
1313
+ result.add(m);
1314
}
- result.add(m);
1315
1316
1317
0 commit comments