diff options
author | chibash <chiba@javassist.org> | 2018-10-05 15:47:03 +0900 |
---|---|---|
committer | chibash <chiba@javassist.org> | 2018-10-05 15:47:03 +0900 |
commit | f95d49749dc5fe499484b156cb5e089296b4cc17 (patch) | |
tree | c4be01a37ae8ec4de678ca5288cdad5f5029b79e | |
parent | 17198176b9a7c4cca477236ca99b51f885662225 (diff) | |
download | javassist-f95d49749dc5fe499484b156cb5e089296b4cc17.tar.gz javassist-f95d49749dc5fe499484b156cb5e089296b4cc17.zip |
avoids ConcurrentModificationException in 3.23.1-GA reported in Issue #224.
-rw-r--r-- | src/main/javassist/CtClassType.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/javassist/CtClassType.java b/src/main/javassist/CtClassType.java index 3791b5fb..ae196c4a 100644 --- a/src/main/javassist/CtClassType.java +++ b/src/main/javassist/CtClassType.java @@ -1526,7 +1526,7 @@ class CtClassType extends CtClass { ClassFile cf = getClassFile2(); ConstPool cp = cf.getConstPool(); List<MethodInfo> methods = cf.getMethods(); - for (MethodInfo minfo:methods) + for (MethodInfo minfo: methods.toArray(new MethodInfo[methods.size()])) converter.doit(this, minfo, cp); } @@ -1537,7 +1537,7 @@ class CtClassType extends CtClass { checkModify(); ClassFile cf = getClassFile2(); List<MethodInfo> methods = cf.getMethods(); - for (MethodInfo minfo:methods) + for (MethodInfo minfo: methods.toArray(new MethodInfo[methods.size()])) editor.doit(this, minfo); } |