mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
97cc89630d
Prior to this commit, the Series value for an HttpStatus was always evaluated which resulted in an allocation of a Series array by invoking Series.values() which makes a defensive copy. This commit addresses this issue by hardcoding the corresponding Series within the HttpStatus constructor, thereby avoiding any unnecessary computations. In addition, a unit test has been added to verify that all HttpStatus enum constants have a properly configured Series. Closes gh-22366