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 issue 305: CodeConverter.replaceArrayAccess leads to java.util.ConcurrentModificationException #306

Merged
merged 1 commit into from Apr 25, 2021

Conversation

nschaefe
Copy link
Contributor

@nschaefe nschaefe commented Mar 24, 2020

This is a suggestion for a fix for the issue #305.

Changes were made in javassist.bytecode.analysis.Type.findCommonInterfaces:

  • Instead of manipulating the map while iterating over the key set at line 499, an iterator is used now. Elements are removed via iterator.remove().

  • Instead of manipulating the map while iterating over the value set at line 506, the identified interfaces are accumulated in a list and removed after the iteration loop.

I also wrote a test. The test calls replaceArrayAccess on a class that causes a ConcurrentModificationException without the fix.

@chibash chibash merged commit 5fade7e into jboss-javassist:master Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants