Skip to content

Commit fb376b8

Browse files
committed
fix ConcurrentModificationException when calling SootClass.getMethodsByNameAndParamCount bug
1 parent 395b878 commit fb376b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/soot/SootClass.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ public boolean isOpenedByModule() {
12951295

12961296
/**
12971297
* Returns all methods with exactly the number of parameters specified.
1298-
*
1298+
*
12991299
* @param name
13001300
* the name of the method
13011301
* @param paramCount
@@ -1304,7 +1304,7 @@ public boolean isOpenedByModule() {
13041304
*/
13051305
public Collection<SootMethod> getMethodsByNameAndParamCount(String name, int paramCount) {
13061306
List<SootMethod> result = null;
1307-
for (SootMethod m : getMethods()) {
1307+
for (SootMethod m : new ArrayList<>(getMethods())) {
13081308
if (m.getParameterCount() == paramCount && m.getName().equals(name)) {
13091309
if (result == null) {
13101310
result = new ArrayList<>();

0 commit comments

Comments
 (0)