Refine code style

This commit is contained in:
Mygod
2019-04-14 13:36:59 +08:00
parent b70abd6ffb
commit 8bfbe8ce53
3 changed files with 3 additions and 3 deletions

View File

@@ -73,7 +73,7 @@ object MacLookup {
private fun extractCountry(mac: Long, response: String, obj: JSONObject): MatchResult? {
countryCodeRegex.matchEntire(obj.optString("country"))?.also { return it }
val address = obj.optString("address")
if (address.isNullOrBlank()) return null
if (address.isBlank()) return null
countryCodeRegex.find(address)?.also { return it }
Timber.w(UnexpectedError(mac, response))
return null