Add toString() to IpAddressMatcher.java

Closes gh-16795

Signed-off-by: wtigerhyunsu <jack951@naver.com>
This commit is contained in:
wtigerhyunsu
2025-03-25 11:05:58 +09:00
committed by Josh Cummings
parent 40b84d3e44
commit bdbf6a2be3
2 changed files with 21 additions and 0 deletions

View File

@@ -130,4 +130,11 @@ public final class IpAddressMatcher implements RequestMatcher {
}
}
@Override
public String toString() {
String hostAddress = this.requiredAddress.getHostAddress();
return (this.nMaskBits < 0) ? "IpAddress [" + hostAddress + "]"
: "IpAddress [" + hostAddress + "/" + this.nMaskBits + "]";
}
}