Add hasText assertion to IpAddressMatcher constructor
Issue gh-15527
(cherry picked from commit 3a29819651)
This commit is contained in:
@@ -50,6 +50,7 @@ public final class IpAddressMatcher implements RequestMatcher {
|
||||
* come.
|
||||
*/
|
||||
public IpAddressMatcher(String ipAddress) {
|
||||
Assert.hasText(ipAddress, "ipAddress cannot be empty");
|
||||
assertNotHostName(ipAddress);
|
||||
if (ipAddress.indexOf('/') > 0) {
|
||||
String[] addressAndMask = StringUtils.split(ipAddress, "/");
|
||||
|
||||
Reference in New Issue
Block a user