[skip ci] fix not needed type cast
This commit is contained in:
@@ -197,7 +197,7 @@ class AnalyzeRule(
|
|||||||
}
|
}
|
||||||
if (sourceRule.replaceRegex.isNotEmpty() && result is List<*>) {
|
if (sourceRule.replaceRegex.isNotEmpty() && result is List<*>) {
|
||||||
val newList = ArrayList<String>()
|
val newList = ArrayList<String>()
|
||||||
for (item in result as List<*>) {
|
for (item in result) {
|
||||||
newList.add(replaceRegex(item.toString(), sourceRule))
|
newList.add(replaceRegex(item.toString(), sourceRule))
|
||||||
}
|
}
|
||||||
result = newList
|
result = newList
|
||||||
@@ -210,12 +210,12 @@ class AnalyzeRule(
|
|||||||
}
|
}
|
||||||
if (result == null) return null
|
if (result == null) return null
|
||||||
if (result is String) {
|
if (result is String) {
|
||||||
result = (result as String).split("\n")
|
result = result.split("\n")
|
||||||
}
|
}
|
||||||
if (isUrl) {
|
if (isUrl) {
|
||||||
val urlList = ArrayList<String>()
|
val urlList = ArrayList<String>()
|
||||||
if (result is List<*>) {
|
if (result is List<*>) {
|
||||||
for (url in result as List<*>) {
|
for (url in result) {
|
||||||
val absoluteURL = NetworkUtils.getAbsoluteURL(redirectUrl, url.toString())
|
val absoluteURL = NetworkUtils.getAbsoluteURL(redirectUrl, url.toString())
|
||||||
if (absoluteURL.isNotEmpty() && !urlList.contains(absoluteURL)) {
|
if (absoluteURL.isNotEmpty() && !urlList.contains(absoluteURL)) {
|
||||||
urlList.add(absoluteURL)
|
urlList.add(absoluteURL)
|
||||||
|
|||||||
Reference in New Issue
Block a user