mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-09 20:58:05 -05:00
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
This commit is contained in:
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…
Reference in New Issue
Block a user