1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-12 06:08:25 -05:00

Rewrote code to be easier to read and not raise a potential null pointer warning by Eclipse.

This commit is contained in:
cketti 2011-01-19 00:10:36 +00:00
parent 6a9a5f6b1f
commit 8f2623e33c

View File

@ -84,9 +84,12 @@ public class DomainNameChecker
*/
private static boolean isIpAddress(String domain)
{
boolean rval = ((domain != null) && (domain.length() != 0));
if (rval)
if ((domain == null) || (domain.length() == 0))
{
return false;
}
boolean rval;
try
{
// do a quick-dirty IP match first to avoid DNS lookup
@ -113,7 +116,6 @@ public class DomainNameChecker
rval = false;
}
}
return rval;
}