Detekt: enable rule exceptions.SwallowedException and fix existing issue.
This commit is contained in:
@@ -21,7 +21,7 @@ fun String.md5() = try {
|
||||
digest.digest()
|
||||
.joinToString("") { String.format(locale, "%02X", it) }
|
||||
.lowercase(locale)
|
||||
} catch (exc: Exception) {
|
||||
} catch (_: Exception) {
|
||||
// Should not happen, but just in case
|
||||
hashCode().toString()
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ fun String.isValidUrl(): Boolean {
|
||||
return try {
|
||||
URI(this).toURL()
|
||||
true
|
||||
} catch (t: Throwable) {
|
||||
} catch (_: Throwable) {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user