thanhbv200585 commented on code in PR #1824:
URL: https://github.com/apache/james-project/pull/1824#discussion_r1435960500
##########
third-party/crowdsec/src/main/java/org/apache/james/CrowdsecImapConnectionCheck.java:
##########
@@ -41,7 +41,7 @@ public
CrowdsecImapConnectionCheck(CrowdsecClientConfiguration crowdsecClientCon
@Override
public Publisher<Void> validate(InetSocketAddress remoteAddress) {
- String ip = remoteAddress.getAddress().getHostAddress();
+ String ip = remoteAddress.getHostName();
Review Comment:
There is a bit difference.
```
InetSocketAddress.createUnresolved(haproxyMsg.sourceAddress(),
haproxyMsg.sourcePort())
```
I created `InetSocketAddress` by this way, so addr will be null. If I call
`getAddress`, it will throw NullPointerException. That's why I changed it
```
private InetAddress getAddress() {
return addr;
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]