Skip to content

Commit 5f13ea9

Browse files
committed
Polish
See gh-32197
1 parent 74bb42b commit 5f13ea9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultServerRequest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,8 @@ public boolean containsKey(Object key) {
438438

439439
@Override
440440
public void clear() {
441-
this.servletRequest.getAttributeNames().asIterator().forEachRemaining(this.servletRequest::removeAttribute);
441+
List<String> attributeNames = Collections.list(this.servletRequest.getAttributeNames());
442+
attributeNames.forEach(this.servletRequest::removeAttribute);
442443
}
443444

444445
@Override

0 commit comments

Comments
 (0)