From coverity: client.getInetAddress() may return null

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2258 3d1905a2-6b24-0410-a738-b14d5a86fcbd
master
mguessan 9 years ago
parent 58f84bcd12
commit 3a56ffbe61

@ -812,7 +812,8 @@ public class LdapConnection extends AbstractConnection {
protected String getCurrentHostName() throws UnknownHostException {
if (currentHostName == null) {
if (client.getInetAddress().isLoopbackAddress()) {
InetAddress clientInetAddress = client.getInetAddress();
if (clientInetAddress != null && clientInetAddress.isLoopbackAddress()) {
// local address, probably using localhost in iCal URL
currentHostName = "localhost";
} else {

Loading…
Cancel
Save