Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ConcurrentModificationException when calling SootClass.getMethods… #2043

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/soot/SootClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ public boolean isOpenedByModule() {

/**
* Returns all methods with exactly the number of parameters specified.
*
*
* @param name
* the name of the method
* @param paramCount
Expand All @@ -1304,7 +1304,7 @@ public boolean isOpenedByModule() {
*/
public Collection<SootMethod> getMethodsByNameAndParamCount(String name, int paramCount) {
List<SootMethod> result = null;
for (SootMethod m : getMethods()) {
for (SootMethod m : new ArrayList<>(getMethods())) {
if (m.getParameterCount() == paramCount && m.getName().equals(name)) {
if (result == null) {
result = new ArrayList<>();
Expand Down
Loading