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:
parent
6a9a5f6b1f
commit
8f2623e33c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user