mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
a221835558
Prior to this commit, getPort() in HierarchicalUriComponents threw a NumberFormatException for an invalid port supplied as a String, which was inconsistent with exception handling elsewhere in the class as well as within the same method. This commit introduces a try-catch block in getPort() to consistently throw IllegalStateExceptions for ports that cannot be parsed. Closes gh-28521