- 
        Couldn't load subscription status. 
- Fork 38.8k
Closed
Closed
Copy link
Labels
in: testIssues in the test moduleIssues in the test modulein: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: bugA general bugA general bug
Milestone
Description
Joshua Spiewak opened SPR-9885 and commented
HttpServletResponse defines getHeaderNames as returning Collection<String>, while MockHttpServletResponse defines it as returning Set<String>.
Use of the interface with a concrete instance of the mock yields an AbstractMethodError.
Attached are a Maven pom.xml and Java class that compiles but when run yields the exception:
Exception in thread "main" java.lang.AbstractMethodError: org.springframework.mock.web.MockHttpServletResponse.getHeaderNames()Ljava/util/Collection;
	at Example.main(Example.java:9)
The closest existing issue that I could find is #13173 which covered getHeaders but not getHeaderNames.
Affects: 3.1.2
Attachments:
- Example.java (406 bytes)
- pom.xml (1014 bytes)
Referenced from: commits f9bb4b3, 5a773b7
Backported to: 3.1.4
0 votes, 5 watchers
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test modulein: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: bugA general bugA general bug