-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issueA duplicate of another issuetype: regressionA bug that is also a regressionA bug that is also a regression
Description
Affects: 5.1.10 snapshots
The problem is illustrated by the following test:
package example;
import java.util.Arrays;
import org.junit.Test;
import org.springframework.http.HttpHeaders;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.entry;
public class HttpHeadersTests {
@Test
public void removeFromKeySet() {
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.set("Alpha", "apple");
httpHeaders.set("Bravo", "banana");
httpHeaders.keySet().remove("Alpha");
assertThat(httpHeaders).containsOnly(entry("Bravo", Arrays.asList("banana")));
assertThat(httpHeaders).doesNotContainKey("Alpha");
}
}The first assertion passes but the second fails:
java.lang.AssertionError:
Expecting:
<{"Bravo"=["banana"]}>
not to contain key:
<"Alpha">
at example.HttpHeadersTests.removeFromKeySet(HttpHeadersTests.java:21)
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issueA duplicate of another issuetype: regressionA bug that is also a regressionA bug that is also a regression