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

MockHttpSession throws ConcurrentModificationException when removing attributes in a loop [SPR-7557] #12214

Closed
spring-projects-issues opened this issue Sep 15, 2010 · 0 comments
Assignees
Labels
in: test Issues in the test module type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Gaetan Pitteloud opened SPR-7557 and commented

The following code throws ConcurrentModificationException:

HttpSession session = new MockHttpSession();
session.setAttribute("k1", "v1");
session.setAttribute("k2", "v2");
for (Enumeration<String> names = session.getAttributeNames(); names.hasMoreElements();) {
   session.removeAttribute(names.nextElement());
}

The same code was OK prior Spring 3, and is OK on any web server, with non-mock http session implementation.


Affects: 3.0 M1, 3.0 M2, 3.0 M3, 3.0 M4, 3.0 RC1, 3.0 RC2, 3.0 RC3, 3.0 GA, 3.0.1, 3.0.2, 3.0.3, 3.0.4

Referenced from: commits aac2de9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants