Skip to content

MockHttpServletResponse.getDateHeader fails with NPE for non-existing header [SPR-16160] #20708

Closed
@spring-projects-issues

Description

@spring-projects-issues

Juergen Hoeller opened SPR-16160 and commented

MockHttpServletResponse.getDateHeader doesn't check for the existence of the corresponding header and ends up calling DateFormat.parse with a null value. Aligned with HttpServletRequest.getDateHeader(), it should simply return -1 in such a case.


Affects: 4.3.12, 5.0.1

Issue Links:

Referenced from: commits a75dd2d, 80a0cf7, dc0a934

Backported to: 4.3.13

Metadata

Metadata

Assignees

Labels

in: testIssues in the test modulestatus: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions