mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-25 16:29:28 +00:00
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