Skip to content

Commit f50a262

Browse files
committed
Polish
See gh-32189
1 parent c570f3b commit f50a262

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,8 @@ public boolean containsKey(Object key) {
474474

475475
@Override
476476
public void clear() {
477-
this.servletRequest.getAttributeNames().asIterator().forEachRemaining(this.servletRequest::removeAttribute);
477+
List<String> attributeNames = Collections.list(this.servletRequest.getAttributeNames());
478+
attributeNames.forEach(this.servletRequest::removeAttribute);
478479
}
479480

480481
@Override

0 commit comments

Comments
 (0)